diff options
author | Micael Karlberg <[email protected]> | 2018-07-11 18:20:06 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2018-09-18 14:50:18 +0200 |
commit | e5a5cb1025270c265baeda89dd4cd13a1417a262 (patch) | |
tree | 59039c851ec3d18b4e286eafdb16b9be92114d41 /erts/preloaded/src/socket.erl | |
parent | 4d29dde851fb30d86c194961f93e148198ae456d (diff) | |
download | otp-e5a5cb1025270c265baeda89dd4cd13a1417a262.tar.gz otp-e5a5cb1025270c265baeda89dd4cd13a1417a262.tar.bz2 otp-e5a5cb1025270c265baeda89dd4cd13a1417a262.zip |
[socket-nif] Add support for socket (level ip) option mtu
Added support for the IP option MTU.
OTP-14831
Diffstat (limited to 'erts/preloaded/src/socket.erl')
-rw-r--r-- | erts/preloaded/src/socket.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/preloaded/src/socket.erl b/erts/preloaded/src/socket.erl index a4efc2e38c..d6b2289b69 100644 --- a/erts/preloaded/src/socket.erl +++ b/erts/preloaded/src/socket.erl @@ -515,14 +515,14 @@ -define(SOCKET_OPT_IP_ADD_MEMBERSHIP, 1). %% -define(SOCKET_OPT_IP_ADD_SOURCE_MEMBERSHIP, 2). %% -define(SOCKET_OPT_IP_BLOCK_SOURCE, 3). -%% -define(SOCKET_OPT_IP_DONT_FRAG, 4). +%% -define(SOCKET_OPT_IP_DONTFRAG, 4). % Windows? MTU_DISCOVER... -define(SOCKET_OPT_IP_DROP_MEMBERSHIP, 5). %% -define(SOCKET_OPT_IP_DROP_SOURCE_MEMBERSHIP, 6). %% -define(SOCKET_OPT_IP_FREEBIND, 7). %% -define(SOCKET_OPT_IP_HDRINCL, 8). %% -define(SOCKET_OPT_IP_MINTTL, 9). %% -define(SOCKET_OPT_IP_MSFILTER, 10). -%% -define(SOCKET_OPT_IP_MTU, 11). +-define(SOCKET_OPT_IP_MTU, 11). %% -define(SOCKET_OPT_IP_MTU_DISCOVER, 12). %% -define(SOCKET_OPT_IP_MULTICAST_ALL, 13). -define(SOCKET_OPT_IP_MULTICAST_IF, 14). @@ -2275,8 +2275,8 @@ enc_sockopt_key(ip = L, minttl = Opt, _Dir, _D, raw = _T, _P) -> not_supported({L, Opt}); enc_sockopt_key(ip = L, msfilter = Opt, _Dir, _D, _T, _P) -> not_supported({L, Opt}); -enc_sockopt_key(ip = L, mtu = Opt, get = _Dir, _D, _T, _P) -> - not_supported({L, Opt}); +enc_sockopt_key(ip = _L, mtu = _Opt, get = _Dir, _D, _T, _P) -> + ?SOCKET_OPT_IP_MTU; enc_sockopt_key(ip = L, mtu_discover = Opt, _Dir, _D, _T, _P) -> not_supported({L, Opt}); enc_sockopt_key(ip = L, multicast_all = Opt, _Dir, _D, _T, _P) -> |