summaryrefslogtreecommitdiff
path: root/sys/net/if_trunk.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_trunk.c')
-rw-r--r--sys/net/if_trunk.c9
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];