netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [IPV4] ip_gre: should take care of CONFIG_IPV6_MODULE
@ 2008-01-22  7:51 Eric Dumazet
  2008-01-22  8:21 ` Patrick McHardy
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2008-01-22  7:51 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 120 bytes --]

If IPV6 is configured as a module, GRE code misses some IPV6 parts.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>


[-- Attachment #2: gre.patch --]
[-- Type: text/plain, Size: 1380 bytes --]

diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 4b93f32..beaf450 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [IPV4] ip_gre: should take care of CONFIG_IPV6_MODULE
  2008-01-22  7:51 [IPV4] ip_gre: should take care of CONFIG_IPV6_MODULE Eric Dumazet
@ 2008-01-22  8:21 ` Patrick McHardy
  2008-01-22 10:22   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick McHardy @ 2008-01-22  8:21 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David S. Miller, Linux Netdev List

Eric Dumazet wrote:
> 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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [IPV4] ip_gre: should take care of CONFIG_IPV6_MODULE
  2008-01-22  8:21 ` Patrick McHardy
@ 2008-01-22 10:22   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2008-01-22 10:22 UTC (permalink / raw)
  To: kaber; +Cc: dada1, netdev

From: Patrick McHardy <kaber@trash.net>
Date: Tue, 22 Jan 2008 09:21:26 +0100

> Eric Dumazet wrote:
> > 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-22 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-22  7:51 [IPV4] ip_gre: should take care of CONFIG_IPV6_MODULE Eric Dumazet
2008-01-22  8:21 ` Patrick McHardy
2008-01-22 10:22   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).