summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2002-07-31 22:42:08 +0000
committerluigi <luigi@FreeBSD.org>2002-07-31 22:42:08 +0000
commit5f890d455e3e8952439397a5870c1d275724d4a0 (patch)
treed0ff6cad10d47f337956b44a7ad209d4770af2a5 /sbin
parent9503b6d5cd749af5f4a168d9c598429dac429c60 (diff)
downloadFreeBSD-src-5f890d455e3e8952439397a5870c1d275724d4a0.zip
FreeBSD-src-5f890d455e3e8952439397a5870c1d275724d4a0.tar.gz
Forgot this one: properly initialize an address set when the set
size is less than 32 bits (/28 mask or more). Also remove a debugging fprintf().
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/ipfw2.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index e626353..0bcc482 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -1569,9 +1569,7 @@ fill_ip(ipfw_insn_ip *cmd, char *av)
d = (u_int32_t *)&cmd->mask;
cmd->o.opcode = O_IP_DST_SET; /* default */
cmd->o.len |= F_INSN_SIZE(ipfw_insn_u32) + (cmd->o.arg1+31)/32;
- fprintf(stderr,"-- set size %d cmdlen %d\n",
- cmd->o.arg1, cmd->o.len );
- for (i = 0; i < cmd->o.arg1/32 ; i++)
+ for (i = 0; i < (cmd->o.arg1+31)/32 ; i++)
d[i] = 0; /* clear masks */
av = p+1;
OpenPOWER on IntegriCloud