netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ip_gre: CONFIG_IPV6_MODULE support
@ 2010-09-20 13:01 Eric Dumazet
  2010-09-20 17:06 ` David Miller
  2010-09-28  8:41 ` Herbert Xu
  0 siblings, 2 replies; 20+ messages in thread
From: Eric Dumazet @ 2010-09-20 13:01 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

ipv6 can be a module, we should test CONFIG_IPV6 and CONFIG_IPV6_MODULE
to enable ipv6 bits in ip_gre.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 net/ipv4/ip_gre.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index fc20e68..2af2fbd 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -46,7 +46,7 @@
 #include <net/rtnetlink.h>
 #include <net/gre.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>
@@ -701,7 +701,7 @@ static netdev_tx_t 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;
@@ -776,7 +776,7 @@ static netdev_tx_t 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(skb);
 
@@ -852,7 +852,7 @@ static netdev_tx_t 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] 20+ messages in thread

end of thread, other threads:[~2010-09-29  8:22 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-20 13:01 [PATCH] ip_gre: CONFIG_IPV6_MODULE support Eric Dumazet
2010-09-20 17:06 ` David Miller
2010-09-28  8:41 ` Herbert Xu
2010-09-28  8:48   ` Eric Dumazet
2010-09-29  4:18     ` Eric Dumazet
2010-09-29  4:24       ` Eric Dumazet
2010-09-29  4:36         ` Herbert Xu
2010-09-29  4:41           ` David Miller
2010-09-29  5:38             ` David Miller
2010-09-29  6:47               ` Eric Dumazet
2010-09-29  7:25                 ` David Miller
2010-09-29  7:45                   ` Eric Dumazet
2010-09-29  7:57                     ` Herbert Xu
2010-09-29  8:00                       ` David Miller
2010-09-29  8:03                         ` Herbert Xu
2010-09-29  8:22                           ` Eric Dumazet
2010-09-29  7:59                     ` David Miller
2010-09-29  6:24           ` Eric Dumazet
2010-09-29  7:11             ` Herbert Xu
2010-09-29  7:26               ` 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).