mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
Fix displaying non-contiguous netmasks.
Found by: ae Sponsored by: Yandex LLC
This commit is contained in:
parent
3bea5b97f8
commit
382a5cbf42
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273586
@ -1225,9 +1225,10 @@ print_ip(struct buf_pr *bp, struct format_opts *fo, ipfw_insn_ip *cmd,
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user