diff options
author | Raimo Niskanen <[email protected]> | 2010-07-02 11:55:05 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-08-31 14:02:19 +0200 |
commit | c61fe198825316de24e7b37620b3ebd8ebd81c6d (patch) | |
tree | cc4b1b016c2b26a4620cf5ed2a94515919084dca /erts | |
parent | 82d430853eb1f53e6022de647c26254fe5681454 (diff) | |
download | otp-c61fe198825316de24e7b37620b3ebd8ebd81c6d.tar.gz otp-c61fe198825316de24e7b37620b3ebd8ebd81c6d.tar.bz2 otp-c61fe198825316de24e7b37620b3ebd8ebd81c6d.zip |
Fix SCTP linger option
inet:setopts(S, [{linger,{true,2}}]) returned {error,einval} for
SCTP sockets. The inet_drv had a bug when checking the option size.
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/drivers/common/inet_drv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c index 059288d1cb..221904c114 100644 --- a/erts/emulator/drivers/common/inet_drv.c +++ b/erts/emulator/drivers/common/inet_drv.c @@ -5032,8 +5032,8 @@ static int sctp_set_opts(inet_descriptor* desc, char* ptr, int len) } case INET_OPT_LINGER: { - CHKLEN(curr, ASSOC_ID_LEN + 2 + 4); - arg.lin.l_onoff = get_int16 (curr); curr += 2; + CHKLEN(curr, 2*4); + arg.lin.l_onoff = get_int32 (curr); curr += 4; arg.lin.l_linger = get_int32 (curr); curr += 4; proto = SOL_SOCKET; |