Patchwork ip_gre: CONFIG_IPV6_MODULE support

login
register
mail settings
Submitter David Miller
Date Sept. 29, 2010, 5:38 a.m.
Message ID <20100928.223850.104051485.davem@davemloft.net>
Download mbox | patch
Permalink /patch/66046/
State Accepted
Delegated to: David Miller
Headers show

Comments

David Miller - Sept. 29, 2010, 5:38 a.m.
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(-)
Eric Dumazet - Sept. 29, 2010, 6:47 a.m.
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()





--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Sept. 29, 2010, 7:25 a.m.
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Eric Dumazet - Sept. 29, 2010, 7:45 a.m.
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


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Herbert Xu - Sept. 29, 2010, 7:57 a.m.
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,
David Miller - Sept. 29, 2010, 7:59 a.m.
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Sept. 29, 2010, 8 a.m.
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Herbert Xu - Sept. 29, 2010, 8:03 a.m.
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 :)
Eric Dumazet - Sept. 29, 2010, 8:22 a.m.
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 ;)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

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