All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: laforge@netfilter.org
Cc: johnpol@2ka.mipt.ru, netfilter-devel@lists.netfilter.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 1 Wire drivers illegally overload NETLINK_NFLOG
Date: Sun, 24 Jul 2005 19:15:05 -0700 (PDT)	[thread overview]
Message-ID: <20050724.191505.69244686.davem@davemloft.net> (raw)
In-Reply-To: <20050723133353.GB11177@rama>

From: Harald Welte <laforge@netfilter.org>
Date: Sat, 23 Jul 2005 09:33:53 -0400

> I strongly disrecommend increasing NPROTO.  Maybe we should look into
> reusing NETLINK_FIREWALL (which was an old 2.2.x kernel interface).

ip_queue.c still uses NETLINK_FIREWALL so we really can't use
that.

So instead, as in the patch below, I solved this for now by using
the NETLINK_SKIP value which was reserved years ago yet never
made use of.

diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
@@ -88,7 +88,7 @@ static struct w1_master * w1_alloc_dev(u
 
 	dev->groups = 23;
 	dev->seq = 1;
-	dev->nls = netlink_kernel_create(NETLINK_NFLOG, NULL);
+	dev->nls = netlink_kernel_create(NETLINK_W1, NULL);
 	if (!dev->nls) {
 		printk(KERN_ERR "Failed to create new netlink socket(%u) for w1 master %s.\n",
 			NETLINK_NFLOG, dev->dev.bus_id);
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -5,7 +5,7 @@
 #include <linux/types.h>
 
 #define NETLINK_ROUTE		0	/* Routing/device hook				*/
-#define NETLINK_SKIP		1	/* Reserved for ENskip  			*/
+#define NETLINK_W1		1	/* 1-wire subsystem				*/
 #define NETLINK_USERSOCK	2	/* Reserved for user mode socket protocols 	*/
 #define NETLINK_FIREWALL	3	/* Firewalling hook				*/
 #define NETLINK_TCPDIAG		4	/* TCP socket monitoring			*/

WARNING: multiple messages have this Message-ID (diff)
From: "David S. Miller" <davem@davemloft.net>
To: laforge@netfilter.org
Cc: yoshfuji@linux-ipv6.org, johnpol@2ka.mipt.ru,
	netfilter-devel@lists.netfilter.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 1 Wire drivers illegally overload NETLINK_NFLOG
Date: Sun, 24 Jul 2005 19:15:05 -0700 (PDT)	[thread overview]
Message-ID: <20050724.191505.69244686.davem@davemloft.net> (raw)
In-Reply-To: <20050723133353.GB11177@rama>

From: Harald Welte <laforge@netfilter.org>
Date: Sat, 23 Jul 2005 09:33:53 -0400

> I strongly disrecommend increasing NPROTO.  Maybe we should look into
> reusing NETLINK_FIREWALL (which was an old 2.2.x kernel interface).

ip_queue.c still uses NETLINK_FIREWALL so we really can't use
that.

So instead, as in the patch below, I solved this for now by using
the NETLINK_SKIP value which was reserved years ago yet never
made use of.

diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
@@ -88,7 +88,7 @@ static struct w1_master * w1_alloc_dev(u
 
 	dev->groups = 23;
 	dev->seq = 1;
-	dev->nls = netlink_kernel_create(NETLINK_NFLOG, NULL);
+	dev->nls = netlink_kernel_create(NETLINK_W1, NULL);
 	if (!dev->nls) {
 		printk(KERN_ERR "Failed to create new netlink socket(%u) for w1 master %s.\n",
 			NETLINK_NFLOG, dev->dev.bus_id);
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -5,7 +5,7 @@
 #include <linux/types.h>
 
 #define NETLINK_ROUTE		0	/* Routing/device hook				*/
-#define NETLINK_SKIP		1	/* Reserved for ENskip  			*/
+#define NETLINK_W1		1	/* 1-wire subsystem				*/
 #define NETLINK_USERSOCK	2	/* Reserved for user mode socket protocols 	*/
 #define NETLINK_FIREWALL	3	/* Firewalling hook				*/
 #define NETLINK_TCPDIAG		4	/* TCP socket monitoring			*/

  parent reply	other threads:[~2005-07-25  2:15 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-23 12:54 [PATCH] 1 Wire drivers illegally overload NETLINK_NFLOG Harald Welte
2005-07-23  3:05 ` YOSHIFUJI Hideaki / 吉藤英明
2005-07-23  3:05   ` YOSHIFUJI Hideaki / 吉藤英明
2005-07-23  3:15   ` YOSHIFUJI Hideaki / 吉藤英明
2005-07-23  3:52   ` Patrick McHardy
2005-07-23 13:33   ` Harald Welte
2005-07-23 13:33     ` Harald Welte
2005-07-25  2:09     ` David S. Miller
2005-07-25  2:09       ` David S. Miller
2005-07-25  2:15     ` David S. Miller [this message]
2005-07-25  2:15       ` David S. Miller
2005-07-26  9:48       ` Harald Welte
2005-07-23  9:14 ` Evgeniy Polyakov
2005-07-25  2:17   ` David S. Miller
2005-07-25  6:02     ` Netlink connector James Morris
2005-07-25  6:02       ` James Morris
2005-07-25  7:06       ` Evgeniy Polyakov
2005-07-25  7:06         ` Evgeniy Polyakov
2005-07-25 14:32         ` Patrick McHardy
2005-07-25 14:32           ` Patrick McHardy
2005-07-25 14:43           ` Eric Leblond
2005-07-25 19:33             ` Evgeniy Polyakov
2005-07-26  8:45               ` Harald Welte
2005-07-26  8:45                 ` Harald Welte
2005-07-25 19:28           ` Evgeniy Polyakov
2005-07-25 19:28             ` Evgeniy Polyakov
2005-07-25 23:46             ` Patrick McHardy
2005-07-25 23:46               ` Patrick McHardy
2005-07-25 23:56               ` Thomas Graf
2005-07-26  0:16                 ` Patrick McHardy
2005-07-26  0:30                   ` Thomas Graf
2005-07-26  0:30                     ` Thomas Graf
2005-07-26  4:45               ` Evgeniy Polyakov
2005-07-26  4:45                 ` Evgeniy Polyakov
2005-07-26  4:56                 ` Stephen Hemminger
2005-07-26  4:56                   ` Stephen Hemminger
2005-07-26  5:01                   ` Evgeniy Polyakov
2005-07-26  5:01                     ` Evgeniy Polyakov
2005-07-26  6:14                 ` Thomas Graf
2005-07-26  6:14                   ` Thomas Graf
2005-07-26  6:31                   ` Evgeniy Polyakov
2005-07-26  6:31                     ` Evgeniy Polyakov
2005-07-26  8:42       ` Harald Welte
2005-07-26  8:42         ` Harald Welte
2005-07-26  9:01         ` Evgeniy Polyakov

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=20050724.191505.69244686.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=johnpol@2ka.mipt.ru \
    --cc=laforge@netfilter.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netfilter-devel@lists.netfilter.org \
    /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.