summaryrefslogtreecommitdiff
path: root/sys/net/pf.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2013-06-03 16:32:01 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2013-06-03 16:32:01 +0000
commitfb4adfb5ecc4adc0f4be52bd5daa09cef3183862 (patch)
treea3bcfc12dee3ba8ba0cd5c58043e16d3b0047846 /sys/net/pf.c
parent9eabe8373d13614096fb76af3a212d3aa7b120f6 (diff)
Update o[sd]port whenever n[sd]port is changed. This fixes a
regression introduced with pf.c 1.827 and allows us to create icmp states again. OK henning@
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r--sys/net/pf.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index bd3a56112f0..eda3d203c07 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.828 2013/06/03 01:41:04 henning Exp $ */
+/* $OpenBSD: pf.c,v 1.829 2013/06/03 16:32:00 bluhm Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -3344,11 +3344,11 @@ pf_test_rule(struct pf_pdesc *pd, struct pf_rule **rm, struct pf_state **sm,
state_icmp = pf_icmp_mapping(pd, icmptype,
&icmp_dir, &multi, &virtual_id, &virtual_type);
if (icmp_dir == PF_IN) {
- pd->nsport = virtual_id;
- pd->ndport = virtual_type;
+ pd->osport = pd->nsport = virtual_id;
+ pd->odport = pd->ndport = virtual_type;
} else {
- pd->nsport = virtual_type;
- pd->ndport = virtual_id;
+ pd->osport = pd->nsport = virtual_type;
+ pd->odport = pd->ndport = virtual_id;
}
break;
#endif /* INET */
@@ -3359,11 +3359,11 @@ pf_test_rule(struct pf_pdesc *pd, struct pf_rule **rm, struct pf_state **sm,
state_icmp = pf_icmp_mapping(pd, icmptype,
&icmp_dir, &multi, &virtual_id, &virtual_type);
if (icmp_dir == PF_IN) {
- pd->nsport = virtual_id;
- pd->ndport = virtual_type;
+ pd->osport = pd->nsport = virtual_id;
+ pd->odport = pd->ndport = virtual_type;
} else {
- pd->nsport = virtual_type;
- pd->ndport = virtual_id;
+ pd->osport = pd->nsport = virtual_type;
+ pd->odport = pd->ndport = virtual_id;
}
break;
#endif /* INET6 */