svn commit: r273586 - head/sbin/ipfw
Alexander V. Chernikov
melifaro at FreeBSD.org
Fri Oct 24 13:29:13 UTC 2014
Author: melifaro
Date: Fri Oct 24 13:29:12 2014
New Revision: 273586
URL: https://svnweb.freebsd.org/changeset/base/273586
Log:
Fix displaying non-contiguous netmasks.
Found by: ae
Sponsored by: Yandex LLC
Modified:
head/sbin/ipfw/ipfw2.c
Modified: head/sbin/ipfw/ipfw2.c
==============================================================================
--- head/sbin/ipfw/ipfw2.c Fri Oct 24 12:30:43 2014 (r273585)
+++ head/sbin/ipfw/ipfw2.c Fri Oct 24 13:29:12 2014 (r273586)
@@ -1225,9 +1225,10 @@ print_ip(struct buf_pr *bp, struct forma
else { /* numeric IP followed by some kind of mask */
ia = (struct in_addr *)&a[0];
bprintf(bp, "%s", inet_ntoa(*ia));
- if (mb < 0)
- bprintf(bp, ":%s", inet_ntoa(*ia ) );
- else if (mb < 32)
+ if (mb < 0) {
+ ia = (struct in_addr *)&a[1];
+ bprintf(bp, ":%s", inet_ntoa(*ia));
+ } else if (mb < 32)
bprintf(bp, "/%d", mb);
}
if (len > 1)
More information about the svn-src-all
mailing list