summaryrefslogtreecommitdiffstats
path: root/mbbsd/mbbsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r--mbbsd/mbbsd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index f96f5eff..be7b32e7 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1235,7 +1235,7 @@ getremotename(struct sockaddr_in * from, char *rhost, char *rname)
static int
bind_port(int port)
{
- int sock, on;
+ int sock, on, sz;
sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
@@ -1246,6 +1246,9 @@ bind_port(int port)
on = 0;
setsockopt(sock, SOL_SOCKET, SO_LINGER, (char *)&on, sizeof(on));
+ sz = 1024;
+ setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (void*)&sz, sizeof(sz));
+
xsin.sin_port = htons(port);
if (bind(sock, (struct sockaddr *) & xsin, sizeof xsin) < 0) {
syslog(LOG_INFO, "bbsd bind_port can't bind to %d", port);