svn commit: r185914 - in projects/arpv2_merge_1:
contrib/ipfilter/ipsend libexec/bootpd sbin/route sbin/routed
usr.bin/netstat usr.sbin/arp usr.sbin/ndp usr.sbin/ppp
usr.sbin/route6d
Kip Macy
kmacy at FreeBSD.org
Wed Dec 10 22:57:28 PST 2008
Author: kmacy
Date: Thu Dec 11 06:57:27 2008
New Revision: 185914
URL: http://svn.freebsd.org/changeset/base/185914
Log:
remove references to RTF_{LLINFO,CLONING,WASCLONED} in all user tools except bsnmpd
with questions where appropriate
Modified:
projects/arpv2_merge_1/contrib/ipfilter/ipsend/44arp.c
projects/arpv2_merge_1/libexec/bootpd/rtmsg.c
projects/arpv2_merge_1/sbin/route/route.c
projects/arpv2_merge_1/sbin/routed/table.c
projects/arpv2_merge_1/usr.bin/netstat/route.c
projects/arpv2_merge_1/usr.sbin/arp/arp.c
projects/arpv2_merge_1/usr.sbin/ndp/ndp.c
projects/arpv2_merge_1/usr.sbin/ppp/route.c
projects/arpv2_merge_1/usr.sbin/route6d/route6d.c
Modified: projects/arpv2_merge_1/contrib/ipfilter/ipsend/44arp.c
==============================================================================
--- projects/arpv2_merge_1/contrib/ipfilter/ipsend/44arp.c Thu Dec 11 06:55:01 2008 (r185913)
+++ projects/arpv2_merge_1/contrib/ipfilter/ipsend/44arp.c Thu Dec 11 06:57:27 2008 (r185914)
@@ -88,7 +88,12 @@ char *addr, *eaddr;
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) == -1)
{
perror("route-sysctl-estimate");
Modified: projects/arpv2_merge_1/libexec/bootpd/rtmsg.c
==============================================================================
--- projects/arpv2_merge_1/libexec/bootpd/rtmsg.c Thu Dec 11 06:55:01 2008 (r185913)
+++ projects/arpv2_merge_1/libexec/bootpd/rtmsg.c Thu Dec 11 06:57:27 2008 (r185914)
@@ -152,7 +152,13 @@ tryagain:
sdl = (struct sockaddr_dl *)(sin->sin_len + (char *)sin);
if (sin->sin_addr.s_addr == sin_m.sin_addr.s_addr) {
if (sdl->sdl_family == AF_LINK &&
+#if 0
+ /*
+ * XXX Qing - what should be here?
+ *
+ */
(rtm->rtm_flags & RTF_LLINFO) &&
+#endif
!(rtm->rtm_flags & RTF_GATEWAY)) switch (sdl->sdl_type) {
case IFT_ETHER: case IFT_FDDI: case IFT_ISO88023:
case IFT_ISO88024: case IFT_ISO88025:
Modified: projects/arpv2_merge_1/sbin/route/route.c
==============================================================================
--- projects/arpv2_merge_1/sbin/route/route.c Thu Dec 11 06:55:01 2008 (r185913)
+++ projects/arpv2_merge_1/sbin/route/route.c Thu Dec 11 06:57:27 2008 (r185914)
@@ -605,9 +605,6 @@ newroute(argc, argv)
case K_NOSTATIC:
flags &= ~RTF_STATIC;
break;
- case K_LLINFO:
- flags |= RTF_LLINFO;
- break;
case K_LOCK:
locking = 1;
break;
@@ -632,9 +629,6 @@ newroute(argc, argv)
case K_PROXY:
proxy = 1;
break;
- case K_CLONING:
- flags |= RTF_CLONING;
- break;
case K_XRESOLVE:
flags |= RTF_XRESOLVE;
break;
Modified: projects/arpv2_merge_1/sbin/routed/table.c
==============================================================================
--- projects/arpv2_merge_1/sbin/routed/table.c Thu Dec 11 06:55:01 2008 (r185913)
+++ projects/arpv2_merge_1/sbin/routed/table.c Thu Dec 11 06:57:27 2008 (r185914)
@@ -1106,9 +1106,11 @@ flush_kern(void)
/* ignore ARP table entries on systems with a merged route
* and ARP table.
*/
+#if defined(RTF_LLINFO)
if (rtm->rtm_flags & RTF_LLINFO)
continue;
-
+#endif
+
#if defined(RTF_WASCLONED) && defined(__FreeBSD__)
/* ignore cloned routes
*/
@@ -1260,12 +1262,12 @@ read_rt(void)
trace_act("ignore multicast %s", str);
continue;
}
-
+#if defined(RTF_LLINFO)
if (m.r.rtm.rtm_flags & RTF_LLINFO) {
trace_act("ignore ARP %s", str);
continue;
}
-
+#endif
#if defined(RTF_WASCLONED) && defined(__FreeBSD__)
if (m.r.rtm.rtm_flags & RTF_WASCLONED) {
trace_act("ignore cloned %s", str);
Modified: projects/arpv2_merge_1/usr.bin/netstat/route.c
==============================================================================
--- projects/arpv2_merge_1/usr.bin/netstat/route.c Thu Dec 11 06:55:01 2008 (r185913)
+++ projects/arpv2_merge_1/usr.bin/netstat/route.c Thu Dec 11 06:57:27 2008 (r185914)
@@ -89,17 +89,23 @@ struct bits {
{ RTF_DYNAMIC, 'D' },
{ RTF_MODIFIED, 'M' },
{ RTF_DONE, 'd' }, /* Completed -- for routing messages only */
- { RTF_CLONING, 'C' },
{ RTF_XRESOLVE, 'X' },
- { RTF_LLINFO, 'L' },
{ RTF_STATIC, 'S' },
{ RTF_PROTO1, '1' },
{ RTF_PROTO2, '2' },
- { RTF_WASCLONED,'W' },
{ RTF_PRCLONING,'c' },
{ RTF_PROTO3, '3' },
{ RTF_BLACKHOLE,'B' },
{ RTF_BROADCAST,'b' },
+#ifdef RTF_LLINFO
+ { RTF_LLINFO, 'L' },
+#endif
+#ifdef RTF_WASCLONED
+ { RTF_WASCLONED,'W' },
+#endif
+#ifdef RTF_CLONING
+ { RTF_CLONING, 'C' },
+#endif
{ 0 , 0 }
};
@@ -316,23 +322,12 @@ static void
size_cols_rtentry(struct rtentry *rt)
{
static struct ifnet ifnet, *lastif;
- struct rtentry parent;
static char buffer[100];
const char *bp;
struct sockaddr *sa;
sa_u addr, mask;
int len;
- /*
- * Don't print protocol-cloned routes unless -a.
- */
- if (rt->rt_flags & RTF_WASCLONED && !aflag) {
- if (kget(rt->rt_parent, parent) != 0)
- return;
- if (parent.rt_flags & RTF_PRCLONING)
- return;
- }
-
bzero(&addr, sizeof(addr));
if ((sa = kgetsa(rt_key(rt))))
bcopy(sa, &addr, sa->sa_len);
@@ -761,22 +756,11 @@ static void
p_rtentry(struct rtentry *rt)
{
static struct ifnet ifnet, *lastif;
- struct rtentry parent;
static char buffer[128];
static char prettyname[128];
struct sockaddr *sa;
sa_u addr, mask;
- /*
- * Don't print protocol-cloned routes unless -a.
- */
- if (rt->rt_flags & RTF_WASCLONED && !aflag) {
- if (kget(rt->rt_parent, parent) != 0)
- return;
- if (parent.rt_flags & RTF_PRCLONING)
- return;
- }
-
bzero(&addr, sizeof(addr));
if ((sa = kgetsa(rt_key(rt))))
bcopy(sa, &addr, sa->sa_len);
Modified: projects/arpv2_merge_1/usr.sbin/arp/arp.c
==============================================================================
--- projects/arpv2_merge_1/usr.sbin/arp/arp.c Thu Dec 11 06:55:01 2008 (r185913)
+++ projects/arpv2_merge_1/usr.sbin/arp/arp.c Thu Dec 11 06:57:27 2008 (r185914)
@@ -370,7 +370,13 @@ set(int argc, char **argv)
if (addr->sin_addr.s_addr != dst->sin_addr.s_addr)
break;
if (sdl->sdl_family == AF_LINK &&
+#if 0
+ /*
+ * XXX Qing - how should this be handled?
+ *
+ */
(rtm->rtm_flags & RTF_LLINFO) &&
+#endif
!(rtm->rtm_flags & RTF_GATEWAY) &&
valid_type(sdl->sdl_type) )
break;
@@ -441,7 +447,13 @@ delete(char *host, int do_proxy)
sdl = (struct sockaddr_dl *)(SA_SIZE(addr) + (char *)addr);
if (addr->sin_addr.s_addr == dst->sin_addr.s_addr &&
sdl->sdl_family == AF_LINK &&
+#if 0
+ /*
+ * XXX Qing - how should this be handled?
+ *
+ */
(rtm->rtm_flags & RTF_LLINFO) &&
+#endif
!(rtm->rtm_flags & RTF_GATEWAY) &&
valid_type(sdl->sdl_type) )
break; /* found it */
@@ -490,7 +502,11 @@ search(u_long addr, action_fn *action)
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)
err(1, "route-sysctl-estimate");
if (needed == 0) /* empty table */
Modified: projects/arpv2_merge_1/usr.sbin/ndp/ndp.c
==============================================================================
--- projects/arpv2_merge_1/usr.sbin/ndp/ndp.c Thu Dec 11 06:55:01 2008 (r185913)
+++ projects/arpv2_merge_1/usr.sbin/ndp/ndp.c Thu Dec 11 06:57:27 2008 (r185914)
@@ -612,7 +612,11 @@ again:;
mib[2] = 0;
mib[3] = AF_INET6;
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)
err(1, "sysctl(PF_ROUTE estimate)");
if (needed > 0) {
Modified: projects/arpv2_merge_1/usr.sbin/ppp/route.c
==============================================================================
--- projects/arpv2_merge_1/usr.sbin/ppp/route.c Thu Dec 11 06:55:01 2008 (r185913)
+++ projects/arpv2_merge_1/usr.sbin/ppp/route.c Thu Dec 11 06:57:27 2008 (r185914)
@@ -157,13 +157,18 @@ static struct bits {
{ RTF_DYNAMIC, 'D' },
{ RTF_MODIFIED, 'M' },
{ RTF_DONE, 'd' },
- { RTF_CLONING, 'C' },
{ RTF_XRESOLVE, 'X' },
- { RTF_LLINFO, 'L' },
- { RTF_STATIC, 'S' },
+ { RTF_STATIC, 'S' },
{ RTF_PROTO1, '1' },
{ RTF_PROTO2, '2' },
{ RTF_BLACKHOLE, 'B' },
+
+#ifdef RTF_LLINFO
+ { RTF_LLINFO, 'L' },
+#endif
+#ifdef RTF_CLONING
+ { RTF_CLONING, 'C' },
+#endif
#ifdef RTF_WASCLONED
{ RTF_WASCLONED, 'W' },
#endif
Modified: projects/arpv2_merge_1/usr.sbin/route6d/route6d.c
==============================================================================
--- projects/arpv2_merge_1/usr.sbin/route6d/route6d.c Thu Dec 11 06:55:01 2008 (r185913)
+++ projects/arpv2_merge_1/usr.sbin/route6d/route6d.c Thu Dec 11 06:57:27 2008 (r185914)
@@ -1752,7 +1752,6 @@ rtrecv()
continue;
case RTM_LOSING:
case RTM_MISS:
- case RTM_RESOLVE:
case RTM_GET:
case RTM_LOCK:
/* nothing to be done here */
@@ -1790,7 +1789,6 @@ rtrecv()
case RTM_ADD:
case RTM_LOSING:
case RTM_MISS:
- case RTM_RESOLVE:
case RTM_GET:
case RTM_LOCK:
/* should already be handled */
@@ -2141,10 +2139,7 @@ ifrt(ifcp, again)
rrt->rrt_info.rip6_tag = htons(routetag & 0xffff);
rrt->rrt_info.rip6_metric = 1 + ifcp->ifc_metric;
rrt->rrt_info.rip6_plen = ifa->ifa_plen;
- if (ifa->ifa_plen == 128)
- rrt->rrt_flags = RTF_HOST;
- else
- rrt->rrt_flags = RTF_CLONING;
+ rrt->rrt_flags = RTF_HOST;
rrt->rrt_rflags |= RRTF_CHANGED;
applyplen(&rrt->rrt_info.rip6_dest, ifa->ifa_plen);
memset(&rrt->rrt_gw, 0, sizeof(struct in6_addr));
@@ -2433,7 +2428,6 @@ do { \
RTTYPE("LOCK", RTM_LOCK);
RTTYPE("OLDADD", RTM_OLDADD);
RTTYPE("OLDDEL", RTM_OLDDEL);
- RTTYPE("RESOLVE", RTM_RESOLVE);
RTTYPE("NEWADDR", RTM_NEWADDR);
RTTYPE("DELADDR", RTM_DELADDR);
RTTYPE("IFINFO", RTM_IFINFO);
@@ -2484,7 +2478,9 @@ do { \
#ifdef RTF_MASK
RTFLAG("m", RTF_MASK);
#endif
+#ifdef RTF_CLONING
RTFLAG("C", RTF_CLONING);
+#endif
#ifdef RTF_CLONED
RTFLAG("c", RTF_CLONED);
#endif
@@ -2495,7 +2491,9 @@ do { \
RTFLAG("W", RTF_WASCLONED);
#endif
RTFLAG("X", RTF_XRESOLVE);
+#ifdef RTF_LLINFO
RTFLAG("L", RTF_LLINFO);
+#endif
RTFLAG("S", RTF_STATIC);
RTFLAG("B", RTF_BLACKHOLE);
#ifdef RTF_PROTO3
@@ -2631,7 +2629,7 @@ rt_entry(rtm, again)
sin6_dst = sin6_gw = sin6_mask = sin6_genmask = sin6_ifp = 0;
if ((rtm->rtm_flags & RTF_UP) == 0 || rtm->rtm_flags &
- (RTF_CLONING|RTF_XRESOLVE|RTF_LLINFO|RTF_BLACKHOLE)) {
+ (RTF_XRESOLVE|RTF_BLACKHOLE)) {
return; /* not interested in the link route */
}
/* do not look at cloned routes */
More information about the svn-src-projects
mailing list