From: Sylvain Rochet <gradator@gradator.net>
To: linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: 2.4.37.9 destroying an Ethernet interface with permanent NUD leaves the kernels with undestroyable interfaces when ATM is compiled in
Date: Thu, 8 Apr 2010 15:47:05 +0200 [thread overview]
Message-ID: <20100408134705.GA983@gradator.net> (raw)
In-Reply-To: <20100407202339.GB4830@gradator.net>
[-- Attachment #1.1: Type: text/plain, Size: 362 bytes --]
Hi,
On Wed, Apr 07, 2010 at 10:23:39PM +0200, Sylvain Rochet wrote:
> Hi,
>
> (...)
>
> I changed the family of the ATM table to AF_ATMPVC, of course it fixes
> the issue but I guess this is the wrong way to fix that.
Finally made a patch that follows what Linux 2.6 does, which consists of
having "netlink" and "no-netlink" tables.
Sylvain
[-- Attachment #1.2: neigh_no_netlink_atm_clip-2.4.37.9.patch --]
[-- Type: text/x-diff, Size: 2176 bytes --]
diff -Nru linux-2.4.36.6.a/include/net/neighbour.h linux-2.4.36.6.b/include/net/neighbour.h
--- linux-2.4.36.6.a/include/net/neighbour.h 2008-06-06 16:25:34.000000000 +0000
+++ linux-2.4.36.6.b/include/net/neighbour.h 2010-04-08 13:36:12.000000000 +0000
@@ -192,6 +192,7 @@
};
extern void neigh_table_init(struct neigh_table *tbl);
+extern void neigh_table_init_no_netlink(struct neigh_table *tbl);
extern int neigh_table_clear(struct neigh_table *tbl);
extern struct neighbour * neigh_lookup(struct neigh_table *tbl,
const void *pkey,
diff -Nru linux-2.4.36.6.a/net/atm/clip.c linux-2.4.36.6.b/net/atm/clip.c
--- linux-2.4.36.6.a/net/atm/clip.c 2008-06-06 16:25:34.000000000 +0000
+++ linux-2.4.36.6.b/net/atm/clip.c 2010-04-08 13:35:09.000000000 +0000
@@ -752,7 +752,7 @@
static int __init atm_clip_init(void)
{
- neigh_table_init(&clip_tbl);
+ neigh_table_init_no_netlink(&clip_tbl);
clip_tbl_hook = &clip_tbl;
atm_clip_ops_set(&__atm_clip_ops);
diff -Nru linux-2.4.36.6.a/net/core/neighbour.c linux-2.4.36.6.b/net/core/neighbour.c
--- linux-2.4.36.6.a/net/core/neighbour.c 2008-06-06 16:25:34.000000000 +0000
+++ linux-2.4.36.6.b/net/core/neighbour.c 2010-04-08 13:33:40.000000000 +0000
@@ -1248,7 +1248,7 @@
}
-void neigh_table_init(struct neigh_table *tbl)
+void neigh_table_init_no_netlink(struct neigh_table *tbl)
{
unsigned long now = jiffies;
unsigned long phsize;
@@ -1302,10 +1302,27 @@
tbl->last_flush = now;
tbl->last_rand = now + tbl->parms.reachable_time*20;
+}
+
+void neigh_table_init(struct neigh_table *tbl)
+{
+ struct neigh_table *tmp;
+
+ neigh_table_init_no_netlink(tbl);
write_lock(&neigh_tbl_lock);
- tbl->next = neigh_tables;
- neigh_tables = tbl;
+ for (tmp = neigh_tables; tmp; tmp = tmp->next) {
+ if (tmp->family == tbl->family)
+ break;
+ }
+ tbl->next = neigh_tables;
+ neigh_tables = tbl;
write_unlock(&neigh_tbl_lock);
+
+ if (unlikely(tmp)) {
+ printk(KERN_ERR "NEIGH: Registering multiple tables for "
+ "family %d\n", tbl->family);
+ dump_stack();
+ }
}
int neigh_table_clear(struct neigh_table *tbl)
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2010-04-08 13:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-07 20:23 PROBLEM: 2.4.37.9 destroying an Ethernet interface with permanent NUD leaves the kernels with undestroyable interfaces when ATM is compiled in Sylvain Rochet
2010-04-08 13:47 ` Sylvain Rochet [this message]
2010-04-20 5:11 ` Willy Tarreau
2010-04-21 14:07 ` Sylvain Rochet
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=20100408134705.GA983@gradator.net \
--to=gradator@gradator.net \
--cc=linux-kernel@vger.kernel.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.