mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8290349: IP_DONTFRAGMENT doesn't set DF bit in IPv4 header
Reviewed-by: michaelm, alanb
This commit is contained in:
parent
26e5c112da
commit
ce61eb6ff9
9 changed files with 74 additions and 134 deletions
|
@ -133,11 +133,11 @@ public abstract class ExtendedSocketOptions {
|
|||
}
|
||||
|
||||
/** Sets the value of a socket option, for the given socket. */
|
||||
public abstract void setOption(FileDescriptor fd, SocketOption<?> option, Object value)
|
||||
public abstract void setOption(FileDescriptor fd, SocketOption<?> option, Object value, boolean isIPv6)
|
||||
throws SocketException;
|
||||
|
||||
/** Returns the value of a socket option, for the given socket. */
|
||||
public abstract Object getOption(FileDescriptor fd, SocketOption<?> option)
|
||||
public abstract Object getOption(FileDescriptor fd, SocketOption<?> option, boolean isIPv6)
|
||||
throws SocketException;
|
||||
|
||||
protected ExtendedSocketOptions(Set<SocketOption<?>> options) {
|
||||
|
@ -206,7 +206,7 @@ public abstract class ExtendedSocketOptions {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setOption(FileDescriptor fd, SocketOption<?> option, Object value)
|
||||
public void setOption(FileDescriptor fd, SocketOption<?> option, Object value, boolean isIPv6)
|
||||
throws SocketException
|
||||
{
|
||||
throw new UnsupportedOperationException(
|
||||
|
@ -214,7 +214,7 @@ public abstract class ExtendedSocketOptions {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Object getOption(FileDescriptor fd, SocketOption<?> option)
|
||||
public Object getOption(FileDescriptor fd, SocketOption<?> option, boolean isIPv6)
|
||||
throws SocketException
|
||||
{
|
||||
throw new UnsupportedOperationException(
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue