[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100114.032739.217960336.davem@davemloft.net>
Date: Thu, 14 Jan 2010 03:27:39 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: andi@...stfloor.org
Cc: shemminger@...tta.com, netdev@...r.kernel.org,
linux-api@...r.kernel.org
Subject: Re: [PATCH] tcp: Generalized TTL Security Mechanism
From: Andi Kleen <andi@...stfloor.org>
Date: Thu, 14 Jan 2010 12:22:16 +0100
> It's just
>
> + if (iph->ttl < inet_sk(sk)->min_ttl)
> + goto discard_and_relse;
>
> I'm probably missing something, but naively I would expect all
> packets with ttl > 0 to be discarded then when min_ttl is zero.
Andi, the feature works from top to bottom.
The idea is that the min_ttl is set very high, so that
you'll only accept packets from hosts that started with
a ttl of 255 and are within a hop or two from you. (therefore
you'd set min_ttl to 254 or 253, something like that)
Since the ttl can never be less than zero, the test
will never hit when min_ttl is zero, and thus this is
that state where the socket option is not enabled.
--
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