Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Dec 2008 12:40:17 +0300
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        freebsd-current@freebsd.org, freebsd-net@freebsd.org
Cc:        Gerald Pfeifer <gerald@pfeifer.com>, Vladimir Grebenschikov <vova@fbsd.ru>, Kip Macy <kip.macy@gmail.com>, Qing Li <qingli@freebsd.org>, Ian FREISLICH <ianf@clue.co.za>
Subject:   Re: HEADSUP: arp-v2 has been committed
Message-ID:  <rqtxfXiOI/zU%2BmZivn3AictW17c@TVy1gMAmSsiP9GTg//ziIjLy%2Bsk>
In-Reply-To: <E1LEfm2-000BPk-Rs@clue.co.za>
References:  <20081221125120.GO23166@droso.net> <E1LEfm2-000BPk-Rs@clue.co.za>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <erwin@freebsd.org> 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 <rea-fbsd@codelabs.ru>
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 <rea-fbsd@codelabs.ru>
---
 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+/--



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