Hi, On Sun, May 1, 2011 at 10:50 PM, Li, Qing <qing...@bluecoat.com> wrote: > jeez, this bug has been around for quite a while ... > > Please try patch at http://people.freebsd.org/~qingli/arp.patch > d'oh!... Concerning Ingo's bug, your patch do the job, my report was bad, 4.9-RELEASE and 7.x show the same behavior:
# uname -a FreeBSD server 7.1-RELEASE-p13 FreeBSD 7.1-RELEASE-p13 # ifconfig em0 up 192.168.45.200/24 # arp -n 192.168.45.200 ? (192.168.45.200) at 00:03:2d:16:6e:fc on em0 permanent [ethernet] # ifconfig em0 down # arp -n 192.168.45.200 192.168.45.200 (192.168.45.200) -- no entry # ifconfig em0 up # arp -n 192.168.45.200 192.168.45.200 (192.168.45.200) -- no entry The behavioral change I noticed is that permanent address (manually added) in the ARP table are flushed along with all other addresses on >8.x (cf. the script output of my previous mail) while they are kept in the cache on <7.x during a down/up transition. The following patch: diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 1012012..27e44a2 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -1372,6 +1372,8 @@ in_lltable_prefix_free(struct lltable *llt, for (i=0; i < LLTBL_HASHTBL_SIZE; i++) { LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) { + if (lle->la_flags & LLE_STATIC) + continue; if (IN_ARE_MASKED_ADDR_EQUAL((struct sockaddr_in *)L3_ADDR(lle), pfx, msk)) { partially restores the old behavior. Only partially as before 8.x, interface addresses were not marked as 'permanent'. You could manually add a 'permanent' entry for this address in such a way it would survive the down/up transition. In 8.x, the interface address is marked as 'permanent', but is removed explicitly by arp_ifscrub(). So even the above change would not work for the interface address. Shouldn't this address be removed later when "removing all L2 entries on the given prefix", in which case it would not have to be re-added again, if marking it 'permanent' is deliberate ? Thanks, - Arnaud _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"