summaryrefslogtreecommitdiff
path: root/sys/net/pf.c
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2005-01-07 18:58:40 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2005-01-07 18:58:40 +0000
commit0b40a4ff58c85ed64a182d360161ba4c3fa37b7c (patch)
tree09426236ce09f56e3ad02a9aecee05004f99cdea /sys/net/pf.c
parent290b0c59c5c6943f4ed3221b5eaec5940951ba90 (diff)
Make carp(4) traffic always appear on the physical (carpdev) interface
from pf's perspective. ok pascoe@ dhartmei@ henning@
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r--sys/net/pf.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 1a775158169..750ffefdfa0 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.476 2004/12/22 17:17:55 dhartmei Exp $ */
+/* $OpenBSD: pf.c,v 1.477 2005/01/07 18:58:39 mcbride Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -5624,6 +5624,9 @@ pf_test(int dir, struct ifnet *ifp, struct mbuf **m0,
(m_tag_find(m, PACKET_TAG_PF_GENERATED, NULL) != NULL))
return (PF_PASS);
+ if (ifp->if_type == IFT_CARP && ifp->if_carpdev)
+ ifp = ifp->if_carpdev;
+
kif = pfi_index2kif[ifp->if_index];
if (kif == NULL)
return (PF_DROP);
@@ -5933,6 +5936,9 @@ pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0,
(m_tag_find(m, PACKET_TAG_PF_GENERATED, NULL) != NULL))
return (PF_PASS);
+ if (ifp->if_type == IFT_CARP && ifp->if_carpdev)
+ ifp = ifp->if_carpdev;
+
kif = pfi_index2kif[ifp->if_index];
if (kif == NULL)
return (PF_DROP);