diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2021-02-24 22:36:57 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2021-09-01 03:39:00 +0900 |
commit | 15efc385865413ddae5c274bfc2b48f037fd1a46 (patch) | |
tree | 515a91932d542771337d74b31571d9b186af5f40 | |
parent | 94fc6a741ccb6b65f4f491cb2654153b412638ef (diff) | |
download | linux-ky/patches-5.14.tar.gz |
net: add comments to code where MTU is handled incorrectlyky/patches-5.14
But I'm not going to fix them - it's unlikely I actually hit these code
paths.
-rw-r--r-- | net/ipv4/ip_output.c | 1 | ||||
-rw-r--r-- | net/ipv4/raw.c | 1 | ||||
-rw-r--r-- | net/ipv6/raw.c | 1 | ||||
-rw-r--r-- | net/ipv6/route.c | 2 |
4 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 8d8a8da3ae7e..6ecd22798ba9 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -1268,6 +1268,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 ed26ea648440..377e1bd2c175 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1996,6 +1996,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; @@ -4922,6 +4923,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); |