From dcd1ad89105faf1f3a9a3febdb970b70c5466518 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 9 May 2011 19:32:05 +0200 Subject: src: replace old IP*T_ALIGN macros Signed-off-by: Jan Engelhardt --- iptables.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'iptables.c') diff --git a/iptables.c b/iptables.c index cc7525a1..d01e8281 100644 --- a/iptables.c +++ b/iptables.c @@ -771,10 +771,10 @@ make_delete_mask(const struct xtables_rule_match *matches, size = sizeof(struct ipt_entry); for (matchp = matches; matchp; matchp = matchp->next) - size += IPT_ALIGN(sizeof(struct ipt_entry_match)) + matchp->match->size; + size += XT_ALIGN(sizeof(struct ipt_entry_match)) + matchp->match->size; mask = xtables_calloc(1, size - + IPT_ALIGN(sizeof(struct ipt_entry_target)) + + XT_ALIGN(sizeof(struct ipt_entry_target)) + target->size); memset(mask, 0xFF, sizeof(struct ipt_entry)); @@ -782,13 +782,13 @@ make_delete_mask(const struct xtables_rule_match *matches, for (matchp = matches; matchp; matchp = matchp->next) { memset(mptr, 0xFF, - IPT_ALIGN(sizeof(struct ipt_entry_match)) + XT_ALIGN(sizeof(struct ipt_entry_match)) + matchp->match->userspacesize); - mptr += IPT_ALIGN(sizeof(struct ipt_entry_match)) + matchp->match->size; + mptr += XT_ALIGN(sizeof(struct ipt_entry_match)) + matchp->match->size; } memset(mptr, 0xFF, - IPT_ALIGN(sizeof(struct ipt_entry_target)) + XT_ALIGN(sizeof(struct ipt_entry_target)) + target->userspacesize); return mask; @@ -1330,7 +1330,7 @@ static void command_default(struct iptables_command_state *cs) cs->proto_used = 1; - size = IPT_ALIGN(sizeof(struct ipt_entry_match)) + m->size; + size = XT_ALIGN(sizeof(struct ipt_entry_match)) + m->size; m->m = xtables_calloc(1, size); m->m->u.match_size = size; @@ -1376,7 +1376,7 @@ static void command_jump(struct iptables_command_state *cs) if (cs->target == NULL) return; - size = IPT_ALIGN(sizeof(struct ipt_entry_target)) + size = XT_ALIGN(sizeof(struct ipt_entry_target)) + cs->target->size; cs->target->t = xtables_calloc(1, size); @@ -1407,7 +1407,7 @@ static void command_match(struct iptables_command_state *cs) "unexpected ! flag before --match"); m = xtables_find_match(optarg, XTF_LOAD_MUST_SUCCEED, &cs->matches); - size = IPT_ALIGN(sizeof(struct ipt_entry_match)) + m->size; + size = XT_ALIGN(sizeof(struct ipt_entry_match)) + m->size; m->m = xtables_calloc(1, size); m->m->u.match_size = size; strcpy(m->m->u.user.name, m->name); -- cgit v1.2.3