summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason <jason@openbsd.org>2001-07-25 04:59:33 +0000
committerjason <jason@openbsd.org>2001-07-25 04:59:33 +0000
commit777f6ffdfda33e7657971913c1f82b1a75668713 (patch)
tree3a098eff495c3faaa99d877514f69df2ae2ca8ef
parentbe carefull about initializing timeouts (diff)
downloadwireguard-openbsd-777f6ffdfda33e7657971913c1f82b1a75668713.tar.xz
wireguard-openbsd-777f6ffdfda33e7657971913c1f82b1a75668713.zip
Make sure pkthdr.rcvif is correct before calling pf_test()
-rw-r--r--sys/net/if_bridge.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 328cac741c6..b237a2cf1db 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bridge.c,v 1.72 2001/07/25 03:43:41 jason Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.73 2001/07/25 04:59:33 jason Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -1989,7 +1989,8 @@ bridge_filter(sc, dir, ifp, eh, m)
}
/* Finally, we get to filter the packet! */
- if (pf_test(dir, m->m_pkthdr.rcvif, &m) != PF_PASS)
+ m->m_pkthdr.rcvif = ifp;
+ if (pf_test(dir, ifp, &m) != PF_PASS)
goto dropit;
/* Rebuild the IP header */