svn commit: r296040 - stable/10/sys/net

Marcelo Araujo araujo at FreeBSD.org
Thu Feb 25 15:33:56 UTC 2016


Author: araujo
Date: Thu Feb 25 15:33:55 2016
New Revision: 296040
URL: https://svnweb.freebsd.org/changeset/base/296040

Log:
  MFH 295796 (based on)
  Fix regression introduced on 272446r. lagg(4) supports the protocol none,
  where it disables any traffic without disabling the lagg(4) interface itself.
  
  PR:		206478
  Submitted by:	Erin Clark <erin.clark.ix at gmail.com>
  Reviewed by:	rpokala, bapt
  Approved by:	re (glebius)
  Differential Revision:	https://reviews.freebsd.org/D5188

Modified:
  stable/10/sys/net/if_lagg.c

Modified: stable/10/sys/net/if_lagg.c
==============================================================================
--- stable/10/sys/net/if_lagg.c	Thu Feb 25 14:29:57 2016	(r296039)
+++ stable/10/sys/net/if_lagg.c	Thu Feb 25 15:33:55 2016	(r296040)
@@ -1051,7 +1051,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd
 				break;
 			}
 		}
-		if (proto->ti_proto == LAGG_PROTO_NONE) {
+		if (proto->ti_proto >= LAGG_PROTO_MAX) {
 			error = EPROTONOSUPPORT;
 			break;
 		}
@@ -1081,7 +1081,8 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd
 				LAGG_WUNLOCK(sc);
 		} else
 			LAGG_WUNLOCK(sc);
-		proto->ti_attach(sc);
+		if (proto->ti_proto != LAGG_PROTO_NONE)
+			proto->ti_attach(sc);
 		LAGG_WLOCK(sc);
 		sc->sc_proto = proto->ti_proto;
 		LAGG_WUNLOCK(sc);


More information about the svn-src-stable-10 mailing list