Make sure there is at least one port to avoid divide by zero when choosing the
tx port. PR: kern/122794 MFC after: 3 days
This commit is contained in:
parent
a370f3ca73
commit
96c41c08b0
@ -1123,7 +1123,8 @@ lagg_start(struct ifnet *ifp)
|
||||
|
||||
ETHER_BPF_MTAP(ifp, m);
|
||||
|
||||
if (sc->sc_proto != LAGG_PROTO_NONE)
|
||||
/* We need a Tx algorithm and at least one port */
|
||||
if (sc->sc_proto != LAGG_PROTO_NONE && sc->sc_count)
|
||||
error = (*sc->sc_start)(sc, m);
|
||||
else
|
||||
m_freem(m);
|
||||
|
Loading…
x
Reference in New Issue
Block a user