Fix getsockopt() for listening sockets when using SO_SNDBUF, SO_RCVBUF,
SO_SNDLOWAT, SO_RCVLOWAT. Since r31972 it only worked for non-listening sockets. Sponsored by: Netflix, Inc.
This commit is contained in:
parent
4dd4446129
commit
27d8bea898
@ -3020,19 +3020,23 @@ integer:
|
||||
goto integer;
|
||||
|
||||
case SO_SNDBUF:
|
||||
optval = so->so_snd.sb_hiwat;
|
||||
optval = SOLISTENING(so) ? so->sol_sbsnd_hiwat :
|
||||
so->so_snd.sb_hiwat;
|
||||
goto integer;
|
||||
|
||||
case SO_RCVBUF:
|
||||
optval = so->so_rcv.sb_hiwat;
|
||||
optval = SOLISTENING(so) ? so->sol_sbrcv_hiwat :
|
||||
so->so_rcv.sb_hiwat;
|
||||
goto integer;
|
||||
|
||||
case SO_SNDLOWAT:
|
||||
optval = so->so_snd.sb_lowat;
|
||||
optval = SOLISTENING(so) ? so->sol_sbsnd_lowat :
|
||||
so->so_snd.sb_lowat;
|
||||
goto integer;
|
||||
|
||||
case SO_RCVLOWAT:
|
||||
optval = so->so_rcv.sb_lowat;
|
||||
optval = SOLISTENING(so) ? so->sol_sbrcv_lowat :
|
||||
so->so_rcv.sb_lowat;
|
||||
goto integer;
|
||||
|
||||
case SO_SNDTIMEO:
|
||||
|
Loading…
x
Reference in New Issue
Block a user