From owner-svn-src-all@FreeBSD.ORG Sun Apr 8 17:41:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5CEA106564A; Sun, 8 Apr 2012 17:41:13 +0000 (UTC) (envelope-from tomelite82@gmail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id E4D168FC0A; Sun, 8 Apr 2012 17:41:12 +0000 (UTC) Received: by wgbds12 with SMTP id ds12so3595769wgb.31 for ; Sun, 08 Apr 2012 10:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=wLcEMJw0VxY9Xcd2HScITA2cZXBxFeDoLb7lvNLYyko=; b=hd2bz91NX4VwpGqpvK5nO3Q0diEDpnHZ5Nlrl/EjJxCVMbSlrBeNacXKKJPBXFU376 lcjNYIbNCcgXcVgfJP6nEx1uvpwqhiESwozFI8mDKHBrkl99Pz49qMMNM7Y1Lgge8JB7 oKMaDnIvM/BbCJ+w7aKQnZX3a51/DF0iyFHrxAIXdEl/zZQJi0xqtrgj+7Zvyv0h61oZ ygFwmGKzl1lFfZEoDCZmelFE6MswaGudw/LeVweU9ehiuJGnUoZvBgA9GF5FeVpEPH3e NHnUtXxVRBDPXBQteFHqUZ3jYSzVy/fvlQLa8FGOuPL8+MJl3Mb4tj2Np7GnpaaFWYZD FqnQ== MIME-Version: 1.0 Received: by 10.180.96.228 with SMTP id dv4mr10409278wib.14.1333906871897; Sun, 08 Apr 2012 10:41:11 -0700 (PDT) Sender: tomelite82@gmail.com Received: by 10.223.70.129 with HTTP; Sun, 8 Apr 2012 10:41:11 -0700 (PDT) In-Reply-To: <201204021044.q32AiPng094511@svn.freebsd.org> References: <201204021044.q32AiPng094511@svn.freebsd.org> Date: Sun, 8 Apr 2012 10:41:11 -0700 X-Google-Sender-Auth: O7ircPowpX5Q7ajkXVeOZO4cLhQ Message-ID: From: Qing Li To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r233773 - head/usr.sbin/arp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Apr 2012 17:41:14 -0000 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 wrote: > Author: glebius > Date: Mon Apr =A02 10:44:25 2012 > New Revision: 233773 > URL: http://svn.freebsd.org/changeset/base/233773 > > Log: > =A0Historically arp(8) did a route lookup for the entry it is > =A0about to add, and failed if it exist and had invalid data > =A0link type. > > =A0Later on, in r201282, this check morphed to other code, but > =A0message "proxy entry exists for non 802 device" still left, > =A0and now it is printed in a case if route prefix found is > =A0equal to current address being added. In other words, when > =A0we are trying to add ARP entry for a network address. The > =A0message is absolutely unrelated and disappointing in this > =A0case. > > =A0I don't see anything bad with setting ARP entries for > =A0network addresses. While useless in usual network, > =A0in a /31 RFC3021 it may be necessary. This, remove this code. > > Modified: > =A0head/usr.sbin/arp/arp.c > > Modified: head/usr.sbin/arp/arp.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/arp/arp.c =A0 =A0 Mon Apr =A02 10:24:50 2012 =A0 =A0 = =A0 =A0(r233772) > +++ head/usr.sbin/arp/arp.c =A0 =A0 Mon Apr =A02 10:44:25 2012 =A0 =A0 = =A0 =A0(r233773) > @@ -387,10 +387,6 @@ set(int argc, char **argv) > =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0addr =3D (struct sockaddr_inarp *)(rtm + 1); > =A0 =A0 =A0 =A0sdl =3D (struct sockaddr_dl *)(SA_SIZE(addr) + (char *)add= r); > - =A0 =A0 =A0 if (addr->sin_addr.s_addr =3D=3D dst->sin_addr.s_addr) { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 printf("set: proxy entry exists for non 802= device\n"); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 return (1); > - =A0 =A0 =A0 } > > =A0 =A0 =A0 =A0if ((sdl->sdl_family !=3D AF_LINK) || > =A0 =A0 =A0 =A0 =A0 =A0(rtm->rtm_flags & RTF_GATEWAY) ||