All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: Default UDP and UNIX diag to 'n'.
@ 2012-01-07 20:13 David Miller
  2012-02-07 11:12 ` Anisse Astier
  0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2012-01-07 20:13 UTC (permalink / raw)
  To: netdev


Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/ipv4/Kconfig |    6 +++++-
 net/unix/Kconfig |    2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index 1a8f93b..43e1439 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -410,8 +410,12 @@ config INET_TCP_DIAG
 	def_tristate INET_DIAG
 
 config INET_UDP_DIAG
+	tristate "UDP: socket monitoring interface"
 	depends on INET_DIAG
-	def_tristate INET_DIAG && IPV6
+	default n
+	---help---
+	  Support for UDP socket monitoring interface used by the ss tool.
+	  If unsure, say Y.
 
 menuconfig TCP_CONG_ADVANCED
 	bool "TCP: advanced congestion control"
diff --git a/net/unix/Kconfig b/net/unix/Kconfig
index c2128b1..8b31ab8 100644
--- a/net/unix/Kconfig
+++ b/net/unix/Kconfig
@@ -22,7 +22,7 @@ config UNIX
 config UNIX_DIAG
 	tristate "UNIX: socket monitoring interface"
 	depends on UNIX
-	default UNIX
+	default n
 	---help---
 	  Support for UNIX socket monitoring interface used by the ss tool.
 	  If unsure, say Y.
-- 
1.7.6.5

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

* Re: [PATCH] net: Default UDP and UNIX diag to 'n'.
  2012-01-07 20:13 [PATCH] net: Default UDP and UNIX diag to 'n' David Miller
@ 2012-02-07 11:12 ` Anisse Astier
  2012-02-07 13:37   ` Pavel Emelyanov
  0 siblings, 1 reply; 9+ messages in thread
From: Anisse Astier @ 2012-02-07 11:12 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Eric Dumazet, Pavel Emelyanov

Hi,

On Sat, 07 Jan 2012 12:13:39 -0800 (PST), David Miller <davem@davemloft.net> wrote :

> 
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
>  net/ipv4/Kconfig |    6 +++++-
>  net/unix/Kconfig |    2 +-
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
> index 1a8f93b..43e1439 100644
> --- a/net/ipv4/Kconfig
> +++ b/net/ipv4/Kconfig
> @@ -410,8 +410,12 @@ config INET_TCP_DIAG
>  	def_tristate INET_DIAG
>  
>  config INET_UDP_DIAG
> +	tristate "UDP: socket monitoring interface"
>  	depends on INET_DIAG
> -	def_tristate INET_DIAG && IPV6
This broke earlier patch 
b872a2371ffd13e6d83423ef621a707df4c158ac "udp_diag: Make it module when ipv6 is a module",
which brings back the compilation error when compiling linus master (v3.3-rc2+):

net/built-in.o: In function `udp_dump_one':
udp_diag.c:(.text+0x59852): undefined reference to `__udp6_lib_lookup'


> +	default n
> +	---help---
> +	  Support for UDP socket monitoring interface used by the ss tool.
> +	  If unsure, say Y.
>  

Regards,

Anisse

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

* Re: [PATCH] net: Default UDP and UNIX diag to 'n'.
  2012-02-07 11:12 ` Anisse Astier
@ 2012-02-07 13:37   ` Pavel Emelyanov
  2012-02-07 13:51     ` Anisse Astier
  2012-02-07 17:29     ` David Miller
  0 siblings, 2 replies; 9+ messages in thread
From: Pavel Emelyanov @ 2012-02-07 13:37 UTC (permalink / raw)
  To: Anisse Astier; +Cc: David Miller, netdev, Eric Dumazet

>> diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
>> index 1a8f93b..43e1439 100644
>> --- a/net/ipv4/Kconfig
>> +++ b/net/ipv4/Kconfig
>> @@ -410,8 +410,12 @@ config INET_TCP_DIAG
>>  	def_tristate INET_DIAG
>>  
>>  config INET_UDP_DIAG
>> +	tristate "UDP: socket monitoring interface"
>>  	depends on INET_DIAG
>> -	def_tristate INET_DIAG && IPV6
> This broke earlier patch 
> b872a2371ffd13e6d83423ef621a707df4c158ac "udp_diag: Make it module when ipv6 is a module",
> which brings back the compilation error when compiling linus master (v3.3-rc2+):
> 
> net/built-in.o: In function `udp_dump_one':
> udp_diag.c:(.text+0x59852): undefined reference to `__udp6_lib_lookup'
> 
> 
>> +	default n
>> +	---help---
>> +	  Support for UDP socket monitoring interface used by the ss tool.
>> +	  If unsure, say Y.
>>  

I assume you have CONFIG_IPV6=m and CONFIG_INET_UDP_DIAG=y, right?
This one should fix the issue, you'll not be able to set it to Y when
IPV6 is M.


[PATCH] udp_diag: Add dependency on IPV6

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>

diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index aa2a2c7..55d39a4 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -409,7 +409,7 @@ config INET_TCP_DIAG
 
 config INET_UDP_DIAG
 	tristate "UDP: socket monitoring interface"
-	depends on INET_DIAG
+	depends on INET_DIAG && IPV6
 	default n
 	---help---
 	  Support for UDP socket monitoring interface used by the ss tool.

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

* Re: [PATCH] net: Default UDP and UNIX diag to 'n'.
  2012-02-07 13:37   ` Pavel Emelyanov
@ 2012-02-07 13:51     ` Anisse Astier
  2012-02-07 17:29       ` David Miller
  2012-02-07 17:29     ` David Miller
  1 sibling, 1 reply; 9+ messages in thread
From: Anisse Astier @ 2012-02-07 13:51 UTC (permalink / raw)
  To: Pavel Emelyanov; +Cc: David Miller, netdev, Eric Dumazet

On Tue, 07 Feb 2012 17:37:51 +0400, Pavel Emelyanov <xemul@parallels.com> wrote :

> >> diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
> >> index 1a8f93b..43e1439 100644
> >> --- a/net/ipv4/Kconfig
> >> +++ b/net/ipv4/Kconfig
> >> @@ -410,8 +410,12 @@ config INET_TCP_DIAG
> >>  	def_tristate INET_DIAG
> >>  
> >>  config INET_UDP_DIAG
> >> +	tristate "UDP: socket monitoring interface"
> >>  	depends on INET_DIAG
> >> -	def_tristate INET_DIAG && IPV6
> > This broke earlier patch 
> > b872a2371ffd13e6d83423ef621a707df4c158ac "udp_diag: Make it module when ipv6 is a module",
> > which brings back the compilation error when compiling linus master (v3.3-rc2+):
> > 
> > net/built-in.o: In function `udp_dump_one':
> > udp_diag.c:(.text+0x59852): undefined reference to `__udp6_lib_lookup'
> > 
> > 
> >> +	default n
> >> +	---help---
> >> +	  Support for UDP socket monitoring interface used by the ss tool.
> >> +	  If unsure, say Y.
> >>  
> 
> I assume you have CONFIG_IPV6=m and CONFIG_INET_UDP_DIAG=y, right?

That's correct.

> This one should fix the issue, you'll not be able to set it to Y when
> IPV6 is M.

Indeed, it fixes the issue, but it also prevents using UDP_DIAG without
IPv6 (just like the previous patch I guess.). Not a problem for me.

> 
> 
> [PATCH] udp_diag: Add dependency on IPV6
> 
> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
> 
> diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
> index aa2a2c7..55d39a4 100644
> --- a/net/ipv4/Kconfig
> +++ b/net/ipv4/Kconfig
> @@ -409,7 +409,7 @@ config INET_TCP_DIAG
>  
>  config INET_UDP_DIAG
>  	tristate "UDP: socket monitoring interface"
> -	depends on INET_DIAG
> +	depends on INET_DIAG && IPV6
>  	default n
>  	---help---
>  	  Support for UDP socket monitoring interface used by the ss tool.

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

* Re: [PATCH] net: Default UDP and UNIX diag to 'n'.
  2012-02-07 13:51     ` Anisse Astier
@ 2012-02-07 17:29       ` David Miller
  0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2012-02-07 17:29 UTC (permalink / raw)
  To: anisse; +Cc: xemul, netdev, eric.dumazet

From: Anisse Astier <anisse@astier.eu>
Date: Tue, 7 Feb 2012 14:51:20 +0100

> On Tue, 07 Feb 2012 17:37:51 +0400, Pavel Emelyanov <xemul@parallels.com> wrote :
> 
>> >> diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
>> >> index 1a8f93b..43e1439 100644
>> >> --- a/net/ipv4/Kconfig
>> >> +++ b/net/ipv4/Kconfig
>> >> @@ -410,8 +410,12 @@ config INET_TCP_DIAG
>> >>  	def_tristate INET_DIAG
>> >>  
>> >>  config INET_UDP_DIAG
>> >> +	tristate "UDP: socket monitoring interface"
>> >>  	depends on INET_DIAG
>> >> -	def_tristate INET_DIAG && IPV6
>> > This broke earlier patch 
>> > b872a2371ffd13e6d83423ef621a707df4c158ac "udp_diag: Make it module when ipv6 is a module",
>> > which brings back the compilation error when compiling linus master (v3.3-rc2+):
>> > 
>> > net/built-in.o: In function `udp_dump_one':
>> > udp_diag.c:(.text+0x59852): undefined reference to `__udp6_lib_lookup'
>> > 
>> > 
>> >> +	default n
>> >> +	---help---
>> >> +	  Support for UDP socket monitoring interface used by the ss tool.
>> >> +	  If unsure, say Y.
>> >>  
>> 
>> I assume you have CONFIG_IPV6=m and CONFIG_INET_UDP_DIAG=y, right?
> 
> That's correct.
> 
>> This one should fix the issue, you'll not be able to set it to Y when
>> IPV6 is M.
> 
> Indeed, it fixes the issue, but it also prevents using UDP_DIAG without
> IPv6 (just like the previous patch I guess.). Not a problem for me.

I don't think the previous code prevented udp_diag w/o ipv6, and requiring
ipv6 for udp_diag is not acceptable so this patch needs to be updated to
allow that.

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

* Re: [PATCH] net: Default UDP and UNIX diag to 'n'.
  2012-02-07 13:37   ` Pavel Emelyanov
  2012-02-07 13:51     ` Anisse Astier
@ 2012-02-07 17:29     ` David Miller
  2012-02-07 17:39       ` Anisse Astier
  1 sibling, 1 reply; 9+ messages in thread
From: David Miller @ 2012-02-07 17:29 UTC (permalink / raw)
  To: xemul; +Cc: anisse, netdev, eric.dumazet

From: Pavel Emelyanov <xemul@parallels.com>
Date: Tue, 07 Feb 2012 17:37:51 +0400

> @@ -409,7 +409,7 @@ config INET_TCP_DIAG
>  
>  config INET_UDP_DIAG
>  	tristate "UDP: socket monitoring interface"
> -	depends on INET_DIAG
> +	depends on INET_DIAG && IPV6

This needs to be something like "INET_DIAG && (IPV6 || IPV6=n)"

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

* Re: [PATCH] net: Default UDP and UNIX diag to 'n'.
  2012-02-07 17:29     ` David Miller
@ 2012-02-07 17:39       ` Anisse Astier
  2012-02-07 18:36         ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Anisse Astier @ 2012-02-07 17:39 UTC (permalink / raw)
  To: David Miller; +Cc: xemul, netdev, eric.dumazet

On Tue, 07 Feb 2012 12:29:31 -0500 (EST), David Miller <davem@davemloft.net> wrote :

> From: Pavel Emelyanov <xemul@parallels.com>
> Date: Tue, 07 Feb 2012 17:37:51 +0400
> 
> > @@ -409,7 +409,7 @@ config INET_TCP_DIAG
> >  
> >  config INET_UDP_DIAG
> >  	tristate "UDP: socket monitoring interface"
> > -	depends on INET_DIAG
> > +	depends on INET_DIAG && IPV6
> 
> This needs to be something like "INET_DIAG && (IPV6 || IPV6=n)"

Yes, this works better. This is the right solution.

Tested-by: Anisse Astier <anisse@astier.eu>

diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index aa2a2c7..d183262 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -409,7 +409,7 @@ config INET_TCP_DIAG
 
 config INET_UDP_DIAG
        tristate "UDP: socket monitoring interface"
-       depends on INET_DIAG
+       depends on INET_DIAG && (IPV6 || IPV6=n)
        default n
        ---help---
          Support for UDP socket monitoring interface used by the ss tool.

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

* Re: [PATCH] net: Default UDP and UNIX diag to 'n'.
  2012-02-07 17:39       ` Anisse Astier
@ 2012-02-07 18:36         ` David Miller
  2012-02-07 21:01           ` Anisse Astier
  0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2012-02-07 18:36 UTC (permalink / raw)
  To: anisse; +Cc: xemul, netdev, eric.dumazet

From: Anisse Astier <anisse@astier.eu>
Date: Tue, 7 Feb 2012 18:39:11 +0100

> On Tue, 07 Feb 2012 12:29:31 -0500 (EST), David Miller <davem@davemloft.net> wrote :
> 
>> From: Pavel Emelyanov <xemul@parallels.com>
>> Date: Tue, 07 Feb 2012 17:37:51 +0400
>> 
>> > @@ -409,7 +409,7 @@ config INET_TCP_DIAG
>> >  
>> >  config INET_UDP_DIAG
>> >  	tristate "UDP: socket monitoring interface"
>> > -	depends on INET_DIAG
>> > +	depends on INET_DIAG && IPV6
>> 
>> This needs to be something like "INET_DIAG && (IPV6 || IPV6=n)"
> 
> Yes, this works better. This is the right solution.
> 
> Tested-by: Anisse Astier <anisse@astier.eu>

The patch was corrupted by your email client, it turned all the
tab characters into spaces, you also didn't write an appropriate
commit message.

I took care of this, but if you plan to submit any patch at all in
the future, even as an "request for comments" and testing, you must
keep these issues in mind.

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

* Re: [PATCH] net: Default UDP and UNIX diag to 'n'.
  2012-02-07 18:36         ` David Miller
@ 2012-02-07 21:01           ` Anisse Astier
  0 siblings, 0 replies; 9+ messages in thread
From: Anisse Astier @ 2012-02-07 21:01 UTC (permalink / raw)
  To: David Miller; +Cc: xemul, netdev, eric.dumazet

On Tue, Feb 7, 2012 at 7:36 PM, David Miller <davem@davemloft.net> wrote:
> From: Anisse Astier <anisse@astier.eu>
> Date: Tue, 7 Feb 2012 18:39:11 +0100
>
>> On Tue, 07 Feb 2012 12:29:31 -0500 (EST), David Miller <davem@davemloft.net> wrote :
>>
>>> From: Pavel Emelyanov <xemul@parallels.com>
>>> Date: Tue, 07 Feb 2012 17:37:51 +0400
>>>
>>> > @@ -409,7 +409,7 @@ config INET_TCP_DIAG
>>> >
>>> >  config INET_UDP_DIAG
>>> >    tristate "UDP: socket monitoring interface"
>>> > -  depends on INET_DIAG
>>> > +  depends on INET_DIAG && IPV6
>>>
>>> This needs to be something like "INET_DIAG && (IPV6 || IPV6=n)"
>>
>> Yes, this works better. This is the right solution.
>>
>> Tested-by: Anisse Astier <anisse@astier.eu>
>
> The patch was corrupted by your email client, it turned all the
> tab characters into spaces, you also didn't write an appropriate
> commit message.
>
> I took care of this, but if you plan to submit any patch at all in
> the future, even as an "request for comments" and testing, you must
> keep these issues in mind.

Sorry, I didn't expect anyone to use this as a patch (no sign-off, etc),
so I shouldn't have posted a diff.

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

end of thread, other threads:[~2012-02-07 21:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-07 20:13 [PATCH] net: Default UDP and UNIX diag to 'n' David Miller
2012-02-07 11:12 ` Anisse Astier
2012-02-07 13:37   ` Pavel Emelyanov
2012-02-07 13:51     ` Anisse Astier
2012-02-07 17:29       ` David Miller
2012-02-07 17:29     ` David Miller
2012-02-07 17:39       ` Anisse Astier
2012-02-07 18:36         ` David Miller
2012-02-07 21:01           ` Anisse Astier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.