diff options
Diffstat (limited to 'net/ipv6/sit.c')
-rw-r--r-- | net/ipv6/sit.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 60415711563f..3bd1bfc01f85 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -527,9 +527,6 @@ static int ipip6_err(struct sk_buff *skb, u32 info) | |||
527 | case ICMP_PORT_UNREACH: | 527 | case ICMP_PORT_UNREACH: |
528 | /* Impossible event. */ | 528 | /* Impossible event. */ |
529 | return 0; | 529 | return 0; |
530 | case ICMP_FRAG_NEEDED: | ||
531 | /* Soft state for pmtu is maintained by IP core. */ | ||
532 | return 0; | ||
533 | default: | 530 | default: |
534 | /* All others are translated to HOST_UNREACH. | 531 | /* All others are translated to HOST_UNREACH. |
535 | rfc2003 contains "deep thoughts" about NET_UNREACH, | 532 | rfc2003 contains "deep thoughts" about NET_UNREACH, |
@@ -542,6 +539,8 @@ static int ipip6_err(struct sk_buff *skb, u32 info) | |||
542 | if (code != ICMP_EXC_TTL) | 539 | if (code != ICMP_EXC_TTL) |
543 | return 0; | 540 | return 0; |
544 | break; | 541 | break; |
542 | case ICMP_REDIRECT: | ||
543 | break; | ||
545 | } | 544 | } |
546 | 545 | ||
547 | err = -ENOENT; | 546 | err = -ENOENT; |
@@ -551,7 +550,23 @@ static int ipip6_err(struct sk_buff *skb, u32 info) | |||
551 | skb->dev, | 550 | skb->dev, |
552 | iph->daddr, | 551 | iph->daddr, |
553 | iph->saddr); | 552 | iph->saddr); |
554 | if (t == NULL || t->parms.iph.daddr == 0) | 553 | if (t == NULL) |
554 | goto out; | ||
555 | |||
556 | if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) { | ||
557 | ipv4_update_pmtu(skb, dev_net(skb->dev), info, | ||
558 | t->dev->ifindex, 0, IPPROTO_IPV6, 0); | ||
559 | err = 0; | ||
560 | goto out; | ||
561 | } | ||
562 | if (type == ICMP_REDIRECT) { | ||
563 | ipv4_redirect(skb, dev_net(skb->dev), t->dev->ifindex, 0, | ||
564 | IPPROTO_IPV6, 0); | ||
565 | err = 0; | ||
566 | goto out; | ||
567 | } | ||
568 | |||
569 | if (t->parms.iph.daddr == 0) | ||
555 | goto out; | 570 | goto out; |
556 | 571 | ||
557 | err = 0; | 572 | err = 0; |
@@ -792,7 +807,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb, | |||
792 | } | 807 | } |
793 | 808 | ||
794 | if (tunnel->parms.iph.daddr && skb_dst(skb)) | 809 | if (tunnel->parms.iph.daddr && skb_dst(skb)) |
795 | skb_dst(skb)->ops->update_pmtu(skb_dst(skb), mtu); | 810 | skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu); |
796 | 811 | ||
797 | if (skb->len > mtu) { | 812 | if (skb->len > mtu) { |
798 | icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); | 813 | icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); |