diff options
author | Luigi Rizzo <luigi@FreeBSD.org> | 2002-07-31 22:42:08 +0000 |
---|---|---|
committer | Luigi Rizzo <luigi@FreeBSD.org> | 2002-07-31 22:42:08 +0000 |
commit | 61360012116eae66e4e9ad5b87207cfc26f722cb (patch) | |
tree | d0ff6cad10d47f337956b44a7ad209d4770af2a5 /sbin | |
parent | 52bc23ab8a25b2b56499ce25b5ba1abc5c3601dc (diff) | |
download | src-61360012116eae66e4e9ad5b87207cfc26f722cb.tar.gz src-61360012116eae66e4e9ad5b87207cfc26f722cb.zip |
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().
Notes
Notes:
svn path=/head/; revision=101117
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipfw/ipfw2.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index e626353b0128..0bcc48202c92 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; |