* [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
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 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 1 sibling, 0 replies; 20+ messages in thread From: David Miller @ 2010-09-20 17:06 UTC (permalink / raw) To: eric.dumazet; +Cc: netdev From: Eric Dumazet <eric.dumazet@gmail.com> Date: Mon, 20 Sep 2010 15:01:40 +0200 > 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> Applied to net-2.6, thanks Eric. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 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 1 sibling, 1 reply; 20+ messages in thread From: Herbert Xu @ 2010-09-28 8:41 UTC (permalink / raw) To: Eric Dumazet; +Cc: davem, netdev Eric Dumazet <eric.dumazet@gmail.com> wrote: > 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> To do this safely, we also need to disallow IPV6=m and GRE=y. Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-28 8:41 ` Herbert Xu @ 2010-09-28 8:48 ` Eric Dumazet 2010-09-29 4:18 ` Eric Dumazet 0 siblings, 1 reply; 20+ messages in thread From: Eric Dumazet @ 2010-09-28 8:48 UTC (permalink / raw) To: Herbert Xu; +Cc: davem, netdev Le mardi 28 septembre 2010 à 17:41 +0900, Herbert Xu a écrit : > Eric Dumazet <eric.dumazet@gmail.com> wrote: > > 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> > > To do this safely, we also need to disallow IPV6=m and GRE=y. > > Cheers, Hmm you are right, I'll cook a patch. Thanks ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-28 8:48 ` Eric Dumazet @ 2010-09-29 4:18 ` Eric Dumazet 2010-09-29 4:24 ` Eric Dumazet 0 siblings, 1 reply; 20+ messages in thread From: Eric Dumazet @ 2010-09-29 4:18 UTC (permalink / raw) To: Herbert Xu; +Cc: davem, netdev, Patrick McHardy Le mardi 28 septembre 2010 à 10:48 +0200, Eric Dumazet a écrit : > Le mardi 28 septembre 2010 à 17:41 +0900, Herbert Xu a écrit : > > Eric Dumazet <eric.dumazet@gmail.com> wrote: > > > 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> > > > > To do this safely, we also need to disallow IPV6=m and GRE=y. > > > > Cheers, > I even remember Patrick warned about this 30 months ago.... Doh... http://www.kerneltrap.com/mailarchive/linux-netdev/2008/1/22/590393 Given its now rare ipv6 is not loaded, what about following patch ? Thanks ! Tested here, with a non loaded ipv6 module. [PATCH] ipv6: introduce call_icmpv6_send() ip_gre module has a dependency against IPv6: It needs to call icmpv6_send(), while this symbol is available only if IPv6 module is loaded (or static) Introduce call_icmpv6_send(), provided in core network, to indirectly call icmpv6_send() function if available. Reported-by: Patrick McHardy <kaber@trash.net> Reported-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> --- include/net/icmp.h | 6 ++++++ net/ipv4/icmp.c | 33 +++++++++++++++++++++++++++++++++ net/ipv4/ip_gre.c | 2 +- net/ipv6/icmp.c | 2 ++ 4 files changed, 42 insertions(+), 1 deletion(-) diff --git a/include/net/icmp.h b/include/net/icmp.h index 6e991e0..ec45a4f 100644 --- a/include/net/icmp.h +++ b/include/net/icmp.h @@ -48,4 +48,10 @@ extern void icmp_out_count(struct net *net, unsigned char type); /* Move into dst.h ? */ extern int xrlim_allow(struct dst_entry *dst, int timeout); +extern int register_icmpv6_send(void (*func)(struct sk_buff *skb, u8 type, + u8 code, __u32 info)); +extern int unregister_icmpv6_send(void); +extern void call_icmpv6_send(struct sk_buff *skb, u8 type, + u8 code, __u32 info); + #endif /* _ICMP_H */ diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index a0d847c..4c5b817 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -1217,3 +1217,36 @@ int __init icmp_init(void) { return register_pernet_subsys(&icmp_sk_ops); } + + +/* wrappers to call icmpv6_send() if ipv6 module is loaded */ + +static void __rcu (*icmpv6_send_ptr)(struct sk_buff *skb, u8 type, u8 code, + __u32 info); + +int register_icmpv6_send(void (*func)(struct sk_buff *skb, u8 type, u8 code, + __u32 info)) +{ + rcu_assign_pointer(icmpv6_send_ptr, func); + return 0; +} +EXPORT_SYMBOL(register_icmpv6_send); + +int unregister_icmpv6_send(void) +{ + rcu_assign_pointer(icmpv6_send_ptr, NULL); + synchronize_rcu(); + return 0; +} +EXPORT_SYMBOL(unregister_icmpv6_send); + +/* called with rcu_read_lock */ +void call_icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info) +{ + void (*func)(struct sk_buff *skb, u8 type, u8 code, __u32 info); + + func = rcu_dereference(icmpv6_send_ptr); + if (func) + (*func)(skb, type, code, info); +} +EXPORT_SYMBOL(call_icmpv6_send); diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 35c93e8..6cbd37c 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -788,7 +788,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev } if (mtu >= IPV6_MIN_MTU && mtu < skb->len - tunnel->hlen + gre_hlen) { - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); + call_icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); ip_rt_put(rt); goto tx_error; } diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 03e62f9..25e9ad6 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -862,6 +862,7 @@ int __init icmpv6_init(void) err = -EAGAIN; if (inet6_add_protocol(&icmpv6_protocol, IPPROTO_ICMPV6) < 0) goto fail; + register_icmpv6_send(icmpv6_send); return 0; fail: @@ -874,6 +875,7 @@ void icmpv6_cleanup(void) { unregister_pernet_subsys(&icmpv6_sk_ops); inet6_del_protocol(&icmpv6_protocol, IPPROTO_ICMPV6); + unregister_icmpv6_send(); } ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 4:18 ` Eric Dumazet @ 2010-09-29 4:24 ` Eric Dumazet 2010-09-29 4:36 ` Herbert Xu 0 siblings, 1 reply; 20+ messages in thread From: Eric Dumazet @ 2010-09-29 4:24 UTC (permalink / raw) To: Herbert Xu; +Cc: davem, netdev, Patrick McHardy Le mercredi 29 septembre 2010 à 06:18 +0200, Eric Dumazet a écrit : > diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c > index 03e62f9..25e9ad6 100644 > --- a/net/ipv6/icmp.c > +++ b/net/ipv6/icmp.c > @@ -862,6 +862,7 @@ int __init icmpv6_init(void) > err = -EAGAIN; > if (inet6_add_protocol(&icmpv6_protocol, IPPROTO_ICMPV6) < 0) > goto fail; > + register_icmpv6_send(icmpv6_send); > return 0; > > fail: > @@ -874,6 +875,7 @@ void icmpv6_cleanup(void) > { > unregister_pernet_subsys(&icmpv6_sk_ops); > inet6_del_protocol(&icmpv6_protocol, IPPROTO_ICMPV6); > + unregister_icmpv6_send(); > } Well, we all know icmpv6_cleanup() is not really called (or can we really unload ipv6 ?). But unregister_icmpv6_send() should be the first call in it. Updated patch : [PATCH v2] ipv6: introduce call_icmpv6_send() ip_gre module has a dependency against IPv6: It needs to call icmpv6_send(), while this symbol is available only if IPv6 module is loaded (or static) Introduce call_icmpv6_send(), provided in core network, to indirectly call icmpv6_send() function if available. Reported-by: Patrick McHardy <kaber@trash.net> Reported-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> --- include/net/icmp.h | 6 ++++++ net/ipv4/icmp.c | 33 +++++++++++++++++++++++++++++++++ net/ipv4/ip_gre.c | 2 +- net/ipv6/icmp.c | 2 ++ 4 files changed, 42 insertions(+), 1 deletion(-) diff --git a/include/net/icmp.h b/include/net/icmp.h index 6e991e0..ec45a4f 100644 --- a/include/net/icmp.h +++ b/include/net/icmp.h @@ -48,4 +48,10 @@ extern void icmp_out_count(struct net *net, unsigned char type); /* Move into dst.h ? */ extern int xrlim_allow(struct dst_entry *dst, int timeout); +extern int register_icmpv6_send(void (*func)(struct sk_buff *skb, u8 type, + u8 code, __u32 info)); +extern int unregister_icmpv6_send(void); +extern void call_icmpv6_send(struct sk_buff *skb, u8 type, + u8 code, __u32 info); + #endif /* _ICMP_H */ diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index a0d847c..4c5b817 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -1217,3 +1217,36 @@ int __init icmp_init(void) { return register_pernet_subsys(&icmp_sk_ops); } + + +/* wrappers to call icmpv6_send() if ipv6 module is loaded */ + +static void __rcu (*icmpv6_send_ptr)(struct sk_buff *skb, u8 type, u8 code, + __u32 info); + +int register_icmpv6_send(void (*func)(struct sk_buff *skb, u8 type, u8 code, + __u32 info)) +{ + rcu_assign_pointer(icmpv6_send_ptr, func); + return 0; +} +EXPORT_SYMBOL(register_icmpv6_send); + +int unregister_icmpv6_send(void) +{ + rcu_assign_pointer(icmpv6_send_ptr, NULL); + synchronize_rcu(); + return 0; +} +EXPORT_SYMBOL(unregister_icmpv6_send); + +/* called with rcu_read_lock */ +void call_icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info) +{ + void (*func)(struct sk_buff *skb, u8 type, u8 code, __u32 info); + + func = rcu_dereference(icmpv6_send_ptr); + if (func) + (*func)(skb, type, code, info); +} +EXPORT_SYMBOL(call_icmpv6_send); diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 35c93e8..6cbd37c 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -788,7 +788,7 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev } if (mtu >= IPV6_MIN_MTU && mtu < skb->len - tunnel->hlen + gre_hlen) { - icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); + call_icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); ip_rt_put(rt); goto tx_error; } diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 03e62f9..2d0f56b 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -862,6 +862,7 @@ int __init icmpv6_init(void) err = -EAGAIN; if (inet6_add_protocol(&icmpv6_protocol, IPPROTO_ICMPV6) < 0) goto fail; + register_icmpv6_send(icmpv6_send); return 0; fail: @@ -872,6 +873,7 @@ fail: void icmpv6_cleanup(void) { + unregister_icmpv6_send(); unregister_pernet_subsys(&icmpv6_sk_ops); inet6_del_protocol(&icmpv6_protocol, IPPROTO_ICMPV6); } ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 4:24 ` Eric Dumazet @ 2010-09-29 4:36 ` Herbert Xu 2010-09-29 4:41 ` David Miller 2010-09-29 6:24 ` Eric Dumazet 0 siblings, 2 replies; 20+ messages in thread From: Herbert Xu @ 2010-09-29 4:36 UTC (permalink / raw) To: Eric Dumazet; +Cc: davem, netdev, Patrick McHardy On Wed, Sep 29, 2010 at 06:24:55AM +0200, Eric Dumazet wrote: > > Well, we all know icmpv6_cleanup() is not really called (or can we > really unload ipv6 ?). > > But unregister_icmpv6_send() should be the first call in it. Do we really need to support IPV6=m and GRE=y? It might be simpler to just behave as if IPv6 is off when this combination is given. Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 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:24 ` Eric Dumazet 1 sibling, 1 reply; 20+ messages in thread From: David Miller @ 2010-09-29 4:41 UTC (permalink / raw) To: herbert; +Cc: eric.dumazet, netdev, kaber From: Herbert Xu <herbert@gondor.apana.org.au> Date: Wed, 29 Sep 2010 13:36:42 +0900 > On Wed, Sep 29, 2010 at 06:24:55AM +0200, Eric Dumazet wrote: >> >> Well, we all know icmpv6_cleanup() is not really called (or can we >> really unload ipv6 ?). >> >> But unregister_icmpv6_send() should be the first call in it. > > Do we really need to support IPV6=m and GRE=y? It might be simpler > to just behave as if IPv6 is off when this combination is given. I think we should make it so that the Kconfig rule only allows "m" or "n" for IP_GRE when IPV6=m That's how we handle this kind of situation elsewhere, f.e. see bonding. Eric, please cook up a patch which does this, I think the magic Kconfig dependency formula for this is: depends on IPV6 || IPV6=n Thanks! ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 4:41 ` David Miller @ 2010-09-29 5:38 ` David Miller 2010-09-29 6:47 ` Eric Dumazet 0 siblings, 1 reply; 20+ messages in thread From: David Miller @ 2010-09-29 5:38 UTC (permalink / raw) To: herbert; +Cc: eric.dumazet, netdev, kaber From: David Miller <davem@davemloft.net> Date: Tue, 28 Sep 2010 21:41:32 -0700 (PDT) > Eric, please cook up a patch which does this, I think the > magic Kconfig dependency formula for this is: > > depends on IPV6 || IPV6=n > > Thanks! Nevermind, I took care of it :-) -------------------- ip_gre: Fix dependencies wrt. ipv6. The GRE tunnel driver needs to invoke icmpv6 helpers in the ipv6 stack when ipv6 support is enabled. Therefore if IPV6 is enabled, we have to enforce that GRE's enabling (modular or static) matches that of ipv6. Reported-by: Patrick McHardy <kaber@trash.net> Reported-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net> --- net/ipv4/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index 571f895..72380a3 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig @@ -217,6 +217,7 @@ config NET_IPIP config NET_IPGRE tristate "IP: GRE tunnels over IP" + depends on IPV6 || IPV6=n help Tunneling means encapsulating data of one protocol type within another protocol and sending it over a channel that understands the -- 1.7.3 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 5:38 ` David Miller @ 2010-09-29 6:47 ` Eric Dumazet 2010-09-29 7:25 ` David Miller 0 siblings, 1 reply; 20+ messages in thread From: Eric Dumazet @ 2010-09-29 6:47 UTC (permalink / raw) To: David Miller; +Cc: herbert, netdev, kaber Le mardi 28 septembre 2010 à 22:38 -0700, David Miller a écrit : > From: David Miller <davem@davemloft.net> > Date: Tue, 28 Sep 2010 21:41:32 -0700 (PDT) > > > Eric, please cook up a patch which does this, I think the > > magic Kconfig dependency formula for this is: > > > > depends on IPV6 || IPV6=n > > > > Thanks! > > Nevermind, I took care of it :-) > > -------------------- > ip_gre: Fix dependencies wrt. ipv6. > > The GRE tunnel driver needs to invoke icmpv6 helpers in the > ipv6 stack when ipv6 support is enabled. > > Therefore if IPV6 is enabled, we have to enforce that GRE's > enabling (modular or static) matches that of ipv6. > > Reported-by: Patrick McHardy <kaber@trash.net> > Reported-by: Herbert Xu <herbert@gondor.apana.org.au> > Signed-off-by: David S. Miller <davem@davemloft.net> > --- > net/ipv4/Kconfig | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig > index 571f895..72380a3 100644 > --- a/net/ipv4/Kconfig > +++ b/net/ipv4/Kconfig > @@ -217,6 +217,7 @@ config NET_IPIP > > config NET_IPGRE > tristate "IP: GRE tunnels over IP" > + depends on IPV6 || IPV6=n > help > Tunneling means encapsulating data of one protocol type within > another protocol and sending it over a channel that understands the Still, this does not solve the problem for people wanting to disable ipv6 module load or disable it ? install ipv6 /bin/true or options ipv6 disable=1 I tried both ways with my patch and could load ip_gre module. But in both ways, register_icmpv6_send() was not called so ip_gre could not try to use icmpv6_send() ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 6:47 ` Eric Dumazet @ 2010-09-29 7:25 ` David Miller 2010-09-29 7:45 ` Eric Dumazet 0 siblings, 1 reply; 20+ messages in thread From: David Miller @ 2010-09-29 7:25 UTC (permalink / raw) To: eric.dumazet; +Cc: herbert, netdev, kaber From: Eric Dumazet <eric.dumazet@gmail.com> Date: Wed, 29 Sep 2010 08:47:28 +0200 > Still, this does not solve the problem for people wanting to disable > ipv6 module load or disable it ? > > install ipv6 /bin/true > > or > > options ipv6 disable=1 If you set the disable option, it should do the right thing. Since the ipv6 symbols will be available, yet the ipv6 stack won't by default bring up ipv6 addresses onto interfaces etc. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 7:25 ` David Miller @ 2010-09-29 7:45 ` Eric Dumazet 2010-09-29 7:57 ` Herbert Xu 2010-09-29 7:59 ` David Miller 0 siblings, 2 replies; 20+ messages in thread From: Eric Dumazet @ 2010-09-29 7:45 UTC (permalink / raw) To: David Miller; +Cc: herbert, netdev, kaber Le mercredi 29 septembre 2010 à 00:25 -0700, David Miller a écrit : > From: Eric Dumazet <eric.dumazet@gmail.com> > Date: Wed, 29 Sep 2010 08:47:28 +0200 > > > Still, this does not solve the problem for people wanting to disable > > ipv6 module load or disable it ? > > > > install ipv6 /bin/true > > > > or > > > > options ipv6 disable=1 > > If you set the disable option, it should do the right thing. Since > the ipv6 symbols will be available, yet the ipv6 stack won't by > default bring up ipv6 addresses onto interfaces etc. I must miss something obvious. David, with your patch, I cant : install ipv6 /bin/true modprobe ip_gre FATAL: Error inserting ip_gre (/lib/modules/2.6.36-rc6-dirty/kernel/net/ipv4/ip_gre.ko): Unknown symbol in module, or unknown parameter (see dmesg) [ 223.150774] ip_gre: Unknown symbol icmpv6_send (err 0) Thanks ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 7:45 ` Eric Dumazet @ 2010-09-29 7:57 ` Herbert Xu 2010-09-29 8:00 ` David Miller 2010-09-29 7:59 ` David Miller 1 sibling, 1 reply; 20+ messages in thread From: Herbert Xu @ 2010-09-29 7:57 UTC (permalink / raw) To: Eric Dumazet; +Cc: David Miller, netdev, kaber On Wed, Sep 29, 2010 at 09:45:52AM +0200, Eric Dumazet wrote: . > > > install ipv6 /bin/true > > > > > > or > > > > > > options ipv6 disable=1 > > > > If you set the disable option, it should do the right thing. Since > > the ipv6 symbols will be available, yet the ipv6 stack won't by > > default bring up ipv6 addresses onto interfaces etc. > > I must miss something obvious. > > David, with your patch, I cant : > > install ipv6 /bin/true > modprobe ip_gre Does it work if you use options ipv6 disable=1 If so then that's what should be used in this case. Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 7:57 ` Herbert Xu @ 2010-09-29 8:00 ` David Miller 2010-09-29 8:03 ` Herbert Xu 0 siblings, 1 reply; 20+ messages in thread From: David Miller @ 2010-09-29 8:00 UTC (permalink / raw) To: herbert; +Cc: eric.dumazet, netdev, kaber From: Herbert Xu <herbert@gondor.apana.org.au> Date: Wed, 29 Sep 2010 16:57:58 +0900 > On Wed, Sep 29, 2010 at 09:45:52AM +0200, Eric Dumazet wrote: > . >> > > install ipv6 /bin/true >> > > >> > > or >> > > >> > > options ipv6 disable=1 >> > >> > If you set the disable option, it should do the right thing. Since >> > the ipv6 symbols will be available, yet the ipv6 stack won't by >> > default bring up ipv6 addresses onto interfaces etc. >> >> I must miss something obvious. >> >> David, with your patch, I cant : >> >> install ipv6 /bin/true >> modprobe ip_gre > > Does it work if you use > > options ipv6 disable=1 > > If so then that's what should be used in this case. That's what one should use "always" :-) Bonding has the same issue, and it's why we added the disable module option, so that the /bin/true stupidity could stop. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 8:00 ` David Miller @ 2010-09-29 8:03 ` Herbert Xu 2010-09-29 8:22 ` Eric Dumazet 0 siblings, 1 reply; 20+ messages in thread From: Herbert Xu @ 2010-09-29 8:03 UTC (permalink / raw) To: David Miller; +Cc: eric.dumazet, netdev, kaber On Wed, Sep 29, 2010 at 01:00:56AM -0700, David Miller wrote: . > > options ipv6 disable=1 > > > > If so then that's what should be used in this case. > > That's what one should use "always" :-) > > Bonding has the same issue, and it's why we added the > disable module option, so that the /bin/true stupidity > could stop. Right, that settles it :) -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 8:03 ` Herbert Xu @ 2010-09-29 8:22 ` Eric Dumazet 0 siblings, 0 replies; 20+ messages in thread From: Eric Dumazet @ 2010-09-29 8:22 UTC (permalink / raw) To: Herbert Xu; +Cc: David Miller, netdev, kaber Le mercredi 29 septembre 2010 à 17:03 +0900, Herbert Xu a écrit : > On Wed, Sep 29, 2010 at 01:00:56AM -0700, David Miller wrote: > . > > > options ipv6 disable=1 > > > > > > If so then that's what should be used in this case. > > > > That's what one should use "always" :-) > > > > Bonding has the same issue, and it's why we added the > > disable module option, so that the /bin/true stupidity > > could stop. > > Right, that settles it :) OK guys, you convinced me ;) ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 7:45 ` Eric Dumazet 2010-09-29 7:57 ` Herbert Xu @ 2010-09-29 7:59 ` David Miller 1 sibling, 0 replies; 20+ messages in thread From: David Miller @ 2010-09-29 7:59 UTC (permalink / raw) To: eric.dumazet; +Cc: herbert, netdev, kaber From: Eric Dumazet <eric.dumazet@gmail.com> Date: Wed, 29 Sep 2010 09:45:52 +0200 > I must miss something obvious. > > David, with your patch, I cant : > > install ipv6 /bin/true > modprobe ip_gre > > FATAL: Error inserting ip_gre > (/lib/modules/2.6.36-rc6-dirty/kernel/net/ipv4/ip_gre.ko): Unknown > symbol in module, or unknown parameter (see dmesg) > > [ 223.150774] ip_gre: Unknown symbol icmpv6_send (err 0) > Try the options disable=1, that works. We already prevent the "/bin/true" stupidity from working in the bonding driver, that's why we added the disable module option to ipv6. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 4:36 ` Herbert Xu 2010-09-29 4:41 ` David Miller @ 2010-09-29 6:24 ` Eric Dumazet 2010-09-29 7:11 ` Herbert Xu 1 sibling, 1 reply; 20+ messages in thread From: Eric Dumazet @ 2010-09-29 6:24 UTC (permalink / raw) To: Herbert Xu; +Cc: davem, netdev, Patrick McHardy Le mercredi 29 septembre 2010 à 13:36 +0900, Herbert Xu a écrit : > On Wed, Sep 29, 2010 at 06:24:55AM +0200, Eric Dumazet wrote: > > > > Well, we all know icmpv6_cleanup() is not really called (or can we > > really unload ipv6 ?). > > > > But unregister_icmpv6_send() should be the first call in it. > > Do we really need to support IPV6=m and GRE=y? It might be simpler > to just behave as if IPv6 is off when this combination is given. > > Cheers, Well, sometimes people wants to : /etc/modprobe.conf install ipv6 /bin/true Yet, be able to load ip_gre as a module so IPV6=m, GRE=m, ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 6:24 ` Eric Dumazet @ 2010-09-29 7:11 ` Herbert Xu 2010-09-29 7:26 ` David Miller 0 siblings, 1 reply; 20+ messages in thread From: Herbert Xu @ 2010-09-29 7:11 UTC (permalink / raw) To: Eric Dumazet; +Cc: davem, netdev, Patrick McHardy On Wed, Sep 29, 2010 at 08:24:03AM +0200, Eric Dumazet wrote: . > Well, sometimes people wants to : > > /etc/modprobe.conf > install ipv6 /bin/true > > > Yet, be able to load ip_gre as a module > > so IPV6=m, GRE=m, I think if we cared about this we should provide ways to disable IPv6 (if there aren't any already) even when the module is loaded or the code is built-in. BTW, I think the code isn't 100% safe as is as it tries to access skb_dst unconditionally in the IPv6 case. If the packet came via a remote source (e.g., bridging and virt) it may not have an IPv6 skb_dst at all. Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] ip_gre: CONFIG_IPV6_MODULE support 2010-09-29 7:11 ` Herbert Xu @ 2010-09-29 7:26 ` David Miller 0 siblings, 0 replies; 20+ messages in thread From: David Miller @ 2010-09-29 7:26 UTC (permalink / raw) To: herbert; +Cc: eric.dumazet, netdev, kaber From: Herbert Xu <herbert@gondor.apana.org.au> Date: Wed, 29 Sep 2010 16:11:58 +0900 > On Wed, Sep 29, 2010 at 08:24:03AM +0200, Eric Dumazet wrote: > . >> Well, sometimes people wants to : >> >> /etc/modprobe.conf >> install ipv6 /bin/true >> >> >> Yet, be able to load ip_gre as a module >> >> so IPV6=m, GRE=m, > > I think if we cared about this we should provide ways to disable > IPv6 (if there aren't any already) even when the module is loaded > or the code is built-in. We do provide this functionality already. ^ permalink raw reply [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).