diff options
Diffstat (limited to 'sys/net/pf_norm.c')
-rw-r--r-- | sys/net/pf_norm.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/net/pf_norm.c b/sys/net/pf_norm.c index 8ecdfc3a90e..49b41cf267b 100644 --- a/sys/net/pf_norm.c +++ b/sys/net/pf_norm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_norm.c,v 1.8 2001/09/04 08:55:37 dhartmei Exp $ */ +/* $OpenBSD: pf_norm.c,v 1.9 2001/09/06 20:53:44 dhartmei Exp $ */ /* * Copyright 2001 Niels Provos <provos@citi.umich.edu> @@ -560,20 +560,22 @@ pf_normalize_tcp(int dir, struct ifnet *ifp, struct mbuf *m, int ipoff, r = TAILQ_NEXT(r, entries); continue; } - if (r->proto && r->proto != h->ip_p) + if (r->ifp != NULL && r->ifp != ifp) r = r->skip[0]; + else if (r->proto && r->proto != h->ip_p) + r = r->skip[1]; else if (r->src.mask && !pf_match_addr(r->src.not, r->src.addr, r->src.mask, h->ip_src.s_addr)) - r = r->skip[1]; + r = r->skip[2]; else if (r->src.port_op && !pf_match_port(r->src.port_op, r->src.port[0], r->src.port[1], th->th_sport)) - r = r->skip[2]; + r = r->skip[3]; else if (r->dst.mask && !pf_match_addr(r->dst.not, r->dst.addr, r->dst.mask, h->ip_dst.s_addr)) - r = r->skip[3]; + r = r->skip[4]; else if (r->dst.port_op && !pf_match_port(r->dst.port_op, r->dst.port[0], r->dst.port[1], th->th_dport)) - r = r->skip[4]; + r = r->skip[5]; else if (r->direction != dir) r = TAILQ_NEXT(r, entries); else if (r->ifp != NULL && r->ifp != ifp) |