From: Lennart Poettering Date: Fri, 16 Jul 2010 17:41:50 +0000 (+0200) Subject: socket: don't allow mixing of accepting and non-accepting sockets in the same unit X-Git-Tag: v4~43 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0009d2a63339af1ee9b6f18ab6cf42d68d089148;p=systemd socket: don't allow mixing of accepting and non-accepting sockets in the same unit --- diff --git a/src/socket.c b/src/socket.c index 4a9c9399..78fc049a 100644 --- a/src/socket.c +++ b/src/socket.c @@ -160,6 +160,11 @@ static int socket_verify(Socket *s) { return -EINVAL; } + if (s->accept && have_non_accept_socket(s)) { + log_error("%s configured for accepting sockets, but sockets are non-accepting. Refusing.", s->meta.id); + return -EINVAL; + } + if (s->accept && s->max_connections <= 0) { log_error("%s's MaxConnection setting too small. Refusing.", s->meta.id); return -EINVAL;