Skip to content

Commit

Permalink
ipv6: decrease hop limit counter in ip6_forward()
Browse files Browse the repository at this point in the history
Decrease hop limit counter when deliver skb to ndp proxy.

Signed-off-by: Kangmin Park <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
pr0gr4m authored and davem330 committed Jul 23, 2021
1 parent 227adfb commit 46c7655
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/ipv6/ip6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,10 @@ int ip6_forward(struct sk_buff *skb)
if (net->ipv6.devconf_all->proxy_ndp &&
pneigh_lookup(&nd_tbl, net, &hdr->daddr, skb->dev, 0)) {
int proxied = ip6_forward_proxy_check(skb);
if (proxied > 0)
if (proxied > 0) {
hdr->hop_limit--;
return ip6_input(skb);
else if (proxied < 0) {
} else if (proxied < 0) {
__IP6_INC_STATS(net, idev, IPSTATS_MIB_INDISCARDS);
goto drop;
}
Expand Down

0 comments on commit 46c7655

Please sign in to comment.