git: 930be41aa757 - main - ipfw: declare the ipfw_nat64 module
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 28 Oct 2026 16:56:00 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=930be41aa75705673659ea92faaf24f75c629a33
commit 930be41aa75705673659ea92faaf24f75c629a33
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2026-10-28 16:55:01 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2026-10-28 16:55:01 +0000
ipfw: declare the ipfw_nat64 module
The module declaration is necessary for 'kldstat -m' to see it,
and the rc(8) uses that to detect presence of ipfw_nat.
Submitted by: markj's Post-Commit LLM Review Service
Fixes: 9bcc1e97dda8e926483b81874884211bbe4f36e9
---
sys/netpfil/ipfw/nat64/ip_fw_nat64.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/sys/netpfil/ipfw/nat64/ip_fw_nat64.c b/sys/netpfil/ipfw/nat64/ip_fw_nat64.c
index 230f42807820..9a9c58e6d9e8 100644
--- a/sys/netpfil/ipfw/nat64/ip_fw_nat64.c
+++ b/sys/netpfil/ipfw/nat64/ip_fw_nat64.c
@@ -114,6 +114,24 @@ vnet_ipfw_nat64_uninit(const void *arg __unused)
return (0);
}
+static int
+ipfw_nat64_modevent(module_t mod, int type, void *unused)
+{
+ switch (type) {
+ case MOD_LOAD:
+ case MOD_UNLOAD:
+ return (0);
+ default:
+ return (EOPNOTSUPP);
+ }
+}
+
+static moduledata_t ipfw_nat_mod = {
+ .name = "ipfw_nat64",
+ .evhand = ipfw_nat64_modevent,
+};
+
+DECLARE_MODULE(ipfw_nat, ipfw_nat_mod, SI_SUB_PROTO_FIREWALL, SI_ORDER_SECOND);
MODULE_DEPEND(ipfw_nat64, ipfw, 3, 3, 3);
MODULE_VERSION(ipfw_nat64, 1);