Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Dec 2008 03:16:25 +0900
From:      Norikatsu Shigemura <nork@FreeBSD.org>
To:        "Kip Macy" <kip.macy@gmail.com>, Erwin Lansing <erwin@freebsd.org>
Cc:        Gerald Pfeifer <gerald@pfeifer.com>, Vladimir Grebenschikov <vova@fbsd.ru>, freebsd-net@freebsd.org, Norikatsu Shigemura <nork@FreeBSD.org>, Qing Li <qingli@freebsd.org>, freebsd-current@freebsd.org
Subject:   Re: HEADSUP: arp-v2 has been committed
Message-ID:  <20081222031625.63645f78.nork@FreeBSD.org>
In-Reply-To: <20081221125120.GO23166@droso.net>
References:  <200812150634.mBF6YDVC060565@freefall.freebsd.org> <873agpk11i.fsf@kobe.laptop> <1229691231.1818.53.camel@localhost> <alpine.LSU.1.99.0812210459130.16577@acrux.dbai.tuwien.ac.at> <20081221125120.GO23166@droso.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

--Multipart=_Mon__22_Dec_2008_03_16_25_+0900_71N8EW_ClhzzwbMW
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hi Kip&Erwin!

On Sun, 21 Dec 2008 13:51:21 +0100
Erwin Lansing <erwin@freebsd.org> wrote:
> >   RTF_WASCLONE and RTF_LLINFO routing flags. The userland applications 
> >   such as "arp" and "ndp" have been modified to reflect those changes.
> > so I guess it's not so easy.  
> > 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

	Oh, just time!  I'm having a trouble about this issue of
	devel/libpdel.  So I fixed this issue of devel/libpdel.
	But I don't know that the attached patches are good.
	So please review these.

--Multipart=_Mon__22_Dec_2008_03_16_25_+0900_71N8EW_ClhzzwbMW
Content-Type: text/plain;
 name="patch-net-if_arp.c"
Content-Disposition: attachment;
 filename="patch-net-if_arp.c"
Content-Transfer-Encoding: 7bit

--- net/if_arp.c.orig	2005-01-22 06:02:02.000000000 +0900
+++ net/if_arp.c	2008-12-22 02:49:58.000000000 +0900
@@ -124,7 +124,11 @@
 	mib[2] = 0;
 	mib[3] = AF_INET;
 	mib[4] = NET_RT_FLAGS;
+#ifdef RTF_LLINFO
 	mib[5] = RTF_LLINFO;
+#else
+	mib[5] = 0;
+#endif
 	if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0)
 		return (-1);
 	needed += 128;
@@ -227,9 +231,14 @@
 	sdl = (struct sockaddr_dl *)(void *)
 	    (ROUNDUP(sin->sin_len) + (char *)sin);
 	if (sin->sin_addr.s_addr == sin_m.sin_addr.s_addr) {
+#ifdef RTF_LLINFO
 		if (sdl->sdl_family == AF_LINK
 		    && (rtm->rtm_flags & (RTF_LLINFO|RTF_GATEWAY))
 		      == RTF_LLINFO) {
+#else
+		if (sdl->sdl_family == AF_LINK &&
+		    !(rtm->rtm_flags & RTF_GATEWAY)) {
+#endif
 			switch (sdl->sdl_type) {
 			case IFT_ETHER:
 			case IFT_FDDI:

--Multipart=_Mon__22_Dec_2008_03_16_25_+0900_71N8EW_ClhzzwbMW
Content-Type: text/plain;
 name="patch-net-uroute.c"
Content-Disposition: attachment;
 filename="patch-net-uroute.c"
Content-Transfer-Encoding: 7bit

--- net/uroute.c.orig	2005-01-22 06:02:03.000000000 +0900
+++ net/uroute.c	2008-12-22 02:53:23.000000000 +0900
@@ -74,9 +74,15 @@
 	((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
 #define ADVANCE(x, n)	((x) += ROUNDUP((n)->sa_len))
 
+#ifdef RTF_LLINFO
 #define WRITABLE_FLAGS	(RTF_STATIC | RTF_LLINFO | RTF_REJECT | RTF_BLACKHOLE \
 			    | RTF_PROTO1 | RTF_PROTO2 | RTF_CLONING \
 			    | RTF_XRESOLVE | RTF_UP | RTF_GATEWAY)
+#else
+#define WRITABLE_FLAGS	(RTF_STATIC | RTF_REJECT | RTF_BLACKHOLE \
+			    | RTF_PROTO1 | RTF_PROTO2 | RTF_CLONING \
+			    | RTF_XRESOLVE | RTF_UP | RTF_GATEWAY)
+#endif
 
 struct route_flag {
 	const char	*name;

--Multipart=_Mon__22_Dec_2008_03_16_25_+0900_71N8EW_ClhzzwbMW--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081222031625.63645f78.nork>