summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2009-10-26 18:22:58 +0000
committerclaudio <claudio@openbsd.org>2009-10-26 18:22:58 +0000
commitfb8ca4aa84339892ed87997a76496e2a75b189cc (patch)
tree899e7b0bea8627882cf5f77e7f496d521120356e
parentNuke accidentally-committed debugging statement. (diff)
downloadwireguard-openbsd-fb8ca4aa84339892ed87997a76496e2a75b189cc.tar.xz
wireguard-openbsd-fb8ca4aa84339892ed87997a76496e2a75b189cc.zip
Set the rdomain in bpfwrite() to the interface rdomain so that bpf sender
like dhcpd/dhclinet can send packets out of interfaces in other rdomains without hitting the check in ether_output(). With and ok phessler@
-rw-r--r--sys/net/bpf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index f6f7e6c7122..55e85a106c0 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.73 2009/09/21 16:33:42 canacar Exp $ */
+/* $OpenBSD: bpf.c,v 1.74 2009/10/26 18:22:58 claudio Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
@@ -540,6 +540,8 @@ bpfwrite(dev_t dev, struct uio *uio, int ioflag)
return (EMSGSIZE);
}
+ m->m_pkthdr.rdomain = ifp->if_rdomain;
+
if (d->bd_hdrcmplt)
dst.ss_family = pseudo_AF_HDRCMPLT;