* [PATCH] syncookies: Make sure ECN is disabled
@ 2008-07-24 18:18 Florian Westphal
2008-07-26 9:22 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2008-07-24 18:18 UTC (permalink / raw)
To: netdev; +Cc: Florian Westphal
ecn_ok is not initialized when a connection is established by cookies.
The cookie syn-ack never sets ECN, so ecn_ok must be set to 0.
Spotted using ns-3/network simulation cradle simulator and valgrind.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
net/ipv4/syncookies.c | 1 +
net/ipv6/syncookies.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 51bc24d..9d38005 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -299,6 +299,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
ireq->rmt_port = th->source;
ireq->loc_addr = ip_hdr(skb)->daddr;
ireq->rmt_addr = ip_hdr(skb)->saddr;
+ ireq->ecn_ok = 0;
ireq->snd_wscale = tcp_opt.snd_wscale;
ireq->rcv_wscale = tcp_opt.rcv_wscale;
ireq->sack_ok = tcp_opt.sack_ok;
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
index 6a68eeb..a46badd 100644
--- a/net/ipv6/syncookies.c
+++ b/net/ipv6/syncookies.c
@@ -223,6 +223,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
req->expires = 0UL;
req->retrans = 0;
+ ireq->ecn_ok = 0;
ireq->snd_wscale = tcp_opt.snd_wscale;
ireq->rcv_wscale = tcp_opt.rcv_wscale;
ireq->sack_ok = tcp_opt.sack_ok;
--
1.5.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] syncookies: Make sure ECN is disabled
2008-07-24 18:18 [PATCH] syncookies: Make sure ECN is disabled Florian Westphal
@ 2008-07-26 9:22 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-07-26 9:22 UTC (permalink / raw)
To: fw; +Cc: netdev
From: Florian Westphal <fw@strlen.de>
Date: Thu, 24 Jul 2008 20:18:06 +0200
> ecn_ok is not initialized when a connection is established by cookies.
> The cookie syn-ack never sets ECN, so ecn_ok must be set to 0.
>
> Spotted using ns-3/network simulation cradle simulator and valgrind.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Applied, thanks Florian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-26 9:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-24 18:18 [PATCH] syncookies: Make sure ECN is disabled Florian Westphal
2008-07-26 9:22 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).