Date: Fri, 29 Jun 2012 12:05:19 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r237774 - stable/9/usr.sbin/arp Message-ID: <201206291205.q5TC5JIt044472@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Fri Jun 29 12:05:19 2012 New Revision: 237774 URL: http://svn.freebsd.org/changeset/base/237774 Log: Merge r233773 from head: 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: stable/9/usr.sbin/arp/arp.c Directory Properties: stable/9/usr.sbin/arp/ (props changed) Modified: stable/9/usr.sbin/arp/arp.c ============================================================================== --- stable/9/usr.sbin/arp/arp.c Fri Jun 29 10:39:42 2012 (r237773) +++ stable/9/usr.sbin/arp/arp.c Fri Jun 29 12:05:19 2012 (r237774) @@ -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) ||
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206291205.q5TC5JIt044472>