diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-06-28 18:50:38 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-06-28 18:50:38 +0000 |
commit | 22b0156759c053e251b29ef230ddf75b9e45d9f4 (patch) | |
tree | 58fbb22339399962bcb296ceb830e2d267c226a7 /sys/netinet | |
parent | f668ba96c8a5c3248f9ce4db53f92c7ef8e16f9c (diff) |
Add the rtable id as an argument to rn_walktree(). Functions like
rt_if_remove_rtdelete() need to know the table id to be able to correctly
remove nodes.
Problem found by Andrea Parazzini and analyzed by Martin Pelikán.
OK henning@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/if_ether.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index b0990f0851e..1de611baca5 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.c,v 1.86 2010/05/07 13:33:16 claudio Exp $ */ +/* $OpenBSD: if_ether.c,v 1.87 2010/06/28 18:50:37 claudio Exp $ */ /* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */ /* @@ -105,7 +105,7 @@ struct ifnet *myip_ifp; void db_print_sa(struct sockaddr *); void db_print_ifa(struct ifaddr *); void db_print_llinfo(caddr_t); -int db_show_radix_node(struct radix_node *, void *); +int db_show_radix_node(struct radix_node *, void *, u_int); #endif /* @@ -1106,16 +1106,14 @@ db_print_llinfo(li) * Return non-zero error to abort walk. */ int -db_show_radix_node(rn, w) - struct radix_node *rn; - void *w; +db_show_radix_node(struct radix_node *rn, void *w, u_int id) { struct rtentry *rt = (struct rtentry *)rn; db_printf("rtentry=%p", rt); - db_printf(" flags=0x%x refcnt=%d use=%ld expire=%ld\n", - rt->rt_flags, rt->rt_refcnt, rt->rt_use, rt->rt_expire); + db_printf(" flags=0x%x refcnt=%d use=%ld expire=%ld rtableid %u\n", + rt->rt_flags, rt->rt_refcnt, rt->rt_use, rt->rt_expire, id); db_printf(" key="); db_print_sa(rt_key(rt)); db_printf(" mask="); db_print_sa(rt_mask(rt)); @@ -1142,7 +1140,7 @@ db_show_radix_node(rn, w) * Use this from ddb: "call db_show_arptab" */ int -db_show_arptab() +db_show_arptab(void) { struct radix_node_head *rnh; rnh = rt_gettable(AF_INET, 0); |