ip_gre: should take care of CONFIG_IPV6_MODULE
Subsystems (3)
If IPV6 is configured as a module, GRE code misses some IPV6 parts.
net/ipv4/ip_gre.c +4 -4
@@ -40,7 +40,7 @@#include <net/inet_ecn.h> #include <net/xfrm.h> -#ifdef CONFIG_IPV6 +#if defined(CONFIG_IPV6 ) || defined(CONFIG_IPV6_MODULE )#include <net/ipv6.h> #include <net/ip6_fib.h> #include <net/ip6_route.h>
@@ -705,7 +705,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)if ((dst = rt->rt_gateway) ==0 ) goto tx_error_icmp; } -#ifdef CONFIG_IPV6 +#if defined(CONFIG_IPV6 ) || defined(CONFIG_IPV6_MODULE ) else if (skb->protocol == htons(ETH_P_IPV6)) {struct in6_addr *addr6;int addr_type;
@@ -778,7 +778,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) goto tx_error; } } -#ifdef CONFIG_IPV6 +#if defined(CONFIG_IPV6 ) || defined(CONFIG_IPV6_MODULE ) else if (skb->protocol == htons(ETH_P_IPV6)) {struct rt6_info *rt6 = (struct rt6_info *)skb->dst;
@@ -851,7 +851,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)if ((iph->ttl = tiph->ttl) ==0 ) {if (skb->protocol ==htons (ETH_P_IP )) iph->ttl = old_iph->ttl; -#ifdef CONFIG_IPV6 +#if defined(CONFIG_IPV6 ) || defined(CONFIG_IPV6_MODULE ) else if (skb->protocol == htons(ETH_P_IPV6)) iph->ttl = ((struct ipv6hdr*)old_iph)->hop_limit;#endif
Quoted 1 line · Eric Dumazet
If IPV6 is configured as a module, GRE code misses some IPV6 parts.
I believe this is intentional to avoid a runtime dependency on ipv6. Fixing this without pulling in the ipv6 module would be preferrable.
David Miller
maintainerFrom: Patrick McHardy <[email protected]>
Date: Tue, 22 Jan 2008 09:21:26 +0100
Quoted 6 lines
Quoted 1 line · Eric Dumazet
If IPV6 is configured as a module, GRE code misses some IPV6 parts.
I believe this is intentional to avoid a runtime dependency on ipv6. Fixing this without pulling in the ipv6 module would be preferrable.
Unfortunately this is true.
The only symbol it really needs that isn't provided statically is icmpv6_send() which is very unfortunate.
Other things it wants like ipv6_addr_type() are already provided statically in net/ipv6/addrconf_core.c and the appropriate net/ipv6/Makefile:obj-y rules.