Print this page
7819 IPv6 Packet and MTU bug

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ip/ip.c
          +++ new/usr/src/uts/common/inet/ip/ip.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   * Copyright (c) 1990 Mentat Inc.
  25   25   * Copyright (c) 2012 Joyent, Inc. All rights reserved.
  26      - * Copyright (c) 2014, OmniTI Computer Consulting, Inc. All rights reserved.
       26 + * Copyright (c) 2017 OmniTI Computer Consulting, Inc. All rights reserved.
  27   27   */
  28   28  
  29   29  #include <sys/types.h>
  30   30  #include <sys/stream.h>
  31   31  #include <sys/dlpi.h>
  32   32  #include <sys/stropts.h>
  33   33  #include <sys/sysmacros.h>
  34   34  #include <sys/strsubr.h>
  35   35  #include <sys/strlog.h>
  36   36  #include <sys/strsun.h>
↓ open down ↓ 3814 lines elided ↑ open up ↑
3851 3851                                  break;
3852 3852                          }
3853 3853                  } else {
3854 3854                          /* Default is IPV6_USE_MIN_MTU_MULTICAST */
3855 3855                          if (ire->ire_type & IRE_MULTICAST)
3856 3856                                  pmtu = IPV6_MIN_MTU;
3857 3857                  }
3858 3858          }
3859 3859  
3860 3860          /*
3861      -         * After receiving an ICMPv6 "packet too big" message with a
3862      -         * MTU < 1280, and for multirouted IPv6 packets, the IP layer
3863      -         * will insert a 8-byte fragment header in every packet. We compensate
3864      -         * for those cases by returning a smaller path MTU to the ULP.
     3861 +         * For multirouted IPv6 packets, the IP layer will insert a 8-byte
     3862 +         * fragment header in every packet. We compensate for those cases by
     3863 +         * returning a smaller path MTU to the ULP.
3865 3864           *
3866 3865           * In the case of CGTP then ip_output will add a fragment header.
3867 3866           * Make sure there is room for it by telling a smaller number
3868 3867           * to the transport.
3869 3868           *
3870 3869           * When IXAF_IPV6_ADDR_FRAGHDR we subtract the frag hdr here
3871 3870           * so the ULPs consistently see a iulp_pmtu and ip_get_pmtu()
3872 3871           * which is the size of the packets it can send.
3873 3872           */
3874 3873          if (!(ixa->ixa_flags & IXAF_IS_IPV4)) {
3875      -                if ((dce->dce_flags & DCEF_TOO_SMALL_PMTU) ||
3876      -                    (ire->ire_flags & RTF_MULTIRT) ||
     3874 +                if ((ire->ire_flags & RTF_MULTIRT) ||
3877 3875                      (ixa->ixa_flags & IXAF_MULTIRT_MULTICAST)) {
3878 3876                          pmtu -= sizeof (ip6_frag_t);
3879 3877                          ixa->ixa_flags |= IXAF_IPV6_ADD_FRAGHDR;
3880 3878                  }
3881 3879          }
3882 3880  
3883 3881          return (pmtu);
3884 3882  }
3885 3883  
3886 3884  /*
↓ open down ↓ 11406 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX