[NETFILTER]: ip_tables: fix compat types
Use compat types and compat iterators when dealing with compat entries for clarity. This doesn't actually make a difference for ip_tables, but is needed for ip6_tables and arp_tables. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
30c08c41be
commit
73cd598df4
@@ -236,11 +236,6 @@ ipt_get_target(struct ipt_entry *e)
|
||||
#define IPT_ENTRY_ITERATE(entries, size, fn, args...) \
|
||||
XT_ENTRY_ITERATE(struct ipt_entry, entries, size, fn, ## args)
|
||||
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define IPT_ENTRY_ITERATE_CONTINUE(entries, size, n, fn, args...) \
|
||||
XT_ENTRY_ITERATE_CONTINUE(struct ipt_entry, entries, size, n, fn, \
|
||||
## args)
|
||||
|
||||
/*
|
||||
* Main firewall chains definitions and global var's definitions.
|
||||
*/
|
||||
@@ -316,8 +311,28 @@ struct compat_ipt_entry
|
||||
unsigned char elems[0];
|
||||
};
|
||||
|
||||
/* Helper functions */
|
||||
static inline struct ipt_entry_target *
|
||||
compat_ipt_get_target(struct compat_ipt_entry *e)
|
||||
{
|
||||
return (void *)e + e->target_offset;
|
||||
}
|
||||
|
||||
#define COMPAT_IPT_ALIGN(s) COMPAT_XT_ALIGN(s)
|
||||
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define COMPAT_IPT_MATCH_ITERATE(e, fn, args...) \
|
||||
XT_MATCH_ITERATE(struct compat_ipt_entry, e, fn, ## args)
|
||||
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define COMPAT_IPT_ENTRY_ITERATE(entries, size, fn, args...) \
|
||||
XT_ENTRY_ITERATE(struct compat_ipt_entry, entries, size, fn, ## args)
|
||||
|
||||
/* fn returns 0 to continue iteration */
|
||||
#define COMPAT_IPT_ENTRY_ITERATE_CONTINUE(entries, size, n, fn, args...) \
|
||||
XT_ENTRY_ITERATE_CONTINUE(struct compat_ipt_entry, entries, size, n, \
|
||||
fn, ## args)
|
||||
|
||||
#endif /* CONFIG_COMPAT */
|
||||
#endif /*__KERNEL__*/
|
||||
#endif /* _IPTABLES_H */
|
||||
|
||||
Reference in New Issue
Block a user