From c1a534ba0bc58c74bf06e7735c6fb0ffb27a6652 Mon Sep 17 00:00:00 2001 From: Vilmos Nebehaj Date: Mon, 28 Jun 2010 15:13:23 +0200 Subject: [PATCH] Regenerate linux/netfilter_ipv6/ip6_tables.h. Add ip6t_get_target() to kernel_known_generic_statics in libc/kernel/tools/defaults.py to be able to build ip6tables. Change-Id: Iadb885db3faa85b2d0070dc2e0ac493af6e62bb6 --- libc/kernel/common/linux/netfilter_ipv6/ip6_tables.h | 9 +++++++++ libc/kernel/tools/defaults.py | 1 + 2 files changed, 10 insertions(+) diff --git a/libc/kernel/common/linux/netfilter_ipv6/ip6_tables.h b/libc/kernel/common/linux/netfilter_ipv6/ip6_tables.h index 1687e4fea..d76a52926 100644 --- a/libc/kernel/common/linux/netfilter_ipv6/ip6_tables.h +++ b/libc/kernel/common/linux/netfilter_ipv6/ip6_tables.h @@ -173,6 +173,15 @@ struct ip6t_get_entries #define IP6T_ERROR_TARGET XT_ERROR_TARGET +static __inline__ struct ip6t_entry_target * +ip6t_get_target(struct ip6t_entry *e) +{ + return (void *)e + e->target_offset; +} + #define IP6T_MATCH_ITERATE(e, fn, args...) ({ unsigned int __i; int __ret = 0; struct ip6t_entry_match *__m; for (__i = sizeof(struct ip6t_entry); __i < (e)->target_offset; __i += __m->u.match_size) { __m = (void *)(e) + __i; __ret = fn(__m , ## args); if (__ret != 0) break; } __ret; }) + #define IP6T_ENTRY_ITERATE(entries, size, fn, args...) ({ unsigned int __i; int __ret = 0; struct ip6t_entry *__e; for (__i = 0; __i < (size); __i += __e->next_offset) { __e = (void *)(entries) + __i; __ret = fn(__e , ## args); if (__ret != 0) break; } __ret; }) + #endif + diff --git a/libc/kernel/tools/defaults.py b/libc/kernel/tools/defaults.py index 4227de74c..b35f72b5a 100644 --- a/libc/kernel/tools/defaults.py +++ b/libc/kernel/tools/defaults.py @@ -71,6 +71,7 @@ kernel_known_generic_statics = set( "__cmsg_nxthdr", # linux/socket.h "cmsg_nxthdr", # linux/socket.h "ipt_get_target", + "ip6t_get_target", ] )