aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2021-02-24 22:36:57 +0900
committerKazuki Yamaguchi <k@rhe.jp>2021-11-07 17:09:14 +0900
commit218bc7d3bc2c4ef492706b1eeb7f1bb03b777fa1 (patch)
tree9ee1063eebe75b9db8f1565768736af564f56c29
parent461a902ae6071a3a79068460e9e645f382b245b5 (diff)
downloadlinux-ky/patches-5.15.tar.gz
net: add comments to code where MTU is handled incorrectlyky/patches-5.15
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 9bca57ef8b83..6bb2620bff61 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1251,6 +1251,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 bb446e60cf58..1216db101822 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 60f1e4f5be5a..c573ab6b9795 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 91aa6d762969..44772eac19a1 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1999,6 +1999,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;
@@ -4909,6 +4910,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);