|
@@ -142,6 +142,12 @@ static inline int ebt_basic_match(struct ebt_entry *e, struct ethhdr *h,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline __pure
|
|
|
|
+struct ebt_entry *ebt_next_entry(const struct ebt_entry *entry)
|
|
|
|
+{
|
|
|
|
+ return (void *)entry + entry->next_offset;
|
|
|
|
+}
|
|
|
|
+
|
|
/* Do some firewalling */
|
|
/* Do some firewalling */
|
|
unsigned int ebt_do_table (unsigned int hook, struct sk_buff *skb,
|
|
unsigned int ebt_do_table (unsigned int hook, struct sk_buff *skb,
|
|
const struct net_device *in, const struct net_device *out,
|
|
const struct net_device *in, const struct net_device *out,
|
|
@@ -249,8 +255,7 @@ letsreturn:
|
|
/* jump to a udc */
|
|
/* jump to a udc */
|
|
cs[sp].n = i + 1;
|
|
cs[sp].n = i + 1;
|
|
cs[sp].chaininfo = chaininfo;
|
|
cs[sp].chaininfo = chaininfo;
|
|
- cs[sp].e = (struct ebt_entry *)
|
|
|
|
- (((char *)point) + point->next_offset);
|
|
|
|
|
|
+ cs[sp].e = ebt_next_entry(point);
|
|
i = 0;
|
|
i = 0;
|
|
chaininfo = (struct ebt_entries *) (base + verdict);
|
|
chaininfo = (struct ebt_entries *) (base + verdict);
|
|
#ifdef CONFIG_NETFILTER_DEBUG
|
|
#ifdef CONFIG_NETFILTER_DEBUG
|
|
@@ -266,8 +271,7 @@ letsreturn:
|
|
sp++;
|
|
sp++;
|
|
continue;
|
|
continue;
|
|
letscontinue:
|
|
letscontinue:
|
|
- point = (struct ebt_entry *)
|
|
|
|
- (((char *)point) + point->next_offset);
|
|
|
|
|
|
+ point = ebt_next_entry(point);
|
|
i++;
|
|
i++;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -787,7 +791,7 @@ static int check_chainloops(struct ebt_entries *chain, struct ebt_cl_stack *cl_s
|
|
/* this can't be 0, so the loop test is correct */
|
|
/* this can't be 0, so the loop test is correct */
|
|
cl_s[i].cs.n = pos + 1;
|
|
cl_s[i].cs.n = pos + 1;
|
|
pos = 0;
|
|
pos = 0;
|
|
- cl_s[i].cs.e = ((void *)e + e->next_offset);
|
|
|
|
|
|
+ cl_s[i].cs.e = ebt_next_entry(e);
|
|
e = (struct ebt_entry *)(hlp2->data);
|
|
e = (struct ebt_entry *)(hlp2->data);
|
|
nentries = hlp2->nentries;
|
|
nentries = hlp2->nentries;
|
|
cl_s[i].from = chain_nr;
|
|
cl_s[i].from = chain_nr;
|
|
@@ -797,7 +801,7 @@ static int check_chainloops(struct ebt_entries *chain, struct ebt_cl_stack *cl_s
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
letscontinue:
|
|
letscontinue:
|
|
- e = (void *)e + e->next_offset;
|
|
|
|
|
|
+ e = ebt_next_entry(e);
|
|
pos++;
|
|
pos++;
|
|
}
|
|
}
|
|
return 0;
|
|
return 0;
|