nfnetlink fixes
Subsystems (2)
PATCH 1/1 nfnetlink fixes
Hi Harald,
The patch attached fixes a panic on boot startup if nfnetlink and ctnetlink are built in kernel and the netlink socket creation fails.
Now nfnetlink uses netlink socket number 10 so we don't share the socket with ip_queue anymore.
The patch applies inside the directory nfnetlink in pom-ng.
--
Pablo
include/linux/netfilter/nfnetlink.h renamed from include/linux/netfilter/nfnetlink.h.orig +1 -2
@@ -37,9 +37,8 @@#define NFM_PAYLOAD (n) NLMSG_PAYLOAD(n, sizeof(struct nfgenmsg)) -/* Now it's uses NETLINK_FIREWALL */ #ifndef NETLINK_NETFILTER -#define NETLINK_NETFILTER 3 +#define NETLINK_NETFILTER 10#endif /* netfilter netlink message types are split in two pieces:
net/netfilter/nfnetlink.c renamed from net/netfilter/nfnetlink.c.orig +4 -0
@@ -84,6 +84,10 @@ {DEBUGP ("registering subsystem ID %u\n" , n->subsys_id); +/* If the netlink socket wasn't created, then fail */ +if (!nfnl) +return -1 ; +nfnl_lock ();list_add (&n->list, &subsys_list); subsys_table[n->subsys_id] = n;
linux-2.6.patch new file +11 -0
@@ -0,0 +1,11 @@ +===== include/linux/netlink.h 1.23 vs edited ===== +--- 1.23/include/linux/netlink.h 2005-02-07 06:59:39 +01:00 ++++ edited/include/linux/netlink.h 2005-04-20 01:07:46 +02:00 +@@ -14,6 +14,7 @@ + #define NETLINK_SELINUX 7 /* SELinux event notifications */ + #define NETLINK_ARPD 8 + #define NETLINK_AUDIT 9 /* auditing */ ++#define NETLINK_NETFILTER 10 /* netfilter subsystem */ + #define NETLINK_ROUTE6 11 /* af_inet6 route comm channel */ + #define NETLINK_IP6_FW 13 + #define NETLINK_DNRTMSG 14 /* DECnet routing messages */