diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2021-02-24 22:36:57 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2021-08-08 23:21:44 +0900 |
commit | 0cfbd85024045e8130083167232212b8cc3bf74d (patch) | |
tree | 1c67fb5b9a18e81ec2cf76ca1d7616f6c710bf4e | |
parent | 05e0a50717cf3aca215924fb1d9b7acf99055705 (diff) | |
download | linux-ky/patches-5.13.tar.gz |
net: add comments to code where MTU is handed incorrectlyky/patches-5.13
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 c3efc7d658f6..d15e4c05bb55 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 bf3646b57c68..16add46f4b07 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 a05d225a856c..75264ceb99a5 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1988,6 +1988,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; @@ -4787,6 +4788,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); |