From 5181cb930bcc5093a0e2be0d0e535fc945a2f7a0 Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 17 Aug 2011 14:39:45 +0000 Subject: 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 --- sbin/ipfw/ipfw2.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sbin/ipfw') 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) -- cgit v1.1