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:
Andrew Thompson 2008-09-18 04:14:28 +00:00
parent a370f3ca73
commit 96c41c08b0

View File

@ -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);