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
This commit is contained in:
John Baldwin 2011-08-17 14:39:45 +00:00
parent ad92276ece
commit e89359c21e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=224942

View File

@ -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)