diff options
author | araujo <araujo@FreeBSD.org> | 2016-02-25 15:33:55 +0000 |
---|---|---|
committer | araujo <araujo@FreeBSD.org> | 2016-02-25 15:33:55 +0000 |
commit | 5be4dc53c1c849d27cfeedfe58a57d9712294897 (patch) | |
tree | 678dc67bfb337625016b6ee873f95c8c76bbd9eb | |
parent | ca8ffc54be838a41cfa28fee2ce0a222ce177cb7 (diff) | |
download | FreeBSD-src-5be4dc53c1c849d27cfeedfe58a57d9712294897.zip FreeBSD-src-5be4dc53c1c849d27cfeedfe58a57d9712294897.tar.gz |
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
-rw-r--r-- | sys/net/if_lagg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index ddb9d64..87f358e 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -1051,7 +1051,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) 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, caddr_t data) 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); |