mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
ipv6: decrease hop limit counter in ip6_forward()
Decrease hop limit counter when deliver skb to ndp proxy. Signed-off-by: Kangmin Park <l4stpr0gr4m@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
227adfb2b1
commit
46c7655f0b
@ -549,9 +549,10 @@ int ip6_forward(struct sk_buff *skb)
|
|||||||
if (net->ipv6.devconf_all->proxy_ndp &&
|
if (net->ipv6.devconf_all->proxy_ndp &&
|
||||||
pneigh_lookup(&nd_tbl, net, &hdr->daddr, skb->dev, 0)) {
|
pneigh_lookup(&nd_tbl, net, &hdr->daddr, skb->dev, 0)) {
|
||||||
int proxied = ip6_forward_proxy_check(skb);
|
int proxied = ip6_forward_proxy_check(skb);
|
||||||
if (proxied > 0)
|
if (proxied > 0) {
|
||||||
|
hdr->hop_limit--;
|
||||||
return ip6_input(skb);
|
return ip6_input(skb);
|
||||||
else if (proxied < 0) {
|
} else if (proxied < 0) {
|
||||||
__IP6_INC_STATS(net, idev, IPSTATS_MIB_INDISCARDS);
|
__IP6_INC_STATS(net, idev, IPSTATS_MIB_INDISCARDS);
|
||||||
goto drop;
|
goto drop;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user