[ 3.5.y.z extended stable ] Patch "net: prevent setting ttl=0 via IP_TTL" has been added to staging queue
Herton Ronaldo Krzesinski
herton.krzesinski at canonical.com
Fri Feb 15 03:10:13 UTC 2013
This is a note to let you know that I have just added a patch titled
net: prevent setting ttl=0 via IP_TTL
to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Herton
------
>From 260d6ea0ca475616c36df877c543133f3470ea10 Mon Sep 17 00:00:00 2001
From: Cong Wang <xiyou.wangcong at gmail.com>
Date: Mon, 7 Jan 2013 21:17:00 +0000
Subject: [PATCH] net: prevent setting ttl=0 via IP_TTL
commit c9be4a5c49cf51cc70a993f004c5bb30067a65ce upstream.
A regression is introduced by the following commit:
commit 4d52cfbef6266092d535237ba5a4b981458ab171
Author: Eric Dumazet <eric.dumazet at gmail.com>
Date: Tue Jun 2 00:42:16 2009 -0700
net: ipv4/ip_sockglue.c cleanups
Pure cleanups
but it is not a pure cleanup...
- if (val != -1 && (val < 1 || val>255))
+ if (val != -1 && (val < 0 || val > 255))
Since there is no reason provided to allow ttl=0, change it back.
Reported-by: nitin padalia <padalia.nitin at gmail.com>
Cc: nitin padalia <padalia.nitin at gmail.com>
Cc: Eric Dumazet <eric.dumazet at gmail.com>
Cc: David S. Miller <davem at davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
Acked-by: Eric Dumazet <edumazet at google.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski at canonical.com>
---
net/ipv4/ip_sockglue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 8285f00..aabeb7b 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -589,7 +589,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,
case IP_TTL:
if (optlen < 1)
goto e_inval;
- if (val != -1 && (val < 0 || val > 255))
+ if (val != -1 && (val < 1 || val > 255))
goto e_inval;
inet->uc_ttl = val;
break;
--
1.7.9.5
More information about the kernel-team
mailing list