From owner-freebsd-net@FreeBSD.ORG Mon Dec 22 09:40:27 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADD85106564A; Mon, 22 Dec 2008 09:40:27 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 521398FC18; Mon, 22 Dec 2008 09:40:27 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=OITeQaCtT1SeEV8F+fItK7h9Vz1HqeHUOze9pGFwjulO1rUqZz3KghSGwqBXQbuEKcfwR4agbeH6A2V1CbQ1PkEdvLbQ/iiAI4f3Yng8Shr4arRJ2AzctP8d47O+tvlqhrzoa1iNEg53pdIiPxDB58Duy2XC1SudjV+bBLamfOs=; Received: from shadow.pikenet.ru (school.pikenet.ru [85.30.229.242]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1LEhGv-000HAE-6R; Mon, 22 Dec 2008 12:40:22 +0300 Date: Mon, 22 Dec 2008 12:40:17 +0300 From: Eygene Ryabinkin To: freebsd-current@freebsd.org, freebsd-net@freebsd.org Message-ID: References: <20081221125120.GO23166@droso.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ctP54qlpMx3WjD+/" Content-Disposition: inline In-Reply-To: Sender: rea-fbsd@codelabs.ru Cc: Gerald Pfeifer , Vladimir Grebenschikov , Kip Macy , Qing Li , Ian FREISLICH , Erwin Lansing Subject: Re: HEADSUP: arp-v2 has been committed X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 09:40:27 -0000 --ctP54qlpMx3WjD+/ Content-Type: multipart/mixed; boundary="kORqDWCi7qDJ0mEj" Content-Disposition: inline --kORqDWCi7qDJ0mEj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings! Mon, Dec 22, 2008 at 10:04:22AM +0200, Ian FREISLICH wrote: > Erwin Lansing wrote: > > > RTF_WASCLONE and RTF_LLINFO routing flags. The userland application= s=20 > > > such as "arp" and "ndp" have been modified to reflect those changes. > > > so I guess it's not so easy. =20 > > > How many other ports are affected? > > The latest full run with HEAD from a few days back hasn't quite finished > > yet, so there might turn up a few more, but so far it's just a handful: > > net/libdnet > > devel/libpdel > > net-mgmt/net-snmp > > net/netwib > > net/p5-Net-RawIP > > net-mgmt/net-snmp4 > > emulators/wine > > You can add net/quagga to that list as well. net/openospfd is also affected. Attached is the simple patch to take into account the withdrawal of RTF_LLINFO. Perhaps something else should be done -- I'll up some -CURRENT systems and will try to test the Real Stuff (TM). --=20 Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual =20 )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook=20 {_.-``-' {_/ # --kORqDWCi7qDJ0mEj Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="Fix-usage-of-RTF_LLINFO-due-to-the-ARP-v2-changes.diff" Content-Transfer-Encoding: quoted-printable =46rom 1138f09b72a42ddb7b35780da0e51a0b378bea1b Mon Sep 17 00:00:00 2001 =46rom: Eygene Ryabinkin Date: Mon, 22 Dec 2008 12:13:13 +0300 Subject: [PATCH] Fix usage of RTF_LLINFO due to the ARP-v2 changes ARP-v2, commited in SVN rev 186119, eliminated RTF_WASCLONE, RTF_CLONING and RTF_LLINFO, http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/net/route.h?rev=3D1.77 The latter flag was used in OpenOSPFD to skip ARP entries from the routing table. We're just conditionalizing the code on the existence of RTF_LLINFO variable. Perhaps checking __FreeBSD__ value will be better: errors due to the non-included net/route.h won't be spotted in the former case. But since many RTF_* constants are used in kroute.c, this shouldn't be a problem, at least now. Signed-off-by: Eygene Ryabinkin --- ospfd/kroute.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/ospfd/kroute.c b/ospfd/kroute.c index b46fa30..acc2a32 100644 --- a/ospfd/kroute.c +++ b/ospfd/kroute.c @@ -1174,8 +1174,10 @@ fetchtable(void) if ((sa =3D rti_info[RTAX_DST]) =3D=3D NULL) continue; =20 +#if defined(RTF_LLINFO) /* FreeBSD dropped RTF_LLINFO after ARP-v2 rework = */ if (rtm->rtm_flags & RTF_LLINFO) /* arp cache */ continue; +#endif /* defined(RTF_LLINFO) */ =20 if ((kr =3D calloc(1, sizeof(struct kroute_node))) =3D=3D NULL) { log_warn("fetchtable"); @@ -1371,8 +1373,10 @@ dispatch_rtmsg(void) if (rtm->rtm_errno) /* failed attempts... */ continue; =20 +#if defined(RTF_LLINFO) /* FreeBSD dropped RTF_LLINFO after ARP-v2 rework = */ if (rtm->rtm_flags & RTF_LLINFO) /* arp cache */ continue; +#endif /* defined(RTF_LLINFO) */ =20 #ifdef RTF_MPATH if (rtm->rtm_flags & RTF_MPATH) --=20 1.6.0.4 --kORqDWCi7qDJ0mEj-- --ctP54qlpMx3WjD+/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAklPYIAACgkQthUKNsbL7YhAiACfULidRafQfojEhiDMPMW16RNU XEoAn3x552kwJuoC2fkqaaAk8ASLK3u2 =pjPd -----END PGP SIGNATURE----- --ctP54qlpMx3WjD+/--