lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1357657638.18156.3.camel@edumazet-glaptop>
Date:	Tue, 08 Jan 2013 07:07:18 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Cong Wang <xiyou.wangcong@...il.com>
Cc:	netdev@...r.kernel.org, nitin padalia <padalia.nitin@...il.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [Patch] net: prevent setting ttl=0 via IP_TTL

On Tue, 2013-01-08 at 15:17 +0800, Cong Wang wrote:

> ---
> diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
> index 3c9d208..d9c4f11 100644
> --- a/net/ipv4/ip_sockglue.c
> +++ b/net/ipv4/ip_sockglue.c
> @@ -590,7 +590,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;

Hmm, I wonder why I did this, indeed ....

Thanks !

Acked-by: Eric Dumazet <edumazet@...gle.com>



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ