From owner-svn-src-head@FreeBSD.ORG Mon Apr 2 10:44:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA213106566C; Mon, 2 Apr 2012 10:44:25 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 958038FC0C; Mon, 2 Apr 2012 10:44:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32AiP0S094513; Mon, 2 Apr 2012 10:44:25 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32AiPng094511; Mon, 2 Apr 2012 10:44:25 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201204021044.q32AiPng094511@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 2 Apr 2012 10:44:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233773 - head/usr.sbin/arp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2012 10:44:25 -0000 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) ||