diff options
author | mux <mux@FreeBSD.org> | 2002-10-24 18:04:44 +0000 |
---|---|---|
committer | mux <mux@FreeBSD.org> | 2002-10-24 18:04:44 +0000 |
commit | 6b68b7717efa3ba892f3ff4dee85e1c5b8b8166a (patch) | |
tree | 30d70b0dc074cfe7b895c539004b2cd8d638a969 /sys/netinet/ip_fw2.c | |
parent | ddc23fad24abdd9527d0e8966d285a099a700b4e (diff) | |
download | FreeBSD-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 'sys/netinet/ip_fw2.c')
-rw-r--r-- | sys/netinet/ip_fw2.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index 9921a43..6a1a2a0 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -2501,11 +2501,7 @@ ipfw_ctl(struct sockopt *sopt) for (rule = layer3_chain; rule ; rule = rule->next) { int i = RULESIZE(rule); bcopy(rule, bp, i); - /* - * abuse 'next_rule' to store the set_disable word - */ - (u_int32_t)(((struct ip_fw *)bp)->next_rule) = - set_disable; + ((struct ip_fw *)bp)->set_disable = set_disable; bp = (struct ip_fw *)((char *)bp + i); } if (ipfw_dyn_v) { @@ -2517,7 +2513,7 @@ ipfw_ctl(struct sockopt *sopt) for ( p = ipfw_dyn_v[i] ; p != NULL ; p = p->next, dst++ ) { bcopy(p, dst, sizeof *p); - (int)dst->rule = p->rule->rulenum ; + dst->rulenum = p->rule->rulenum; /* * store a non-null value in "next". * The userland code will interpret a |