This is not the right way to support RFC3021. The code you removed is used for checking against attempt at adding duplicate entry. Both the message and the code apply in that context. I tried to state clearly and concisely what r201282 was intended in solving and was verified by actual users who ran into the described problems.
If we actually need to support RFC 3021, then better do it properly. --Qing On Mon, Apr 2, 2012 at 3:44 AM, Gleb Smirnoff <gleb...@freebsd.org> wrote: > Author: glebius > Date: Mon Apr 2 10:44:25 2012 > New Revision: 233773 > URL: http://svn.freebsd.org/changeset/base/233773 > > Log: > Historically arp(8) did a route lookup for the entry it is > about to add, and failed if it exist and had invalid data > link type. > > Later on, in r201282, this check morphed to other code, but > message "proxy entry exists for non 802 device" still left, > and now it is printed in a case if route prefix found is > equal to current address being added. In other words, when > we are trying to add ARP entry for a network address. The > message is absolutely unrelated and disappointing in this > case. > > I don't see anything bad with setting ARP entries for > network addresses. While useless in usual network, > in a /31 RFC3021 it may be necessary. This, remove this code. > > Modified: > head/usr.sbin/arp/arp.c > > Modified: head/usr.sbin/arp/arp.c > ============================================================================== > --- head/usr.sbin/arp/arp.c Mon Apr 2 10:24:50 2012 (r233772) > +++ head/usr.sbin/arp/arp.c Mon Apr 2 10:44:25 2012 (r233773) > @@ -387,10 +387,6 @@ set(int argc, char **argv) > } > addr = (struct sockaddr_inarp *)(rtm + 1); > sdl = (struct sockaddr_dl *)(SA_SIZE(addr) + (char *)addr); > - if (addr->sin_addr.s_addr == dst->sin_addr.s_addr) { > - printf("set: proxy entry exists for non 802 device\n"); > - return (1); > - } > > if ((sdl->sdl_family != AF_LINK) || > (rtm->rtm_flags & RTF_GATEWAY) || _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"