Re: [PATCH] ipv4/ipv6: check hop limit field on input

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Dumazet
Date: Monday, June 1, 2009 - 10:31 pm

David Miller a écrit :

I wonder if we then should allow setting ttl to zero. I had to patch
my kernel to allow ping to do this...

I'll check RFC when time permits.

diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index e2d1f87..efe2797 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -558,7 +558,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,
 	case IP_TTL:
 		if (optlen<1)
 			goto e_inval;
-		if (val != -1 && (val < 1 || val>255))
+		if (val != -1 && (val < 0 || val>255))
 			goto e_inval;
 		inet->uc_ttl = val;
 		break;


--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] ipv4/ipv6: check hop limit field on input, Nicolas Dichtel, (Mon Jun 1, 8:13 am)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, Florian Westphal, (Mon Jun 1, 9:19 am)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, Nicolas Dichtel, (Mon Jun 1, 9:49 am)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, Florian Westphal, (Mon Jun 1, 10:13 am)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, Eric Dumazet, (Mon Jun 1, 11:43 am)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, Brian Haley, (Mon Jun 1, 11:55 am)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, John Dykstra, (Mon Jun 1, 6:54 pm)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, David Miller, (Mon Jun 1, 7:02 pm)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, David Miller, (Mon Jun 1, 7:04 pm)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, Eric Dumazet, (Mon Jun 1, 10:31 pm)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, David Miller, (Mon Jun 1, 10:43 pm)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, John Dykstra, (Tue Jun 2, 2:22 am)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, Nicolas Dichtel, (Tue Jun 2, 2:30 am)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, Nicolas Dichtel, (Tue Jun 2, 2:30 am)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, Nicolas Dichtel, (Tue Jun 2, 2:30 am)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, David Miller, (Tue Jun 2, 2:32 am)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, Nicolas Dichtel, (Tue Jun 2, 2:35 am)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, Nicolas Dichtel, (Tue Jun 2, 2:36 am)
Re: [PATCH] ipv4/ipv6: check hop limit field on input, David Miller, (Tue Jun 2, 2:37 am)