From: Eric Dumazet <eric.dumazet@gmail.com>
To: Changli Gao <xiaosuo@gmail.com>
Cc: George Spelvin <linux@horizon.com>,
David Miller <davem@davemloft.net>,
linux-kernel@vger.kernel.org, netdev <netdev@vger.kernel.org>,
Roland Dreier <roland@purestorage.com>,
Daniel Baluta <dbaluta@ixiacom.com>
Subject: [PATCH v2] net: provide default_advmss() methods to blackhole dst_ops
Date: Fri, 18 Feb 2011 14:44:32 +0100 [thread overview]
Message-ID: <1298036672.6201.65.camel@edumazet-laptop> (raw)
In-Reply-To: <1298036005.6201.58.camel@edumazet-laptop>
Le vendredi 18 février 2011 à 14:33 +0100, Eric Dumazet a écrit :
> I had this exact idea but found we need struct net pointer to get this
> value, not provided in parameters, so I falled back to the 256 value.
>
>
Hmm, reading again this stuff, maybe we can just use
ipv4_default_advmss() instead of a custom one.
dst->dev should be available
[PATCH] net: provide default_advmss() methods to blackhole dst_ops
Commit 0dbaee3b37e118a (net: Abstract default ADVMSS behind an
accessor.) introduced a possible crash in tcp_connect_init(), when
dst->default_advmss() is called from dst_metric_advmss()
Reported-by: George Spelvin <linux@horizon.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Roland Dreier <roland@purestorage.com>
CC: Changli Gao <xiaosuo@gmail.com>
CC: Daniel Baluta <dbaluta@ixiacom.com>
---
net/ipv4/route.c | 1 +
net/ipv6/route.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 788a3e7..6ed6603 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2722,6 +2722,7 @@ static struct dst_ops ipv4_dst_blackhole_ops = {
.destroy = ipv4_dst_destroy,
.check = ipv4_blackhole_dst_check,
.default_mtu = ipv4_blackhole_default_mtu,
+ .default_advmss = ipv4_default_advmss,
.update_pmtu = ipv4_rt_blackhole_update_pmtu,
};
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 1c29f95..a998db6 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -128,6 +128,7 @@ static struct dst_ops ip6_dst_blackhole_ops = {
.destroy = ip6_dst_destroy,
.check = ip6_dst_check,
.default_mtu = ip6_blackhole_default_mtu,
+ .default_advmss = ip6_default_advmss,
.update_pmtu = ip6_rt_blackhole_update_pmtu,
};
next prev parent reply other threads:[~2011-02-18 13:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110218050321.10415.qmail@science.horizon.com>
2011-02-18 6:32 ` 2.6.38-rc5 tcp_connect oops: EIP = 0x0 Eric Dumazet
2011-02-18 9:57 ` [PATCH] net: Add default_advmss() methods to blackhole dst_ops Eric Dumazet
2011-02-18 13:16 ` Changli Gao
2011-02-18 13:24 ` Eric Dumazet
2011-02-18 13:29 ` Changli Gao
2011-02-18 13:33 ` Eric Dumazet
2011-02-18 13:43 ` Daniel Baluta
2011-02-18 13:44 ` Eric Dumazet [this message]
2011-02-18 19:39 ` [PATCH v2] net: provide " David Miller
2011-02-18 19:58 ` [PATCH] net: Add " George Spelvin
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=1298036672.6201.65.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=dbaluta@ixiacom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@horizon.com \
--cc=netdev@vger.kernel.org \
--cc=roland@purestorage.com \
--cc=xiaosuo@gmail.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