diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-11-04 13:44:12 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-11-04 13:44:12 +0000 |
commit | f912c843363d65a63ac18dfaef1e1f1ceb12733a (patch) | |
tree | 773c56046c0a49ce4a7da45a7702769b16111822 /sys/net/if_trunk.c | |
parent | 6d6cc1a771a01cfb0780b7838a8906907e05decb (diff) |
Move the trunk port count check from trunk_lb_start() to trunk_start()
before the protocol start routine is called so as to cover all protocols
with the same check.
ok mpf@
Diffstat (limited to 'sys/net/if_trunk.c')
-rw-r--r-- | sys/net/if_trunk.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c index 9783835847e..faa2ebf92ed 100644 --- a/sys/net/if_trunk.c +++ b/sys/net/if_trunk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.c,v 1.57 2008/10/30 20:44:02 brad Exp $ */ +/* $OpenBSD: if_trunk.c,v 1.58 2008/11/04 13:44:11 brad Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -946,7 +946,7 @@ trunk_start(struct ifnet *ifp) bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT); #endif - if (tr->tr_proto != TRUNK_PROTO_NONE) + if (tr->tr_proto != TRUNK_PROTO_NONE && tr->tr_count) error = (*tr->tr_start)(tr, m); else m_freem(m); @@ -1467,11 +1467,6 @@ trunk_lb_start(struct trunk_softc *tr, struct mbuf *m) struct trunk_port *tp = NULL; u_int32_t p = 0; - if (tr->tr_count == 0) { - m_freem(m); - return (EINVAL); - } - p = trunk_hashmbuf(m, lb->lb_key); p %= tr->tr_count; tp = lb->lb_ports[p]; |