svn commit: r257699 - in head: share/man/man9 sys/compat/linux sys/net usr.sbin/route6d

Gleb Smirnoff glebius at FreeBSD.org
Tue Nov 5 12:52:57 UTC 2013


Author: glebius
Date: Tue Nov  5 12:52:56 2013
New Revision: 257699
URL: http://svnweb.freebsd.org/changeset/base/257699

Log:
  Axe IFF_SMART. Fortunately this layering violating flag was never used,
  it was just declared.

Modified:
  head/share/man/man9/ifnet.9
  head/sys/compat/linux/linux_ioctl.c
  head/sys/net/if.c
  head/sys/net/if.h
  head/usr.sbin/route6d/route6d.c

Modified: head/share/man/man9/ifnet.9
==============================================================================
--- head/share/man/man9/ifnet.9	Tue Nov  5 11:19:34 2013	(r257698)
+++ head/share/man/man9/ifnet.9	Tue Nov  5 12:52:56 2013	(r257699)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 26, 2013
+.Dd November 5, 2013
 .Dt IFNET 9
 .Os
 .Sh NAME
@@ -583,14 +583,6 @@ The interface is a loopback device.
 The interface is point-to-point;
 .Dq broadcast
 address is actually the address of the other end.
-.It Dv IFF_SMART
-.Aq S*
-The interface manages its own routes, rather than using the generic
-code in
-.Fn if_up
-and
-.Fn if_down .
-This is probably useful for serial lines.
 .It Dv IFF_DRV_RUNNING
 .Aq D*
 The interface has been configured and dynamic resources were

Modified: head/sys/compat/linux/linux_ioctl.c
==============================================================================
--- head/sys/compat/linux/linux_ioctl.c	Tue Nov  5 11:19:34 2013	(r257698)
+++ head/sys/compat/linux/linux_ioctl.c	Tue Nov  5 12:52:56 2013	(r257699)
@@ -2287,7 +2287,7 @@ linux_gifflags(struct thread *td, struct
 
 	flags = (ifp->if_flags | ifp->if_drv_flags) & 0xffff;
 	/* these flags have no Linux equivalent */
-	flags &= ~(IFF_SMART|IFF_DRV_OACTIVE|IFF_SIMPLEX|
+	flags &= ~(IFF_DRV_OACTIVE|IFF_SIMPLEX|
 	    IFF_LINK0|IFF_LINK1|IFF_LINK2);
 	/* Linux' multicast flag is in a different bit */
 	if (flags & IFF_MULTICAST) {

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c	Tue Nov  5 11:19:34 2013	(r257698)
+++ head/sys/net/if.c	Tue Nov  5 12:52:56 2013	(r257699)
@@ -2210,9 +2210,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp,
 		 */
 		new_flags = (ifr->ifr_flags & 0xffff) |
 		    (ifr->ifr_flagshigh << 16);
-		if (ifp->if_flags & IFF_SMART) {
-			/* Smart drivers twiddle their own routes */
-		} else if (ifp->if_flags & IFF_UP &&
+		if (ifp->if_flags & IFF_UP &&
 		    (new_flags & IFF_UP) == 0) {
 			if_down(ifp);
 		} else if (new_flags & IFF_UP &&

Modified: head/sys/net/if.h
==============================================================================
--- head/sys/net/if.h	Tue Nov  5 11:19:34 2013	(r257698)
+++ head/sys/net/if.h	Tue Nov  5 12:52:56 2013	(r257699)
@@ -129,7 +129,7 @@ struct if_data {
 #define	IFF_DEBUG	0x4		/* (n) turn on debugging */
 #define	IFF_LOOPBACK	0x8		/* (i) is a loopback net */
 #define	IFF_POINTOPOINT	0x10		/* (i) is a point-to-point link */
-#define	IFF_SMART	0x20		/* (i) interface manages own routes */
+/*			0x20		   was IFF_SMART */
 #define	IFF_DRV_RUNNING	0x40		/* (d) resources allocated */
 #define	IFF_NOARP	0x80		/* (n) no address resolution protocol */
 #define	IFF_PROMISC	0x100		/* (n) receive all packets */
@@ -159,7 +159,7 @@ struct if_data {
 /* flags set internally only: */
 #define	IFF_CANTCHANGE \
 	(IFF_BROADCAST|IFF_POINTOPOINT|IFF_DRV_RUNNING|IFF_DRV_OACTIVE|\
-	    IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC|\
+	    IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_PROMISC|\
 	    IFF_DYING|IFF_CANTCONFIG)
 
 /*

Modified: head/usr.sbin/route6d/route6d.c
==============================================================================
--- head/usr.sbin/route6d/route6d.c	Tue Nov  5 11:19:34 2013	(r257698)
+++ head/usr.sbin/route6d/route6d.c	Tue Nov  5 12:52:56 2013	(r257699)
@@ -2585,9 +2585,6 @@ do { \
 #ifdef IFF_NOTRAILERS
 	IFFLAG("NOTRAILERS", IFF_NOTRAILERS);
 #endif
-#ifdef IFF_SMART
-	IFFLAG("SMART", IFF_SMART);
-#endif
 	IFFLAG("RUNNING", IFF_RUNNING);
 	IFFLAG("NOARP", IFF_NOARP);
 	IFFLAG("PROMISC", IFF_PROMISC);


More information about the svn-src-head mailing list