mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
ipfw: declare the ipfw_nat module
The module declaration is necessary for 'kldstat -m' to see it,
and the rc(8) uses that to detect presence of ipfw_nat.
NB: the module(9) KPI lacks a way to declare a module without
providing an empty handler and no SYSINITs.
Reported by: ambrisko
Fixes: 9bcc1e97dd
This commit is contained in:
1 parent
d9d6e77965
commit
f2d4370fbb
1 file changed
+18
@@ -1194,6 +1194,24 @@ ipfw_nat_destroy(void *dummy __unused)
|
||||
ipfw_nat_get_log_ptr = NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
ipfw_nat_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_nat",
|
||||
.evhand = ipfw_nat_modevent,
|
||||
};
|
||||
|
||||
DECLARE_MODULE(ipfw_nat, ipfw_nat_mod, SI_SUB_PROTO_FIREWALL, SI_ORDER_SECOND);
|
||||
MODULE_DEPEND(ipfw_nat, libalias, 1, 1, 1);
|
||||
MODULE_DEPEND(ipfw_nat, ipfw, 3, 3, 3);
|
||||
MODULE_VERSION(ipfw_nat, 1);
|
||||
|
||||
Reference in new issue
Block a user