8290349: IP_DONTFRAGMENT doesn't set DF bit in IPv4 header

Reviewed-by: michaelm, alanb
This commit is contained in:
Daniel Jeliński 2022-08-04 10:52:15 +00:00
parent 26e5c112da
commit ce61eb6ff9
9 changed files with 74 additions and 134 deletions

View file

@ -402,9 +402,10 @@ public class Net {
// only simple values supported by this method
Class<?> type = name.type();
boolean isIPv6 = (family == StandardProtocolFamily.INET6);
if (extendedOptions.isOptionSupported(name)) {
extendedOptions.setOption(fd, name, value);
extendedOptions.setOption(fd, name, value, isIPv6);
return;
}
@ -451,7 +452,6 @@ public class Net {
}
boolean mayNeedConversion = (family == UNSPEC);
boolean isIPv6 = (family == StandardProtocolFamily.INET6);
setIntOption0(fd, mayNeedConversion, key.level(), key.name(), arg, isIPv6);
}
@ -467,7 +467,8 @@ public class Net {
Class<?> type = name.type();
if (extendedOptions.isOptionSupported(name)) {
return extendedOptions.getOption(fd, name);
boolean isIPv6 = (family == StandardProtocolFamily.INET6);
return extendedOptions.getOption(fd, name, isIPv6);
}
// only simple values supported by this method