summaryrefslogtreecommitdiffstats
path: root/sys/net/if_lagg.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_lagg.c')
-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