summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-08-17 14:39:45 +0000
committerjhb <jhb@FreeBSD.org>2011-08-17 14:39:45 +0000
commit5181cb930bcc5093a0e2be0d0e535fc945a2f7a0 (patch)
tree1b8b2c6358702015fa9331580ce823f011682819 /sbin/ipfw
parentcdd0156792a85f1e1ef33dc215e539657b09bb70 (diff)
downloadFreeBSD-src-5181cb930bcc5093a0e2be0d0e535fc945a2f7a0.zip
FreeBSD-src-5181cb930bcc5093a0e2be0d0e535fc945a2f7a0.tar.gz
Fix a regression where a rule containing a source port option after a
destination IP would incorrectly display the source port as a destination port. Reviewed by: luigi Approved by: re (kib) MFC after: 1 week
Diffstat (limited to 'sbin/ipfw')
-rw-r--r--sbin/ipfw/ipfw2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index e259f5e..e389e99 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -1282,6 +1282,8 @@ show_ipfw(struct ip_fw *rule, int pcwidth, int bcwidth)
HAVE_PROTO | HAVE_SRCIP |
HAVE_DSTIP | HAVE_IP, 0);
case O_IP_SRCPORT:
+ if (flags & HAVE_DSTIP)
+ flags |= HAVE_IP;
show_prerequisites(&flags,
HAVE_PROTO | HAVE_SRCIP, 0);
if ((cmd->len & F_OR) && !or_block)
OpenPOWER on IntegriCloud