}
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;
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);
memset(mptr, 0xFF,
IP6T_ALIGN(sizeof(struct ip6t_entry_target))
- + xtables_targets->userspacesize);
+ + target->userspacesize);
return mask;
}
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];
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);
}
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;
mask = xtables_calloc(1, size
+ IPT_ALIGN(sizeof(struct ipt_entry_target))
- + xtables_targets->size);
+ + target->size);
memset(mask, 0xFF, sizeof(struct ipt_entry));
mptr = mask + sizeof(struct ipt_entry);
memset(mptr, 0xFF,
IPT_ALIGN(sizeof(struct ipt_entry_target))
- + xtables_targets->userspacesize);
+ + target->userspacesize);
return mask;
}
const struct in_addr dmasks[],
int verbose,
struct iptc_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->ip.src.s_addr = saddrs[i].s_addr;
fw->ip.smsk.s_addr = smasks[i].s_addr;
nsaddrs, saddrs, smasks,
ndaddrs, daddrs, dmasks,
options&OPT_VERBOSE,
- *handle, matches);
+ *handle, matches, target);
break;
case CMD_DELETE_NUM:
ret = iptc_delete_num_entry(chain, rulenum - 1, *handle);