diff options
author | qingli <qingli@FreeBSD.org> | 2011-05-20 19:12:20 +0000 |
---|---|---|
committer | qingli <qingli@FreeBSD.org> | 2011-05-20 19:12:20 +0000 |
commit | a1bf1a258207345435ea10acd5842a3edd836a66 (patch) | |
tree | 25e7bd536a80b8bf826cad648267e4078b9e4f2e /sys/net | |
parent | 8b344f95a5795eba597f19d5c6b1516c99bb2fa9 (diff) | |
download | FreeBSD-src-a1bf1a258207345435ea10acd5842a3edd836a66.zip FreeBSD-src-a1bf1a258207345435ea10acd5842a3edd836a66.tar.gz |
The statically configured (permanent) ARP entries are removed when an
interface is brought down, even though the interface address is still
valid. This patch maintains the permanent ARP entries as long as the
interface address (having the same prefix as that of the ARP entries)
is valid.
Reviewed by: delphij
MFC after: 5 days
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_llatbl.c | 5 | ||||
-rw-r--r-- | sys/net/if_llatbl.h | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c index 910d366..b19a0a4 100644 --- a/sys/net/if_llatbl.c +++ b/sys/net/if_llatbl.c @@ -228,7 +228,8 @@ lltable_drain(int af) #endif void -lltable_prefix_free(int af, struct sockaddr *prefix, struct sockaddr *mask) +lltable_prefix_free(int af, struct sockaddr *prefix, struct sockaddr *mask, + u_int flags) { struct lltable *llt; @@ -237,7 +238,7 @@ lltable_prefix_free(int af, struct sockaddr *prefix, struct sockaddr *mask) if (llt->llt_af != af) continue; - llt->llt_prefix_free(llt, prefix, mask); + llt->llt_prefix_free(llt, prefix, mask, flags); } LLTABLE_RUNLOCK(); } diff --git a/sys/net/if_llatbl.h b/sys/net/if_llatbl.h index 9ed09f4..1f30f37 100644 --- a/sys/net/if_llatbl.h +++ b/sys/net/if_llatbl.h @@ -155,7 +155,8 @@ struct lltable { void (*llt_free)(struct lltable *, struct llentry *); void (*llt_prefix_free)(struct lltable *, const struct sockaddr *prefix, - const struct sockaddr *mask); + const struct sockaddr *mask, + u_int flags); struct llentry * (*llt_lookup)(struct lltable *, u_int flags, const struct sockaddr *l3addr); int (*llt_rtcheck)(struct ifnet *, u_int flags, @@ -184,7 +185,7 @@ MALLOC_DECLARE(M_LLTABLE); struct lltable *lltable_init(struct ifnet *, int); void lltable_free(struct lltable *); void lltable_prefix_free(int, struct sockaddr *, - struct sockaddr *); + struct sockaddr *, u_int); #if 0 void lltable_drain(int); #endif |