Skip to content

Commit

Permalink
set SO_RCVBUF to zero for unconnected sockets, too
Browse files Browse the repository at this point in the history
but only when the socket is being marked read-only
  • Loading branch information
alandekok committed Dec 20, 2024
1 parent 4092449 commit 728a932
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/bio/fd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@ int fr_bio_fd_write_only(fr_bio_t *bio)
fr_strerror_const("Only datagram sockets can be marked 'write-only'");
return -1;
}
break;
goto set_recv_buff_zero;

case FR_BIO_FD_CONNECTED:
case FR_BIO_FD_ACCEPTED:
Expand All @@ -1386,6 +1386,7 @@ int fr_bio_fd_write_only(fr_bio_t *bio)
return -1;
}

set_recv_buff_zero:
#ifdef __linux__
#ifdef SO_RCVBUF
/*
Expand Down

0 comments on commit 728a932

Please sign in to comment.