diff mbox

enable getsockopt() for IP_NODEFRAG

Message ID 4C8B2130.7030605@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Michael Kerrisk \(man-pages\) Sept. 11, 2010, 6:26 a.m. UTC
Hello Jiri

While integrating your man-pages patch for IP_NODEFRAG, I noticed 
that this option is settable by setsockopt(), but not gettable by 
getsockopt(). I suppose this is not intended. The (untested, 
trivial) patch below adds getsockopt() support.

The patch is against 2.6.36-rc3.

Cheers,

Michael

PS I've just configured Thunderbird on this machine, hopefully the 
patch is not mangled. Please let me know if there are problems.

Signed-off-by: Michael kerrisk <mtk.manpages@gmail.com>

Comments

Jiri Olsa Sept. 12, 2010, 9:52 p.m. UTC | #1
On Sat, Sep 11, 2010 at 08:26:56AM +0200, Michael Kerrisk wrote:
> Hello Jiri
> 
> While integrating your man-pages patch for IP_NODEFRAG, I noticed 
> that this option is settable by setsockopt(), but not gettable by 
> getsockopt(). I suppose this is not intended. The (untested, 
> trivial) patch below adds getsockopt() support.
> 
> The patch is against 2.6.36-rc3.
> 
> Cheers,
> 
> Michael
> 
> PS I've just configured Thunderbird on this machine, hopefully the 
> patch is not mangled. Please let me know if there are problems.
hi,

applied ok, compiled ok ;) thanks

Acked-by: Jiri Olsa <jolsa@redhat.com>

> 
> Signed-off-by: Michael kerrisk <mtk.manpages@gmail.com>
> 
> --- net/ipv4/ip_sockglue.c.orig	2010-09-11 07:25:58.000000000 +0200
> +++ net/ipv4/ip_sockglue.c	2010-09-11 07:43:43.000000000 +0200
> @@ -1129,6 +1129,9 @@ static int do_ip_getsockopt(struct sock
>  	case IP_HDRINCL:
>  		val = inet->hdrincl;
>  		break;
> +	case IP_NODEFRAG:
> +		val = inet->nodefrag;
> +		break;
>  	case IP_MTU_DISCOVER:
>  		val = inet->pmtudisc;
>  		break;
> -- 
> Michael Kerrisk
> Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
> Watch my Linux system programming book progress towards publication!
> http://blog.man7.org/
--
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. 14, 2010, 2:57 a.m. UTC | #2
From: Jiri Olsa <jolsa@redhat.com>
Date: Sun, 12 Sep 2010 23:52:30 +0200

> On Sat, Sep 11, 2010 at 08:26:56AM +0200, Michael Kerrisk wrote:
>> Hello Jiri
>> 
>> While integrating your man-pages patch for IP_NODEFRAG, I noticed 
>> that this option is settable by setsockopt(), but not gettable by 
>> getsockopt(). I suppose this is not intended. The (untested, 
>> trivial) patch below adds getsockopt() support.
>> 
>> The patch is against 2.6.36-rc3.
>> 
>> Cheers,
>> 
>> Michael
>> 
>> PS I've just configured Thunderbird on this machine, hopefully the 
>> patch is not mangled. Please let me know if there are problems.
> hi,
> 
> applied ok, compiled ok ;) thanks
> 
> Acked-by: Jiri Olsa <jolsa@redhat.com>

Applied, thanks everyone.
--
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
diff mbox

Patch

--- net/ipv4/ip_sockglue.c.orig	2010-09-11 07:25:58.000000000 +0200
+++ net/ipv4/ip_sockglue.c	2010-09-11 07:43:43.000000000 +0200
@@ -1129,6 +1129,9 @@  static int do_ip_getsockopt(struct sock
 	case IP_HDRINCL:
 		val = inet->hdrincl;
 		break;
+	case IP_NODEFRAG:
+		val = inet->nodefrag;
+		break;
 	case IP_MTU_DISCOVER:
 		val = inet->pmtudisc;
 		break;