summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorjmatthew <jmatthew@openbsd.org>2020-04-27 10:06:45 +0000
committerjmatthew <jmatthew@openbsd.org>2020-04-27 10:06:45 +0000
commit615a26c04a78908f4879935f4aadf9ca160c8ae4 (patch)
tree29a4802fa07249b4d8f9e42f4964766b01e2f0fb /sys/dev
parentDo not close the stdout file descriptor in control mode as it will be (diff)
downloadwireguard-openbsd-615a26c04a78908f4879935f4aadf9ca160c8ae4.tar.xz
wireguard-openbsd-615a26c04a78908f4879935f4aadf9ca160c8ae4.zip
When creating the rx filter, indicate we want to match against the outermost
packet headers, rather than the headers inside any of the tunnel protocols the nic firmware understands. This allows us to receive gre, ipip, mpls, etc. packets without putting the interface in promisc mode. ok dlg@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_bnxt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/if_bnxt.c b/sys/dev/pci/if_bnxt.c
index 2d786d40382..c0b42ed0826 100644
--- a/sys/dev/pci/if_bnxt.c
+++ b/sys/dev/pci/if_bnxt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bnxt.c,v 1.21 2019/09/03 09:00:44 sf Exp $ */
+/* $OpenBSD: if_bnxt.c,v 1.22 2020/04/27 10:06:45 jmatthew Exp $ */
/*-
* Broadcom NetXtreme-C/E network driver.
*
@@ -2816,7 +2816,8 @@ bnxt_hwrm_set_filter(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic)
resp = BNXT_DMA_KVA(softc->sc_cmd_resp);
bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_CFA_L2_FILTER_ALLOC);
- req.flags = htole32(HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX);
+ req.flags = htole32(HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX
+ | HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST);
enables = HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR
| HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK
| HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_DST_ID;