aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2021-02-24 22:36:57 +0900
committerKazuki Yamaguchi <k@rhe.jp>2021-02-27 18:41:59 +0900
commita871e2f5c4a0187818dc7e1984b2cd86a2c61a4c (patch)
tree4dce18aca09d62a1fabe31a82bb1625e4119fef3
parent786372825eaddb1339ebce3e407cf757783788ac (diff)
downloadlinux-ky/pu-5.11.tar.gz
net: add comments to code where MTU is handed incorrectlyv5.11.2.5.20210227ky/pu-5.11
But I'm not going to fix them - it's unlikely I actually hit these code paths.
-rw-r--r--net/ipv4/ip_output.c1
-rw-r--r--net/ipv4/raw.c1
-rw-r--r--net/ipv6/raw.c1
-rw-r--r--net/ipv6/route.c2
4 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 2ed0b01f72f0..7870b27e62aa 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1264,6 +1264,7 @@ static int ip_setup_cork(struct sock *sk, struct inet_cork *cork,
cork->addr = ipc->addr;
}
+ /* XXX: MTU */
cork->fragsize = ip_sk_use_pmtu(sk) ?
dst_mtu(&rt->dst) : READ_ONCE(rt->dst.dev->mtu);
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 50a73178d63a..331197f08497 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -355,6 +355,7 @@ static int raw_send_hdrinc(struct sock *sk, struct flowi4 *fl4,
struct rtable *rt = *rtp;
int hlen, tlen;
+ /* XXX: MTU */
if (length > rt->dst.dev->mtu) {
ip_local_error(sk, EMSGSIZE, fl4->daddr, inet->inet_dport,
rt->dst.dev->mtu);
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 1f56d9aae589..4987eb7e1368 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -628,6 +628,7 @@ static int rawv6_send_hdrinc(struct sock *sk, struct msghdr *msg, int length,
int hlen = LL_RESERVED_SPACE(rt->dst.dev);
int tlen = rt->dst.dev->needed_tailroom;
+ /* XXX: MTU */
if (length > rt->dst.dev->mtu) {
ipv6_local_error(sk, EMSGSIZE, fl6, rt->dst.dev->mtu);
return -EMSGSIZE;
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 506f258bfa76..42b33b6cea0a 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2004,6 +2004,7 @@ static bool rt6_mtu_change_route_allowed(struct inet6_dev *idev,
if (dst_mtu(&rt->dst) >= mtu)
return true;
+ /* XXX: MTU */
if (dst_mtu(&rt->dst) == idev->cnf.mtu6)
return true;
@@ -4798,6 +4799,7 @@ static int fib6_nh_mtu_change(struct fib6_nh *nh, void *_arg)
struct inet6_dev *idev = __in6_dev_get(arg->dev);
u32 mtu = f6i->fib6_pmtu;
+ /* XXX: MTU */
if (mtu >= arg->mtu ||
(mtu < arg->mtu && mtu == idev->cnf.mtu6))
fib6_metric_set(f6i, RTAX_MTU, arg->mtu);