Date: Thu, 25 Feb 2016 15:33:55 +0000 (UTC) From: Marcelo Araujo <araujo@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: r296040 - stable/10/sys/net Message-ID: <201602251533.u1PFXt3Y084475@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602251533.u1PFXt3Y084475>