diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-06-21 19:26:03 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-06-21 19:26:03 +0000 |
commit | d953b7a4146ca0af5eaa7c4e5e2f4da2ffda38a5 (patch) | |
tree | 4305fbba15244f3863add39e5aab01b29ade0691 /sys/net | |
parent | 5d2f68f5a3f30a3832a91389613065ccf8130c15 (diff) |
Get rid of pf_test_eh() wrapper.
ok cedric@ henning@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_bridge.c | 10 | ||||
-rw-r--r-- | sys/net/pf.c | 22 | ||||
-rw-r--r-- | sys/net/pfvar.h | 8 |
3 files changed, 13 insertions, 27 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 714853b41ec..f59549ce66f 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.134 2004/05/04 18:03:58 canacar Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.135 2004/06/21 19:26:01 mcbride Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -2297,7 +2297,7 @@ bridge_ipsec(int dir, int af, int hlen, struct mbuf *m) #ifdef INET case AF_INET: if (pf_test(dir, &encif[0].sc_if, - &m) != PF_PASS) { + &m, NULL) != PF_PASS) { m_freem(m); return (1); } @@ -2306,7 +2306,7 @@ bridge_ipsec(int dir, int af, int hlen, struct mbuf *m) #ifdef INET6 case AF_INET6: if (pf_test6(dir, &encif[0].sc_if, - &m) != PF_PASS) { + &m, NULL) != PF_PASS) { m_freem(m); return (1); } @@ -2432,7 +2432,7 @@ bridge_filter(struct bridge_softc *sc, int dir, struct ifnet *ifp, #if NPF > 0 /* Finally, we get to filter the packet! */ m->m_pkthdr.rcvif = ifp; - if (pf_test_eh(dir, ifp, &m, eh) != PF_PASS) + if (pf_test(dir, ifp, &m, eh) != PF_PASS) goto dropit; if (m == NULL) goto dropit; @@ -2478,7 +2478,7 @@ bridge_filter(struct bridge_softc *sc, int dir, struct ifnet *ifp, #endif /* IPSEC */ #if NPF > 0 - if (pf_test6_eh(dir, ifp, &m, eh) != PF_PASS) + if (pf_test6(dir, ifp, &m, eh) != PF_PASS) goto dropit; if (m == NULL) return (NULL); diff --git a/sys/net/pf.c b/sys/net/pf.c index c2d7181de2d..826fb6f57d0 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.451 2004/06/10 14:22:54 dhartmei Exp $ */ +/* $OpenBSD: pf.c,v 1.452 2004/06/21 19:26:01 mcbride Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -5035,7 +5035,7 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp, goto bad; if (oifp != ifp) { - if (pf_test(PF_OUT, ifp, &m0) != PF_PASS) + if (pf_test(PF_OUT, ifp, &m0, NULL) != PF_PASS) goto bad; else if (m0 == NULL) goto done; @@ -5228,7 +5228,7 @@ pf_route6(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp, goto bad; if (oifp != ifp) { - if (pf_test6(PF_OUT, ifp, &m0) != PF_PASS) + if (pf_test6(PF_OUT, ifp, &m0, NULL) != PF_PASS) goto bad; else if (m0 == NULL) goto done; @@ -5372,13 +5372,7 @@ pf_add_mbuf_tag(struct mbuf *m, u_int tag) #ifdef INET int -pf_test(int dir, struct ifnet *ifp, struct mbuf **m0) -{ - return pf_test_eh(dir, ifp, m0, NULL); -} - -int -pf_test_eh(int dir, struct ifnet *ifp, struct mbuf **m0, +pf_test(int dir, struct ifnet *ifp, struct mbuf **m0, struct ether_header *eh) { struct pfi_kif *kif; @@ -5685,13 +5679,7 @@ done: #ifdef INET6 int -pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0) -{ - return pf_test6_eh(dir, ifp, m0, NULL); -} - -int -pf_test6_eh(int dir, struct ifnet *ifp, struct mbuf **m0, +pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0, struct ether_header *eh) { struct pfi_kif *kif; diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 0961bc04d57..23ff4358ff1 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.197 2004/06/14 20:53:27 cedric Exp $ */ +/* $OpenBSD: pfvar.h,v 1.198 2004/06/21 19:26:01 mcbride Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1341,13 +1341,11 @@ void pf_rm_rule(struct pf_rulequeue *, struct pf_rule *); #ifdef INET -int pf_test(int, struct ifnet *, struct mbuf **); -int pf_test_eh(int, struct ifnet *, struct mbuf **, struct ether_header *); +int pf_test(int, struct ifnet *, struct mbuf **, struct ether_header *); #endif /* INET */ #ifdef INET6 -int pf_test6(int, struct ifnet *, struct mbuf **); -int pf_test6_eh(int, struct ifnet *, struct mbuf **, struct ether_header *); +int pf_test6(int, struct ifnet *, struct mbuf **, struct ether_header *); void pf_poolmask(struct pf_addr *, struct pf_addr*, struct pf_addr *, struct pf_addr *, u_int8_t); void pf_addr_inc(struct pf_addr *, sa_family_t); |