RFR: 8290349: IP_DONTFRAGMENT doesn't set DF bit in IPv4 header [v2]
Daniel Jeliński
djelinski at openjdk.org
Mon Aug 1 07:33:25 UTC 2022
On Mon, 25 Jul 2022 10:51:14 GMT, Michael McMahon <michaelm at openjdk.org> wrote:
>> Hi Jaikiran, the point of this change was to better support systems where either IPv4 or IPv6 was disabled. I'm not sure if that can even happen on Mac.
>> The change here is that if we can't create one socket, we don't immediately return false, but instead return the result for the other socket. For example, if creating IPv4 socket fails, we only check if DF is supported on IPv6 socket, and return that as a result. If both `socket` calls fail, we don't know if the DF flag is supported, and return true (before the patch we would return false in that case). I can modify the patch to return false in that case, or roll back this change entirely if you think it makes no sense.
>
> I think this change makes sense so long as we are sure that if IPv4 or IPv6 is disabled then the right call happens for the other option.
The method will return true if the process is at the limit of open file descriptors. Before this patch the code returned false in that case.
As soon as Mac OS 10 (Catalina) goes out of support, we can remove this code entirely - AFAICT all newer versions support DF.
-------------
PR: https://git.openjdk.org/jdk/pull/9575
More information about the net-dev
mailing list