summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2001-09-06 20:53:45 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2001-09-06 20:53:45 +0000
commiteac47fcc2115bde7d658200fdd1849b77ece2b6e (patch)
tree0cc910869458fd1bcf9a1357e8256bd2612263bd /sys
parentdd4826c0920643ca875ffd4d1cdbfba4ab0cd39d (diff)
Reflect skip step changes. Spotted by Ryan McBride.
Diffstat (limited to 'sys')
-rw-r--r--sys/net/pf_norm.c14
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)