From: Pablo Neira <pablo@eurodev.net>
To: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Cc: Harald Welte <laforge@netfilter.org>, Krzysztof Oledzki <ole@ans.pl>
Subject: [PATCH] nfnetlink fixes
Date: Wed, 20 Apr 2005 03:09:50 +0200 [thread overview]
Message-ID: <4265ABDE.10501@eurodev.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 317 bytes --]
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
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1527 bytes --]
--- linux-2.5/include/linux/netfilter/nfnetlink.h.orig 2005-04-20 01:08:49.000000000 +0200
+++ linux-2.5/include/linux/netfilter/nfnetlink.h 2005-04-20 01:10:05.000000000 +0200
@@ -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:
--- linux-2.5/net/netfilter/nfnetlink.c.orig 2005-04-20 01:03:16.000000000 +0200
+++ linux-2.5/net/netfilter/nfnetlink.c 2005-04-20 01:05:03.000000000 +0200
@@ -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;
--- /dev/null 2004-09-23 01:18:13.000000000 +0200
+++ linux-2.6.patch 2005-04-20 01:08:03.000000000 +0200
@@ -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 */
reply other threads:[~2005-04-20 1:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4265ABDE.10501@eurodev.net \
--to=pablo@eurodev.net \
--cc=laforge@netfilter.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=ole@ans.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.