Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Apr 2012 10:41:11 -0700
From:      Qing Li <qingli@freebsd.org>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r233773 - head/usr.sbin/arp
Message-ID:  <CAGnGRdJkbvQw2KpcWQxBrgS%2B21ZgWweOp79xFz_30iSXCXY6WQ@mail.gmail.com>
In-Reply-To: <201204021044.q32AiPng094511@svn.freebsd.org>
References:  <201204021044.q32AiPng094511@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <glebius@freebsd.org> 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) ||



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGnGRdJkbvQw2KpcWQxBrgS%2B21ZgWweOp79xFz_30iSXCXY6WQ>