summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2002-10-24 18:04:44 +0000
committermux <mux@FreeBSD.org>2002-10-24 18:04:44 +0000
commit6b68b7717efa3ba892f3ff4dee85e1c5b8b8166a (patch)
tree30d70b0dc074cfe7b895c539004b2cd8d638a969 /sbin
parentddc23fad24abdd9527d0e8966d285a099a700b4e (diff)
downloadFreeBSD-src-6b68b7717efa3ba892f3ff4dee85e1c5b8b8166a.zip
FreeBSD-src-6b68b7717efa3ba892f3ff4dee85e1c5b8b8166a.tar.gz
Fix ipfw2 panics on 64-bit platforms.
Quoting luigi: In order to make the userland code fully 64-bit clean it may be necessary to commit other changes that may or may not cause a minor change in the ABI. Reviewed by: luigi
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/ipfw2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index b740503..dc9cab7 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -811,7 +811,7 @@ show_ipfw(struct ip_fw *rule)
ipfw_insn_log *logptr = NULL; /* set if we find an O_LOG */
int or_block = 0; /* we are in an or block */
- u_int32_t set_disable = (u_int32_t)(rule->next_rule);
+ u_int32_t set_disable = rule->set_disable;
if (set_disable & (1 << rule->set)) { /* disabled */
if (!show_sets)
@@ -1198,7 +1198,7 @@ show_dyn_ipfw(ipfw_dyn_rule *d)
}
printf("%05d %10qu %10qu (%ds)",
- (int)(d->rule), d->pcnt, d->bcnt, d->expire);
+ d->rulenum, d->pcnt, d->bcnt, d->expire);
switch (d->dyn_type) {
case O_LIMIT_PARENT:
printf(" PARENT %d", d->count);
@@ -1432,7 +1432,7 @@ sets_handler(int ac, char *av[])
err(EX_OSERR, "malloc");
if (getsockopt(s, IPPROTO_IP, IP_FW_GET, data, &nbytes) < 0)
err(EX_OSERR, "getsockopt(IP_FW_GET)");
- set_disable = (u_int32_t)(((struct ip_fw *)data)->next_rule);
+ set_disable = ((struct ip_fw *)data)->set_disable;
for (i = 0, msg = "disable" ; i < 31; i++)
if ( (set_disable & (1<<i))) {
@@ -1618,9 +1618,9 @@ list(int ac, char *av[])
/* already warned */
continue;
for (n = 0, d = dynrules; n < ndyn; n++, d++) {
- if ((int)(d->rule) > rnum)
+ if (d->rulenum > rnum)
break;
- if ((int)(d->rule) == rnum)
+ if (d->rulenum == rnum)
show_dyn_ipfw(d);
}
}
OpenPOWER on IntegriCloud