diff options
Diffstat (limited to 'ip6tables.c')
-rw-r--r-- | ip6tables.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ip6tables.c b/ip6tables.c index 8f653e8e..53a1a5df 100644 --- a/ip6tables.c +++ b/ip6tables.c @@ -803,7 +803,8 @@ insert_entry(const ip6t_chainlabel chain, } static unsigned char * -make_delete_mask(struct xtables_rule_match *matches) +make_delete_mask(struct xtables_rule_match *matches, + const struct xtables_target *target) { /* Establish mask for comparison */ unsigned int size; @@ -816,7 +817,7 @@ make_delete_mask(struct xtables_rule_match *matches) mask = xtables_calloc(1, size + IP6T_ALIGN(sizeof(struct ip6t_entry_target)) - + xtables_targets->size); + + target->size); memset(mask, 0xFF, sizeof(struct ip6t_entry)); mptr = mask + sizeof(struct ip6t_entry); @@ -830,7 +831,7 @@ make_delete_mask(struct xtables_rule_match *matches) memset(mptr, 0xFF, IP6T_ALIGN(sizeof(struct ip6t_entry_target)) - + xtables_targets->userspacesize); + + target->userspacesize); return mask; } @@ -846,13 +847,14 @@ delete_entry(const ip6t_chainlabel chain, const struct in6_addr dmasks[], int verbose, struct ip6tc_handle *handle, - struct xtables_rule_match *matches) + struct xtables_rule_match *matches, + const struct xtables_target *target) { unsigned int i, j; int ret = 1; unsigned char *mask; - mask = make_delete_mask(matches); + mask = make_delete_mask(matches, target); for (i = 0; i < nsaddrs; i++) { fw->ipv6.src = saddrs[i]; fw->ipv6.smsk = smasks[i]; @@ -1938,7 +1940,7 @@ int do_command6(int argc, char *argv[], char **table, struct ip6tc_handle **hand nsaddrs, saddrs, smasks, ndaddrs, daddrs, dmasks, options&OPT_VERBOSE, - *handle, matches); + *handle, matches, target); break; case CMD_DELETE_NUM: ret = ip6tc_delete_num_entry(chain, rulenum - 1, *handle); |