diff options
| -rw-r--r-- | include/net/neighbour.h | 1 | ||||
| -rw-r--r-- | net/atm/clip.c | 2 | ||||
| -rw-r--r-- | net/core/neighbour.c | 21 |
3 files changed, 21 insertions, 3 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index b0666d66293f..4901ee446879 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
| @@ -211,6 +211,7 @@ struct neigh_table | |||
| 211 | #define NEIGH_UPDATE_F_ADMIN 0x80000000 | 211 | #define NEIGH_UPDATE_F_ADMIN 0x80000000 |
| 212 | 212 | ||
| 213 | extern void neigh_table_init(struct neigh_table *tbl); | 213 | extern void neigh_table_init(struct neigh_table *tbl); |
| 214 | extern void neigh_table_init_no_netlink(struct neigh_table *tbl); | ||
| 214 | extern int neigh_table_clear(struct neigh_table *tbl); | 215 | extern int neigh_table_clear(struct neigh_table *tbl); |
| 215 | extern struct neighbour * neigh_lookup(struct neigh_table *tbl, | 216 | extern struct neighbour * neigh_lookup(struct neigh_table *tbl, |
| 216 | const void *pkey, | 217 | const void *pkey, |
diff --git a/net/atm/clip.c b/net/atm/clip.c index 1a786bfaa416..72d852982664 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
| @@ -963,7 +963,7 @@ static struct file_operations arp_seq_fops = { | |||
| 963 | static int __init atm_clip_init(void) | 963 | static int __init atm_clip_init(void) |
| 964 | { | 964 | { |
| 965 | struct proc_dir_entry *p; | 965 | struct proc_dir_entry *p; |
| 966 | neigh_table_init(&clip_tbl); | 966 | neigh_table_init_no_netlink(&clip_tbl); |
| 967 | 967 | ||
| 968 | clip_tbl_hook = &clip_tbl; | 968 | clip_tbl_hook = &clip_tbl; |
| 969 | register_atm_ioctl(&clip_ioctl_ops); | 969 | register_atm_ioctl(&clip_ioctl_ops); |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 4cf878efdb49..50a8c73caf97 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
| @@ -1326,8 +1326,7 @@ void neigh_parms_destroy(struct neigh_parms *parms) | |||
| 1326 | kfree(parms); | 1326 | kfree(parms); |
| 1327 | } | 1327 | } |
| 1328 | 1328 | ||
| 1329 | 1329 | void neigh_table_init_no_netlink(struct neigh_table *tbl) | |
| 1330 | void neigh_table_init(struct neigh_table *tbl) | ||
| 1331 | { | 1330 | { |
| 1332 | unsigned long now = jiffies; | 1331 | unsigned long now = jiffies; |
| 1333 | unsigned long phsize; | 1332 | unsigned long phsize; |
| @@ -1383,10 +1382,27 @@ void neigh_table_init(struct neigh_table *tbl) | |||
| 1383 | 1382 | ||
| 1384 | tbl->last_flush = now; | 1383 | tbl->last_flush = now; |
| 1385 | tbl->last_rand = now + tbl->parms.reachable_time * 20; | 1384 | tbl->last_rand = now + tbl->parms.reachable_time * 20; |
| 1385 | } | ||
| 1386 | |||
| 1387 | void neigh_table_init(struct neigh_table *tbl) | ||
| 1388 | { | ||
| 1389 | struct neigh_table *tmp; | ||
| 1390 | |||
| 1391 | neigh_table_init_no_netlink(tbl); | ||
| 1386 | write_lock(&neigh_tbl_lock); | 1392 | write_lock(&neigh_tbl_lock); |
| 1393 | for (tmp = neigh_tables; tmp; tmp = tmp->next) { | ||
| 1394 | if (tmp->family == tbl->family) | ||
| 1395 | break; | ||
| 1396 | } | ||
| 1387 | tbl->next = neigh_tables; | 1397 | tbl->next = neigh_tables; |
| 1388 | neigh_tables = tbl; | 1398 | neigh_tables = tbl; |
| 1389 | write_unlock(&neigh_tbl_lock); | 1399 | write_unlock(&neigh_tbl_lock); |
| 1400 | |||
| 1401 | if (unlikely(tmp)) { | ||
| 1402 | printk(KERN_ERR "NEIGH: Registering multiple tables for " | ||
| 1403 | "family %d\n", tbl->family); | ||
| 1404 | dump_stack(); | ||
| 1405 | } | ||
| 1390 | } | 1406 | } |
| 1391 | 1407 | ||
| 1392 | int neigh_table_clear(struct neigh_table *tbl) | 1408 | int neigh_table_clear(struct neigh_table *tbl) |
| @@ -2657,6 +2673,7 @@ EXPORT_SYMBOL(neigh_rand_reach_time); | |||
| 2657 | EXPORT_SYMBOL(neigh_resolve_output); | 2673 | EXPORT_SYMBOL(neigh_resolve_output); |
| 2658 | EXPORT_SYMBOL(neigh_table_clear); | 2674 | EXPORT_SYMBOL(neigh_table_clear); |
| 2659 | EXPORT_SYMBOL(neigh_table_init); | 2675 | EXPORT_SYMBOL(neigh_table_init); |
| 2676 | EXPORT_SYMBOL(neigh_table_init_no_netlink); | ||
| 2660 | EXPORT_SYMBOL(neigh_update); | 2677 | EXPORT_SYMBOL(neigh_update); |
| 2661 | EXPORT_SYMBOL(neigh_update_hhs); | 2678 | EXPORT_SYMBOL(neigh_update_hhs); |
| 2662 | EXPORT_SYMBOL(pneigh_enqueue); | 2679 | EXPORT_SYMBOL(pneigh_enqueue); |
