Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Apr 2014 11:15:50 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r264299 - in stable/10: share/man/man4 share/man/man9 sys/net sys/sys usr.bin/netstat usr.sbin/ppp usr.sbin/route6d
Message-ID:  <201404091115.s39BFoOT090765@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Wed Apr  9 11:15:50 2014
New Revision: 264299
URL: http://svnweb.freebsd.org/changeset/base/264299

Log:
  Merge r263203: garbage collect long time obsoleted (or never used) stuff
  from routing API.

Modified:
  stable/10/share/man/man4/route.4
  stable/10/share/man/man9/rtentry.9
  stable/10/sys/net/iso88025.h
  stable/10/sys/net/route.c
  stable/10/sys/net/route.h
  stable/10/sys/sys/sockio.h
  stable/10/usr.bin/netstat/netstat.1
  stable/10/usr.bin/netstat/route.c
  stable/10/usr.sbin/ppp/route.c
  stable/10/usr.sbin/route6d/route6d.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man4/route.4
==============================================================================
--- stable/10/share/man/man4/route.4	Wed Apr  9 11:10:44 2014	(r264298)
+++ stable/10/share/man/man4/route.4	Wed Apr  9 11:15:50 2014	(r264299)
@@ -196,8 +196,6 @@ Messages include:
 #define	RTM_REDIRECT	0x6    /* Told to use different route */
 #define	RTM_MISS	0x7    /* Lookup failed on this address */
 #define	RTM_LOCK	0x8    /* fix specified metrics */
-#define	RTM_OLDADD	0x9    /* caused by SIOCADDRT */
-#define	RTM_OLDDEL	0xa    /* caused by SIOCDELRT */
 #define	RTM_RESOLVE	0xb    /* request to resolve dst to LL addr - unused */
 #define	RTM_NEWADDR	0xc    /* address being added to iface */
 #define	RTM_DELADDR	0xd    /* address being removed from iface */

Modified: stable/10/share/man/man9/rtentry.9
==============================================================================
--- stable/10/share/man/man9/rtentry.9	Wed Apr  9 11:10:44 2014	(r264298)
+++ stable/10/share/man/man9/rtentry.9	Wed Apr  9 11:15:50 2014	(r264299)
@@ -157,8 +157,6 @@ Requests that output sent via this route
 .It Dv RTF_PROTO2
 .It Dv RTF_PROTO3
 Protocol-specific.
-.It Dv RTF_PRCLONING
-This flag is obsolete and simply ignored by facility.
 .It Dv RTF_PINNED
 (Reserved for future use to indicate routes which are not to be
 modified by a routing protocol.)

Modified: stable/10/sys/net/iso88025.h
==============================================================================
--- stable/10/sys/net/iso88025.h	Wed Apr  9 11:10:44 2014	(r264298)
+++ stable/10/sys/net/iso88025.h	Wed Apr  9 11:15:50 2014	(r264299)
@@ -162,11 +162,13 @@ struct	iso88025_addr {
 #define	ISO88025_BPF_UNSUPPORTED	0
 #define	ISO88025_BPF_SUPPORTED		1
 
+#ifdef _KERNEL
 void	iso88025_ifattach	(struct ifnet *, const u_int8_t *, int);
 void	iso88025_ifdetach	(struct ifnet *, int);
 int	iso88025_ioctl		(struct ifnet *, u_long, caddr_t );
 int	iso88025_output		(struct ifnet *, struct mbuf *,
 				 const struct sockaddr *, struct route *);
 void	iso88025_input		(struct ifnet *, struct mbuf *);
+#endif	/* _KERNEL */
 
-#endif
+#endif	/* !_NET_ISO88025_H_ */

Modified: stable/10/sys/net/route.c
==============================================================================
--- stable/10/sys/net/route.c	Wed Apr  9 11:10:44 2014	(r264298)
+++ stable/10/sys/net/route.c	Wed Apr  9 11:15:50 2014	(r264299)
@@ -1682,15 +1682,6 @@ rtinit1(struct ifaddr *ifa, int cmd, int
 	return (error);
 }
 
-#ifndef BURN_BRIDGES
-/* special one for inet internal use. may not use. */
-int
-rtinit_fib(struct ifaddr *ifa, int cmd, int flags)
-{
-	return (rtinit1(ifa, cmd, flags, -1));
-}
-#endif
-
 /*
  * Set up a routing table entry, normally
  * for an interface.

Modified: stable/10/sys/net/route.h
==============================================================================
--- stable/10/sys/net/route.h	Wed Apr  9 11:10:44 2014	(r264298)
+++ stable/10/sys/net/route.h	Wed Apr  9 11:15:50 2014	(r264299)
@@ -84,10 +84,6 @@ struct rt_metrics {
 
 #define	RT_DEFAULT_FIB	0	/* Explicitly mark fib=0 restricted cases */
 extern u_int rt_numfibs;	/* number fo usable routing tables */
-/*
- * XXX kernel function pointer `rt_output' is visible to applications.
- */
-struct mbuf;
 
 /*
  * We distinguish between routes to hosts and routes to networks,
@@ -129,20 +125,6 @@ struct rtentry {
 };
 #endif /* _KERNEL || _WANT_RTENTRY */
 
-/*
- * Following structure necessary for 4.3 compatibility;
- * We should eventually move it to a compat file.
- */
-struct ortentry {
-	u_long	rt_hash;		/* to speed lookups */
-	struct	sockaddr rt_dst;	/* key */
-	struct	sockaddr rt_gateway;	/* value */
-	short	rt_flags;		/* up/down?, host/net */
-	short	rt_refcnt;		/* # held references */
-	u_long	rt_use;			/* raw # packets forwarded */
-	struct	ifnet *rt_ifp;		/* the answer: interface to use */
-};
-
 #define	RTF_UP		0x1		/* route usable */
 #define	RTF_GATEWAY	0x2		/* destination is a gateway */
 #define	RTF_HOST	0x4		/* host entry (net otherwise) */
@@ -160,12 +142,7 @@ struct ortentry {
 #define RTF_BLACKHOLE	0x1000		/* just discard pkts (during updates) */
 #define RTF_PROTO2	0x4000		/* protocol specific routing flag */
 #define RTF_PROTO1	0x8000		/* protocol specific routing flag */
-
-/* XXX: temporary to stay API/ABI compatible with userland */
-#ifndef _KERNEL
-#define RTF_PRCLONING	0x10000		/* unused, for compatibility */
-#endif
-
+/*			0x10000		   unused, was RTF_PRCLONING */
 /*			0x20000		   unused, was RTF_WASCLONED */
 #define RTF_PROTO3	0x40000		/* protocol specific routing flag */
 /*			0x80000		   unused */
@@ -227,8 +204,8 @@ struct rt_msghdr {
 #define RTM_REDIRECT	0x6	/* Told to use different route */
 #define RTM_MISS	0x7	/* Lookup failed on this address */
 #define RTM_LOCK	0x8	/* fix specified metrics */
-#define RTM_OLDADD	0x9	/* caused by SIOCADDRT */
-#define RTM_OLDDEL	0xa	/* caused by SIOCDELRT */
+		    /*	0x9  */
+		    /*	0xa  */
 #define RTM_RESOLVE	0xb	/* req to resolve dst to LL addr */
 #define RTM_NEWADDR	0xc	/* address being added to iface */
 #define RTM_DELADDR	0xd	/* address being removed from iface */
@@ -398,11 +375,6 @@ void	 rtredirect(struct sockaddr *, stru
 int	 rtrequest(int, struct sockaddr *,
 	    struct sockaddr *, struct sockaddr *, int, struct rtentry **);
 
-#ifndef BURN_BRIDGES
-/* defaults to "all" FIBs */
-int	 rtinit_fib(struct ifaddr *, int, int);
-#endif
-
 /* XXX MRT NEW VERSIONS THAT USE FIBs
  * For now the protocol indepedent versions are the same as the AF_INET ones
  * but this will change.. 

Modified: stable/10/sys/sys/sockio.h
==============================================================================
--- stable/10/sys/sys/sockio.h	Wed Apr  9 11:10:44 2014	(r264298)
+++ stable/10/sys/sys/sockio.h	Wed Apr  9 11:15:50 2014	(r264299)
@@ -44,8 +44,8 @@
 #define	SIOCSPGRP	 _IOW('s',  8, int)		/* set process group */
 #define	SIOCGPGRP	 _IOR('s',  9, int)		/* get process group */
 
-#define	SIOCADDRT	 _IOW('r', 10, struct ortentry)	/* add route */
-#define	SIOCDELRT	 _IOW('r', 11, struct ortentry)	/* delete route */
+/*	SIOCADDRT	 _IOW('r', 10, struct ortentry)	4.3BSD */
+/*	SIOCDELRT	 _IOW('r', 11, struct ortentry)	4.3BSD */
 #define	SIOCGETVIFCNT	_IOWR('r', 15, struct sioc_vif_req)/* get vif pkt cnt */
 #define	SIOCGETSGCNT	_IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */
 

Modified: stable/10/usr.bin/netstat/netstat.1
==============================================================================
--- stable/10/usr.bin/netstat/netstat.1	Wed Apr  9 11:10:44 2014	(r264298)
+++ stable/10/usr.bin/netstat/netstat.1	Wed Apr  9 11:15:50 2014	(r264299)
@@ -243,14 +243,6 @@ If
 is also present,
 show the contents of the internal Patricia tree
 structures; used for debugging.
-If
-.Fl a
-is also present,
-show protocol-cloned routes
-(routes generated by an
-.Dv RTF_PRCLONING
-parent route);
-normally these routes are not shown.
 When
 .Fl W
 is also present,
@@ -430,8 +422,6 @@ The mapping between letters and flags is
 .It Li 3 Ta Dv RTF_PROTO3 Ta "Protocol specific routing flag #3"
 .It Li B Ta Dv RTF_BLACKHOLE Ta "Just discard pkts (during updates)"
 .It Li b Ta Dv RTF_BROADCAST Ta "The route represents a broadcast address"
-.It Li C Ta Dv RTF_CLONING Ta "Generate new routes on use"
-.It Li c Ta Dv RTF_PRCLONING Ta "Protocol-specified generate new routes on use"
 .It Li D Ta Dv RTF_DYNAMIC Ta "Created dynamically (by redirect)"
 .It Li G Ta Dv RTF_GATEWAY Ta "Destination requires forwarding by intermediary"
 .It Li H Ta Dv RTF_HOST Ta "Host entry (net otherwise)"
@@ -440,7 +430,6 @@ The mapping between letters and flags is
 .It Li R Ta Dv RTF_REJECT Ta "Host or net unreachable"
 .It Li S Ta Dv RTF_STATIC Ta "Manually added"
 .It Li U Ta Dv RTF_UP Ta "Route usable"
-.It Li W Ta Dv RTF_WASCLONED Ta "Route was generated as a result of cloning"
 .It Li X Ta Dv RTF_XRESOLVE Ta "External daemon translates proto to link address"
 .El
 .Pp

Modified: stable/10/usr.bin/netstat/route.c
==============================================================================
--- stable/10/usr.bin/netstat/route.c	Wed Apr  9 11:10:44 2014	(r264298)
+++ stable/10/usr.bin/netstat/route.c	Wed Apr  9 11:15:50 2014	(r264299)
@@ -92,19 +92,12 @@ struct bits {
 	{ RTF_STATIC,	'S' },
 	{ RTF_PROTO1,	'1' },
 	{ RTF_PROTO2,	'2' },
-	{ 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 }
 };
 

Modified: stable/10/usr.sbin/ppp/route.c
==============================================================================
--- stable/10/usr.sbin/ppp/route.c	Wed Apr  9 11:10:44 2014	(r264298)
+++ stable/10/usr.sbin/ppp/route.c	Wed Apr  9 11:15:50 2014	(r264299)
@@ -158,26 +158,16 @@ static struct bits {
   { RTF_MODIFIED, 'M' },
   { RTF_DONE, 'd' },
   { RTF_XRESOLVE, 'X' },
-#ifdef RTF_CLONING
-  { RTF_CLONING, 'C' },
-#endif
   { 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
-#ifdef RTF_PRCLONING
-  { RTF_PRCLONING, 'c' },
-#endif
 #ifdef RTF_PROTO3
   { RTF_PROTO3, '3' },
 #endif
@@ -187,10 +177,6 @@ static struct bits {
   { 0, '\0' }
 };
 
-#ifndef RTF_WASCLONED
-#define RTF_WASCLONED (0)
-#endif
-
 static void
 p_flags(struct prompt *prompt, u_int32_t f, unsigned max)
 {
@@ -434,7 +420,7 @@ route_IfDelete(struct bundle *bundle, in
      * route X was cloned from route Y (and is no longer there 'cos it
      * may have gone with route Y).
      */
-    if (RTF_WASCLONED == 0 && pass == 0)
+    if (pass == 0)
       /* So we can't tell ! */
       continue;
     for (cp = sp; cp < ep; cp += rtm->rtm_msglen) {
@@ -461,8 +447,7 @@ route_IfDelete(struct bundle *bundle, in
             sa[RTAX_GATEWAY]->sa_family == AF_INET6 ||
 #endif
             sa[RTAX_GATEWAY]->sa_family == AF_LINK) {
-          if ((pass == 0 && (rtm->rtm_flags & RTF_WASCLONED)) ||
-              (pass == 1 && !(rtm->rtm_flags & RTF_WASCLONED))) {
+          if (pass == 1) {
             ncprange_setsa(&range, sa[RTAX_DST], sa[RTAX_NETMASK]);
             rt_Set(bundle, RTM_DELETE, &range, NULL, 0, 0);
           } else

Modified: stable/10/usr.sbin/route6d/route6d.c
==============================================================================
--- stable/10/usr.sbin/route6d/route6d.c	Wed Apr  9 11:10:44 2014	(r264298)
+++ stable/10/usr.sbin/route6d/route6d.c	Wed Apr  9 11:15:50 2014	(r264299)
@@ -1899,10 +1899,6 @@ rtrecv(void)
 			if (!rt_deladdr(ifcp, rta[RTAX_IFA], rta[RTAX_NETMASK]))
 				iface++;
 			break;
-		case RTM_OLDADD:
-		case RTM_OLDDEL:
-			trace(1, "\tnot supported yet, ignored\n");
-			break;
 		}
 
 	}
@@ -2465,17 +2461,9 @@ do { \
 	RTTYPE("REDIRECT", RTM_REDIRECT);
 	RTTYPE("MISS", RTM_MISS);
 	RTTYPE("LOCK", RTM_LOCK);
-	RTTYPE("OLDADD", RTM_OLDADD);
-	RTTYPE("OLDDEL", RTM_OLDDEL);
 	RTTYPE("NEWADDR", RTM_NEWADDR);
 	RTTYPE("DELADDR", RTM_DELADDR);
 	RTTYPE("IFINFO", RTM_IFINFO);
-#ifdef RTM_OLDADD
-	RTTYPE("OLDADD", RTM_OLDADD);
-#endif
-#ifdef RTM_OLDDEL
-	RTTYPE("OLDDEL", RTM_OLDDEL);
-#endif
 #ifdef RTM_OIFINFO
 	RTTYPE("OIFINFO", RTM_OIFINFO);
 #endif
@@ -2516,18 +2504,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
-#ifdef RTF_PRCLONING
-	RTFLAG("c", RTF_PRCLONING);
-#endif
-#ifdef RTF_WASCLONED
-	RTFLAG("W", RTF_WASCLONED);
-#endif
 	RTFLAG("X", RTF_XRESOLVE);
 #ifdef RTF_LLINFO
 	RTFLAG("L", RTF_LLINFO);



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