diff options
author | Micael Karlberg <[email protected]> | 2019-07-10 16:17:49 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-07-17 12:12:38 +0200 |
commit | ab78a0e3c0655efe5a8aab3569aca0859811dd4a (patch) | |
tree | b44f895c074e67b51ed3b70826a2e56da7b389c2 /erts/preloaded/src | |
parent | 151c6bd2c9a374f3ac5dfd940993caa679cf5c17 (diff) | |
download | otp-ab78a0e3c0655efe5a8aab3569aca0859811dd4a.tar.gz otp-ab78a0e3c0655efe5a8aab3569aca0859811dd4a.tar.bz2 otp-ab78a0e3c0655efe5a8aab3569aca0859811dd4a.zip |
[esock] Add test case for socket option bindtodevice
Add test case for the socket option bindtodevice. Also make
correction in the nif code. Used the wrong option (broadcast).
Also added more info to doc.
Note sure if this test case actually works. Set and get "works",
but the value returned by get is always "". So either we should
extend the test to made sure the bind actually has the expected
effect or... Something for a rainy day maybe...
OTP-15904
Diffstat (limited to 'erts/preloaded/src')
-rw-r--r-- | erts/preloaded/src/socket.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/preloaded/src/socket.erl b/erts/preloaded/src/socket.erl index b80ef13e1e..016b479c4d 100644 --- a/erts/preloaded/src/socket.erl +++ b/erts/preloaded/src/socket.erl @@ -3381,8 +3381,8 @@ enc_sockopt_key(socket = L, acceptconn = Opt, Dir, _D, _T, _P) -> not_supported({L, Opt, Dir}); enc_sockopt_key(socket = L, acceptfilter = Opt, _Dir, _D, _T, _P) -> not_supported({L, Opt}); -%% Before linux 3.8, this socket option could be set. -%% Maximum size of buffer for name: IFNAMSZIZ +%% Before linux 3.8, this socket option could be set but not get. +%% Maximum size of buffer for name: IFNAMSIZ %% So, we let the implementation decide. enc_sockopt_key(socket = _L, bindtodevice = _Opt, _Dir, _D, _T, _P) -> ?SOCKET_OPT_SOCK_BINDTODEVICE; |