diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-02-06 09:25:56 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-02-06 09:25:56 -0300 |
commit | ab809efaeba0cca20cfcda23852b0ee958f6ea69 (patch) | |
tree | 36b168deb9908cba8605bb8fa026bdacc26560db /net/ipv6/ip6_output.c | |
parent | 17f248aa8664ff5b3643491136283e73b5c18166 (diff) | |
parent | d2d11f342b179f1894a901f143ec7c008caba43e (diff) | |
download | linux-stable-ab809efaeba0cca20cfcda23852b0ee958f6ea69.tar.gz linux-stable-ab809efaeba0cca20cfcda23852b0ee958f6ea69.tar.bz2 linux-stable-ab809efaeba0cca20cfcda23852b0ee958f6ea69.zip |
Merge remote-tracking branch 'torvalds/master' into perf/core
To sync with libbpf, etc.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 60fd91bb5171..c314fdde0097 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -547,7 +547,20 @@ int ip6_forward(struct sk_buff *skb) pneigh_lookup(&nd_tbl, net, &hdr->daddr, skb->dev, 0)) { int proxied = ip6_forward_proxy_check(skb); if (proxied > 0) { - hdr->hop_limit--; + /* It's tempting to decrease the hop limit + * here by 1, as we do at the end of the + * function too. + * + * But that would be incorrect, as proxying is + * not forwarding. The ip6_input function + * will handle this packet locally, and it + * depends on the hop limit being unchanged. + * + * One example is the NDP hop limit, that + * always has to stay 255, but other would be + * similar checks around RA packets, where the + * user can even change the desired limit. + */ return ip6_input(skb); } else if (proxied < 0) { __IP6_INC_STATS(net, idev, IPSTATS_MIB_INDISCARDS); |