ip6_output.c (72e843bb09d4533208aa5573861a983c46914019) | ip6_output.c (a34a101e1e6365638b02ea83a38d7a4cb228dc04) |
---|---|
1/* 2 * IPv6 output functions 3 * Linux INET6 implementation 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * 8 * Based on linux/net/ipv4/ip_output.c --- 629 unchanged lines hidden (view full) --- 638 hlen = ip6_find_1stfragopt(skb, &prevhdr); 639 nexthdr = *prevhdr; 640 641 mtu = ip6_skb_dst_mtu(skb); 642 643 /* We must not fragment if the socket is set to force MTU discovery 644 * or if the skb it not generated by a local socket. 645 */ | 1/* 2 * IPv6 output functions 3 * Linux INET6 implementation 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * 8 * Based on linux/net/ipv4/ip_output.c --- 629 unchanged lines hidden (view full) --- 638 hlen = ip6_find_1stfragopt(skb, &prevhdr); 639 nexthdr = *prevhdr; 640 641 mtu = ip6_skb_dst_mtu(skb); 642 643 /* We must not fragment if the socket is set to force MTU discovery 644 * or if the skb it not generated by a local socket. 645 */ |
646 if (!skb->local_df && skb->len > mtu) { | 646 if (unlikely(!skb->local_df && skb->len > mtu)) { 647 if (skb->sk && dst_allfrag(skb_dst(skb))) 648 sk_nocaps_add(skb->sk, NETIF_F_GSO_MASK); 649 |
647 skb->dev = skb_dst(skb)->dev; 648 icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); 649 IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), 650 IPSTATS_MIB_FRAGFAILS); 651 kfree_skb(skb); 652 return -EMSGSIZE; 653 } 654 --- 1004 unchanged lines hidden --- | 650 skb->dev = skb_dst(skb)->dev; 651 icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); 652 IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), 653 IPSTATS_MIB_FRAGFAILS); 654 kfree_skb(skb); 655 return -EMSGSIZE; 656 } 657 --- 1004 unchanged lines hidden --- |