diff options
author | Qing Li <qingli@FreeBSD.org> | 2011-05-20 19:12:20 +0000 |
---|---|---|
committer | Qing Li <qingli@FreeBSD.org> | 2011-05-20 19:12:20 +0000 |
commit | 5b84dc789a31a30200b8d7292752ef3b447a74e9 (patch) | |
tree | 25e7bd536a80b8bf826cad648267e4078b9e4f2e /sys/net | |
parent | 7ba75dc4e9abb4f4ae2230d34381d50152c2342e (diff) | |
download | src-5b84dc789a31a30200b8d7292752ef3b447a74e9.tar.gz src-5b84dc789a31a30200b8d7292752ef3b447a74e9.zip |
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
Notes
Notes:
svn path=/head/; revision=222143
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 910d366059dc..b19a0a4cab43 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 9ed09f437d59..1f30f37bafc2 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 |