diff options
author | qingli <qingli@FreeBSD.org> | 2009-05-20 21:07:15 +0000 |
---|---|---|
committer | qingli <qingli@FreeBSD.org> | 2009-05-20 21:07:15 +0000 |
commit | e6b86b7c8fc96c72c1f5df5a94c60e96783ecaac (patch) | |
tree | 3c5f22922fbf16f4da56611f23479ce79b4deb12 /sys/net/if_llatbl.c | |
parent | 803ffe40e141533bd4dd2d51a0c7bd977f855ee7 (diff) | |
download | FreeBSD-src-e6b86b7c8fc96c72c1f5df5a94c60e96783ecaac.zip FreeBSD-src-e6b86b7c8fc96c72c1f5df5a94c60e96783ecaac.tar.gz |
When an interface address is removed and the last prefix
route is also being deleted, the link-layer address table
(arp or nd6) will flush those L2 llinfo entries that match
the removed prefix.
Reviewed by: kmacy
Diffstat (limited to 'sys/net/if_llatbl.c')
-rw-r--r-- | sys/net/if_llatbl.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c index 7ef1c9a..b5da1ea 100644 --- a/sys/net/if_llatbl.c +++ b/sys/net/if_llatbl.c @@ -195,6 +195,23 @@ lltable_drain(int af) IFNET_RUNLOCK(); } +void +lltable_prefix_free(int af, struct sockaddr *prefix, struct sockaddr *mask) +{ + struct lltable *llt; + + IFNET_RLOCK(); + SLIST_FOREACH(llt, &lltables, llt_link) { + if (llt->llt_af != af) + continue; + + llt->llt_prefix_free(llt, prefix, mask); + } + IFNET_RUNLOCK(); +} + + + /* * Create a new lltable. */ |