From: Eric Dumazet <eric.dumazet@gmail.com>
To: Pekka Savola <pekkas@netcore.fi>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH] tcp: Generalized TTL Security Mechanism
Date: Fri, 19 Mar 2010 09:21:11 +0100 [thread overview]
Message-ID: <1268986871.3048.9.camel@edumazet-laptop> (raw)
In-Reply-To: <alpine.LRH.2.00.1003190837210.6428@netcore.fi>
Le vendredi 19 mars 2010 à 09:58 +0200, Pekka Savola a écrit :
>
> > But any application using GTSM should be setting IP_TTL socket
> option
> > to set send TTL. But, not sure if Linux TCP ever sends ICMP
> > for existing sessions at all.
>
> Thanks, Stephen! It's nice to see at least one compliant RFC5082
> implementation ;-)
>
> Good point that no one should should probably even be sending ICMP
> messages for TCP sockets, but on receive side the checks are
> important
> :-)
This requires that any router in the path between the client and server
also respects the MINTTL when sending ICMP. Not sure how practical it
is...
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 70df409..a9d3ba5 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -367,6 +367,9 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
if (sock_owned_by_user(sk))
NET_INC_STATS_BH(net, LINUX_MIB_LOCKDROPPEDICMPS);
+ if (iph->ttl < inet_sk(sk)->min_ttl)
+ goto out;
+
if (sk->sk_state == TCP_CLOSE)
goto out;
next prev parent reply other threads:[~2010-03-19 8:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 6:00 [PATCH] tcp: Generalized TTL Security Mechanism Stephen Hemminger
2010-01-11 11:25 ` Eric Dumazet
[not found] ` <4B4B0AA3.6010207-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-01-11 16:25 ` Stephen Hemminger
2010-01-11 17:04 ` Eric Dumazet
2010-01-11 17:10 ` Eric Dumazet
[not found] ` <4B4B5B84.3090409-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-01-12 0:27 ` David Miller
2010-01-12 0:28 ` David Miller
2010-01-14 10:58 ` Andi Kleen
[not found] ` <873a29eywq.fsf-3rXA9MLqAseW/qJFnhkgxti2O/JbrIOy@public.gmane.org>
2010-01-14 11:04 ` David Miller
[not found] ` <20100114.030454.16178889.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2010-01-14 11:22 ` Andi Kleen
[not found] ` <20100114112216.GK12241-u0/ZJuX+froe6aEkudXLsA@public.gmane.org>
2010-01-14 11:27 ` David Miller
2010-01-14 12:38 ` William Allen Simpson
[not found] ` <4B4F1044.8080500-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-01-14 13:14 ` Eric Dumazet
2010-03-18 6:36 ` Pekka Savola
2010-03-18 17:59 ` Stephen Hemminger
2010-03-19 7:58 ` Pekka Savola
2010-03-19 8:21 ` Eric Dumazet [this message]
2010-03-19 8:28 ` Pekka Savola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1268986871.3048.9.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=pekkas@netcore.fi \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox