mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
ipv4: Add redirect support to all protocol icmp error handlers.
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b42597e2f3
commit
55be7a9c60
12 changed files with 110 additions and 16 deletions
|
@ -360,6 +360,8 @@ static int ipip_err(struct sk_buff *skb, u32 info)
|
|||
if (code != ICMP_EXC_TTL)
|
||||
return 0;
|
||||
break;
|
||||
case ICMP_REDIRECT:
|
||||
break;
|
||||
}
|
||||
|
||||
err = -ENOENT;
|
||||
|
@ -376,6 +378,13 @@ static int ipip_err(struct sk_buff *skb, u32 info)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (type == ICMP_REDIRECT) {
|
||||
ipv4_redirect(skb, dev_net(skb->dev), t->dev->ifindex, 0,
|
||||
IPPROTO_IPIP, 0);
|
||||
err = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (t->parms.iph.daddr == 0)
|
||||
goto out;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue