summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-02-28 10:08:29 -0300
committerRenato Botelho <renato@netgate.com>2016-02-28 10:08:29 -0300
commitafdadc06a5da33ea6f46448ec5a8244cf6bf754d (patch)
tree0d5fcd0eacffb1f234a3c97e9ea66a4b6d28d973 /sys/net
parenta0ada2282856db4c48a6cbeadba5e7c6d74d45cf (diff)
parent15dc3e2435d0a1243a7938c5eda77de938e4f5de (diff)
downloadFreeBSD-src-afdadc06a5da33ea6f46448ec5a8244cf6bf754d.zip
FreeBSD-src-afdadc06a5da33ea6f46448ec5a8244cf6bf754d.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_lagg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c
index 9449df0..93ec82e 100644
--- a/sys/net/if_lagg.c
+++ b/sys/net/if_lagg.c
@@ -1055,7 +1055,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;
}
@@ -1085,7 +1085,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);
OpenPOWER on IntegriCloud