patch-2.4.19 linux-2.4.19/net/core/neighbour.c
Next file: linux-2.4.19/net/core/netfilter.c
Previous file: linux-2.4.19/net/core/dev.c
Back to the patch index
Back to the overall index
- Lines: 64
- Date:
Fri Aug 2 17:39:46 2002
- Orig file:
linux-2.4.18/net/core/neighbour.c
- Orig date:
Fri Dec 21 09:42:05 2001
diff -urN linux-2.4.18/net/core/neighbour.c linux-2.4.19/net/core/neighbour.c
@@ -54,12 +54,6 @@
static int neigh_glbl_allocs;
static struct neigh_table *neigh_tables;
-#if defined(__i386__) && defined(CONFIG_SMP)
-#define ASSERT_WL(n) if ((int)((n)->lock.lock) > 0) { printk("WL assertion failed at " __FILE__ "(%d):" __FUNCTION__ "\n", __LINE__); }
-#else
-#define ASSERT_WL(n) do { } while(0)
-#endif
-
/*
Neighbour hash table buckets are protected with rwlock tbl->lock.
@@ -484,8 +478,6 @@
NEIGH_PRINTK2("neigh %p is suspecteded.\n", neigh);
- ASSERT_WL(neigh);
-
neigh->output = neigh->ops->output;
for (hh = neigh->hh; hh; hh = hh->hh_next)
@@ -503,8 +495,6 @@
NEIGH_PRINTK2("neigh %p is connected.\n", neigh);
- ASSERT_WL(neigh);
-
neigh->output = neigh->ops->connected_output;
for (hh = neigh->hh; hh; hh = hh->hh_next)
@@ -529,7 +519,6 @@
unsigned long now = jiffies;
u8 state = n->nud_state;
- ASSERT_WL(n);
if (state&(NUD_NOARP|NUD_PERMANENT))
return;
if (state&NUD_REACHABLE) {
@@ -1239,6 +1228,7 @@
read_lock(&neigh_tbl_lock);
for (tbl=neigh_tables; tbl; tbl = tbl->next) {
int err = 0;
+ int override = 1;
struct neighbour *n;
if (tbl->family != ndm->ndm_family)
@@ -1266,6 +1256,7 @@
if (n) {
if (nlh->nlmsg_flags&NLM_F_EXCL)
err = -EEXIST;
+ override = nlh->nlmsg_flags&NLM_F_REPLACE;
} else if (!(nlh->nlmsg_flags&NLM_F_CREATE))
err = -ENOENT;
else {
@@ -1278,7 +1269,7 @@
if (err == 0) {
err = neigh_update(n, nda[NDA_LLADDR-1] ? RTA_DATA(nda[NDA_LLADDR-1]) : NULL,
ndm->ndm_state,
- nlh->nlmsg_flags&NLM_F_REPLACE, 0);
+ override, 0);
}
if (n)
neigh_release(n);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)