only warn if setsockopt fails on EOPNOTSUPP
@@ -3964,8 +3964,12 @@ evhtp_accept_socket(evhtp_t * htp, evutil_socket_t sock, int backlog)
{
if (setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, (void *)&on, sizeof(on)) == -1)
{
+ if (errno != EOPNOTSUPP) {
break;
}
+
+ log_warn("SO_REUSEPORT not supported for this socket.. Skipping");
+ }
}
#endif
@@ -3974,8 +3978,12 @@ evhtp_accept_socket(evhtp_t * htp, evutil_socket_t sock, int backlog)
{
if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void *)&on, sizeof(on)) == -1)
{
+ if (errno != EOPNOTSUPP) {
break;
}
+
+ log_warn("TCP_NODELAY not supported for this socket.. Skipping");
+ }
}
#endif
@@ -3984,8 +3992,12 @@ evhtp_accept_socket(evhtp_t * htp, evutil_socket_t sock, int backlog)
{
if (setsockopt(sock, IPPROTO_TCP, TCP_DEFER_ACCEPT, (void *)&on, sizeof(on)) == -1)
{
+ if (errno != EOPNOTSUPP) {
break;
}
+
+ log_warn("TCP_DEFER_ACCEPT not supported for this socket.. Skipping");
+ }
}
#endif
