summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2013-01-18 12:10:12 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2013-01-18 12:10:12 +0000
commit42e981c248c92d00c3e6d4111d48a82e0ad560af (patch)
treec22ca1fc23870a52cb395977aed48497f78f4753 /sys/net
parentff14ee4e72e58d5e31f04f31ce3738cc66722903 (diff)
Relax the restriction on sending frames to trunk(4) members to allow BPF writes.
Method (checking for PACKET_TAG_DLT) suggested by claudio, ok mpf
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ethersubr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 660d9210ec5..838d5ce997f 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.152 2012/10/05 17:17:04 camield Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.153 2013/01/18 12:10:11 sthen Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -227,7 +227,9 @@ ether_output(ifp0, m0, dst, rt0)
#endif
#if NTRUNK > 0
- if (ifp->if_type == IFT_IEEE8023ADLAG)
+ /* restrict transmission on trunk members to bpf only */
+ if (ifp->if_type == IFT_IEEE8023ADLAG &&
+ (m_tag_find(m, PACKET_TAG_DLT, NULL) == NULL))
senderr(EBUSY);
#endif