From 1138f09b72a42ddb7b35780da0e51a0b378bea1b Mon Sep 17 00:00:00 2001 From: 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=1.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 = rti_info[RTAX_DST]) == NULL) continue; +#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) */ if ((kr = calloc(1, sizeof(struct kroute_node))) == NULL) { log_warn("fetchtable"); @@ -1371,8 +1373,10 @@ dispatch_rtmsg(void) if (rtm->rtm_errno) /* failed attempts... */ continue; +#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) */ #ifdef RTF_MPATH if (rtm->rtm_flags & RTF_MPATH) -- 1.6.0.4