Line 0
Link Here
|
|
|
1 |
$OpenBSD: patch-rec_channel_cc,v 1.1.1.1 2018/12/29 14:29:08 sthen Exp $ |
2 |
|
3 |
Index: rec_channel.cc |
4 |
--- rec_channel.cc.orig 2019-01-31 19:43:44 UTC |
5 |
+++ rec_channel.cc |
6 |
@@ -54,6 +54,10 @@ int RecursorControlChannel::listen(const string& fname |
7 |
if(bind(d_fd, (sockaddr*)&d_local,sizeof(d_local))<0) |
8 |
throw PDNSException("Unable to bind to controlsocket '"+fname+"': "+stringerror()); |
9 |
|
10 |
+ int bufsz = 60*1024; |
11 |
+ setsockopt(d_fd, SOL_SOCKET, SO_SNDBUF, &bufsz, sizeof(bufsz)); |
12 |
+ bufsz = 64*1024; |
13 |
+ setsockopt(d_fd, SOL_SOCKET, SO_RCVBUF, &bufsz, sizeof(bufsz)); |
14 |
return d_fd; |
15 |
} |
16 |
|
17 |
@@ -99,6 +103,10 @@ void RecursorControlChannel::connect(const string& pat |
18 |
unlink(d_local.sun_path); |
19 |
throw PDNSException("Unable to connect to remote '"+string(remote.sun_path)+"': "+stringerror()); |
20 |
} |
21 |
+ int bufsz = 60*1024; |
22 |
+ setsockopt(d_fd, SOL_SOCKET, SO_SNDBUF, &bufsz, sizeof(bufsz)); |
23 |
+ bufsz = 64*1024; |
24 |
+ setsockopt(d_fd, SOL_SOCKET, SO_RCVBUF, &bufsz, sizeof(bufsz)); |
25 |
|
26 |
} catch (...) { |
27 |
close(d_fd); |