summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-10-25 14:59:44 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2016-10-25 15:04:07 +0100
commit4670e9d3b06f6f14c5d868f786b75e2d6b921c8d (patch)
tree0ccf5522993ea2c3b8effc2eb7a697b30f503543
parentd29a84b5fb514671b2b6a324ebb5f982dfcfc812 (diff)
TFO: use IPPROTO_TCP not SOL_TCL for setsockopt, being present on more platforms
Also downgrade errors from panic-log to debug
-rw-r--r--src/src/daemon.c7
-rw-r--r--src/src/ip.c4
2 files changed, 5 insertions, 6 deletions
diff --git a/src/src/daemon.c b/src/src/daemon.c
index dc49eeb85..3ace7e9db 100644
--- a/src/src/daemon.c
+++ b/src/src/daemon.c
@@ -1458,10 +1458,9 @@ if (daemon_listen && !inetd_wait_mode)
debug_printf("listening on %s port %d\n", ipa->address, ipa->port);
#ifdef TCP_FASTOPEN
- if (setsockopt(listen_sockets[sk], SOL_TCP, TCP_FASTOPEN, &smtp_connect_backlog,
- sizeof(smtp_connect_backlog)))
- log_write(0, LOG_MAIN|LOG_PANIC, "failed to set socket FASTOPEN: %s",
- strerror(errno));
+ if (setsockopt(listen_sockets[sk], IPPROTO_TCP, TCP_FASTOPEN,
+ &smtp_connect_backlog, sizeof(smtp_connect_backlog)))
+ DEBUG(D_any) debug_printf("setsockopt FASTOPEN: %s", strerror(errno));
#endif
/* Start listening on the bound socket, establishing the maximum backlog of
diff --git a/src/src/ip.c b/src/src/ip.c
index a8230a149..ee70cf469 100644
--- a/src/src/ip.c
+++ b/src/src/ip.c
@@ -239,8 +239,8 @@ if (fastopen)
&& errno == EOPNOTSUPP
)
{
- log_write(0, LOG_MAIN|LOG_PANIC,
- "Tried TCP Fast Open but apparently not enabled by sysctl");
+ DEBUG(D_transport)
+ debug_printf("Tried TCP Fast Open but apparently not enabled by sysctl");
rc = connect(sock, s_ptr, s_len);
}
}