diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2013-03-27 13:32:29 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2013-03-27 13:32:29 +0000 |
commit | ab3338f418ac15937de66d80c2124877660a5ae6 (patch) | |
tree | 081d03c2ddf2dcc76d4a7092e6c9dad1628c720a /sys | |
parent | c5bb0c816df44ead91ace22032dd73b10b6212f2 (diff) |
Use the correct src/dst ports depending on direction (one of src or dst was
wrong in each direction).
Report and fix from UMEZAWA Takeshi <umezawa@iij.ad.jp>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf_ioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index e8d8b34dc6e..db88c8d3740 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.257 2013/02/26 14:56:05 mikeb Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.258 2013/03/27 13:32:28 mcbride Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1354,14 +1354,14 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) sk = s->key[PF_SK_STACK]; srcaddr = &sk->addr[1]; dstaddr = &sk->addr[0]; - srcport = sk->port[0]; + srcport = sk->port[1]; dstport = sk->port[0]; } else { sk = s->key[PF_SK_WIRE]; srcaddr = &sk->addr[0]; dstaddr = &sk->addr[1]; srcport = sk->port[0]; - dstport = sk->port[0]; + dstport = sk->port[1]; } if ((!psk->psk_af || sk->af == psk->psk_af) && (!psk->psk_proto || psk->psk_proto == |