xt_AUDIT.c: remove ipv6 dependencies
Subsystems (2)
PATCH 1/1 xt_AUDIT.c: remove ipv6 dependencies
All,
This patch follows the one I submitted yesterday and removes the dependencies on ipv6 allowing the AUDIT target be compiled on systems where no ipv6 is implemented or running.
--- net/netfilter/xt_AUDIT.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)
net/netfilter/xt_AUDIT.c +14 -2
@@ -23,14 +23,18 @@#ifdef CONFIG_NF_CONNTRACK_SECMARK #include <linux/security.h> #endif +#ifdef CONFIG_IPV6 #include <net/ipv6.h> +#endif #include <net/ip.h> MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Thomas Graf <[email protected]>" );MODULE_DESCRIPTION ("Xtables: creates audit records for dropped/accepted packets" );MODULE_ALIAS ("ipt_AUDIT" ); +#ifdef CONFIG_IPV6 MODULE_ALIAS ("ip6t_AUDIT" ); +#endif MODULE_ALIAS ("ebt_AUDIT" );MODULE_ALIAS ("arpt_AUDIT" );
@@ -55,8 +59,10 @@ static void audit_proto(struct audit_buffer *ab, struct sk_buff *skb, }break ; -case IPPROTO_ICMP : -case IPPROTO_ICMPV6 : { +#ifdef CONFIG_IPV6 +case IPPROTO_ICMPV6 : +#endif +case IPPROTO_ICMP : {const u8 *iptr;u8 _ih[2 ];
@@ -96,6 +102,7 @@ static void audit_ip4(struct audit_buffer *ab, struct sk_buff *skb)audit_proto (ab, skb, ih->protocol, ih->ihl *4 ); } +#ifdef CONFIG_IPV6 static void audit_ip6 (struct audit_buffer *ab,struct sk_buff *skb) {struct ipv6hdr _ip6h;
@@ -120,6 +127,7 @@ static void audit_ip6(struct audit_buffer *ab, struct sk_buff *skb) audit_proto(ab, skb, nexthdr, offset); } +#endif static unsigned int audit_tg (struct sk_buff *skb,const struct xt_action_param *par) {
@@ -160,10 +168,12 @@ audit_tg(struct sk_buff *skb, const struct xt_action_param *par)case __constant_htons (ETH_P_IP ):audit_ip4 (ab, skb);break ; +#ifdef CONFIG_IPV6 case __constant_htons (ETH_P_IPV6 ):audit_ip6 (ab, skb);break ; +#endif } } }
@@ -172,10 +182,12 @@ audit_tg(struct sk_buff *skb, const struct xt_action_param *par)case NFPROTO_IPV4 :audit_ip4 (ab, skb);break ; +#ifdef CONFIG_IPV6 case NFPROTO_IPV6 :audit_ip6 (ab, skb);break ; +#endif }audit_log_end (ab);
Signature · 1 line
1.7.3.4
Quoted 17 lines · Mr Dash Four
All,
This patch follows the one I submitted yesterday and removes the dependencies on ipv6 allowing the AUDIT target be compiled on systems where no ipv6 is implemented or running.
Signed-off-by Mr Dash Four <[email protected]>--- net/netfilter/xt_AUDIT.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)net/netfilter/xt_AUDIT.c +0
-0
net/netfilter/xt_AUDIT.c line 28
Quoted 6 lines
net/netfilter/xt_AUDIT.c +2
-0@@ -23,14 +23,18 @@#ifdef CONFIG_NF_CONNTRACK_SECMARK #include <linux/security.h> #endif +#ifdef CONFIG_IPV6 #include <net/ipv6.h> +#endif
Well, what happens if I want ipv6 as a module, and ipv6 support in xt_AUDIT ?
Its not clear why you beliebe this patch is needed.
I have a kernel without IPV6, and xt_AUDIT compiles fine here, it even loads properly.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Eric Dumazet
Its not clear why you beliebe this patch is needed.
I have a kernel without IPV6, and
xt_AUDITcompiles fine here, it even loads properly.
The patch is not required. The protocol definitions and header parsing functions are available even if IPv6 is not selected.
Quoted 10 lines
Quoted 6 lines
Its not clear why you beliebe this patch is needed.
I have a kernel without IPV6, and
xt_AUDITcompiles fine here, it even loads properly.The patch is not required. The protocol definitions and header parsing functions are available even if IPv6 is not selected.
I had errors when I tried to compile it in (I do not have ipv6 at all), hence I introduced the latest patch - with that patch everything compiles and runs without problems.
Quoted 6 lines · Mr Dash Four
Quoted 6 lines
Quoted 5 lines
Its not clear why you beliebe this patch is needed.
I have a kernel without IPV6, and
xt_AUDITcompiles fine here, it even loads properly.
Quoted 6 lines
Quoted 3 lines
The patch is not required. The protocol definitions and header parsing functions are available even if IPv6 is not selected.
I had errors when I tried to compile it in (I do not have ipv6 at all), hence I introduced the latest patch - with that patch everything compiles and runs without problems.
Could you provide the config combination which results in the compile errors?