diff options
author | 2013-06-03 16:32:00 +0000 | |
---|---|---|
committer | 2013-06-03 16:32:00 +0000 | |
commit | 76c963deae01c67e1d8da62d93b107a0e7bde65a (patch) | |
tree | db6b2b077d6a2b0757b0444f017480d7d7ae51b8 | |
parent | rcsid (diff) | |
download | wireguard-openbsd-76c963deae01c67e1d8da62d93b107a0e7bde65a.tar.xz wireguard-openbsd-76c963deae01c67e1d8da62d93b107a0e7bde65a.zip |
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@
-rw-r--r-- | sys/net/pf.c | 18 |
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 */ |