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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=321325
@ -3020,19 +3020,23 @@ sogetopt(struct socket *so, struct sockopt *sopt)
|
||||
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…
Reference in New Issue
Block a user