mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
ipip, sit: fix ipv4_{update_pmtu,redirect} calls
ipv4_{update_pmtu,redirect} were called with tunnel's ifindex (t->dev is a
tunnel netdevice). It caused wrong route lookup and failure of pmtu update or
redirect. We should use the same ifindex that we use in ip_route_output_* in
*tunnel_xmit code. It is t->parms.link .
Signed-off-by: Dmitry Popov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
87757a917b
commit
2346829e64
2 changed files with 4 additions and 4 deletions
|
|
@ -149,13 +149,13 @@ static int ipip_err(struct sk_buff *skb, u32 info)
|
|||
|
||||
if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
|
||||
ipv4_update_pmtu(skb, dev_net(skb->dev), info,
|
||||
t->dev->ifindex, 0, IPPROTO_IPIP, 0);
|
||||
t->parms.link, 0, IPPROTO_IPIP, 0);
|
||||
err = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (type == ICMP_REDIRECT) {
|
||||
ipv4_redirect(skb, dev_net(skb->dev), t->dev->ifindex, 0,
|
||||
ipv4_redirect(skb, dev_net(skb->dev), t->parms.link, 0,
|
||||
IPPROTO_IPIP, 0);
|
||||
err = 0;
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -560,12 +560,12 @@ static int ipip6_err(struct sk_buff *skb, u32 info)
|
|||
|
||||
if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
|
||||
ipv4_update_pmtu(skb, dev_net(skb->dev), info,
|
||||
t->dev->ifindex, 0, IPPROTO_IPV6, 0);
|
||||
t->parms.link, 0, IPPROTO_IPV6, 0);
|
||||
err = 0;
|
||||
goto out;
|
||||
}
|
||||
if (type == ICMP_REDIRECT) {
|
||||
ipv4_redirect(skb, dev_net(skb->dev), t->dev->ifindex, 0,
|
||||
ipv4_redirect(skb, dev_net(skb->dev), t->parms.link, 0,
|
||||
IPPROTO_IPV6, 0);
|
||||
err = 0;
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in a new issue