summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/ipfw/ipfw2.c6
-rw-r--r--sys/netinet/ip_fw2.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 298dba2..a83cea0 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -2575,7 +2575,7 @@ list(int ac, char *av[], int show_counters)
for (n = 0, d = dynrules; n < ndyn; n++, d++) {
if (use_set) {
/* skip rules from another set */
- bcopy(&d->rule + sizeof(uint16_t),
+ bcopy((char *)&d->rule + sizeof(uint16_t),
&set, sizeof(uint8_t));
if (set != use_set - 1)
continue;
@@ -2603,7 +2603,7 @@ list(int ac, char *av[], int show_counters)
printf("## Dynamic rules (%d):\n", ndyn);
for (n = 0, d = dynrules; n < ndyn; n++, d++) {
if (use_set) {
- bcopy(&d->rule + sizeof(uint16_t),
+ bcopy((char *)&d->rule + sizeof(uint16_t),
&set, sizeof(uint8_t));
if (set != use_set - 1)
continue;
@@ -2660,7 +2660,7 @@ list(int ac, char *av[], int show_counters)
if (rulenum > rnum)
break;
if (use_set) {
- bcopy(&d->rule + sizeof(uint16_t),
+ bcopy((char *)&d->rule + sizeof(uint16_t),
&set, sizeof(uint8_t));
if (set != use_set - 1)
continue;
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index 576da69..b4cb78c 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -4404,7 +4404,8 @@ ipfw_getrules(struct ip_fw_chain *chain, void *buf, size_t space)
* store set number into high word of
* dst->rule pointer.
*/
- bcopy(&(p->rule->set), &dst->rule +
+ bcopy(&(p->rule->set),
+ (char *)&dst->rule +
sizeof(p->rule->rulenum),
sizeof(p->rule->set));
/*
@@ -5042,6 +5043,8 @@ ipfw_destroy(void)
reap_rules(reap);
IPFW_DYN_LOCK_DESTROY();
uma_zdestroy(ipfw_dyn_rule_zone);
+ if (ipfw_dyn_v != NULL)
+ free(ipfw_dyn_v, M_IPFW);
IPFW_LOCK_DESTROY(&layer3_chain);
#ifdef INET6
OpenPOWER on IntegriCloud