Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8239355

(dc) Initial value of SO_SNDBUF should allow sending large datagrams (macOS)

XMLWordPrintable

    • b15

        The default value of net.inet.udp.maxdgram on macOS is 9216 which limits the size of the datagram that can be sent by applications that don't set the SO_SNDBUF option. Legacy DatagramSocket sets the value to 65507 at creation time. Sending large datagrams will clearly require fragmentation so it's not optimal but there may be applications that depend on it (the patch to set the socket option to 65507 seems to come from the original Apple port).

        The attached patch updates DatagramChannel so that the SO_SNDBUF is set to a minimum value of 65527 for IPv6 sockets and 65507 for IPv4 sockets.

              pconcannon Patrick Concannon (Inactive)
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: