HEADSUP: arp-v2 has been committed
Norikatsu Shigemura
nork at FreeBSD.org
Sun Dec 21 18:16:28 UTC 2008
Hi Kip&Erwin!
On Sun, 21 Dec 2008 13:51:21 +0100
Erwin Lansing <erwin at 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.
-------------- next part --------------
--- 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:
-------------- next part --------------
--- 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;
More information about the freebsd-current
mailing list