summaryrefslogtreecommitdiff
path: root/src/socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-16 19:41:50 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-16 19:41:50 +0200
commit0009d2a63339af1ee9b6f18ab6cf42d68d089148 (patch)
treee901a2655237267d4a68a760eb2d4ac1acc4803e /src/socket.c
parentcac6f7c87207b5079c1ae5c551869667bad4cfb8 (diff)
socket: don't allow mixing of accepting and non-accepting sockets in the same unit
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/socket.c b/src/socket.c
index 4a9c939936..78fc049a95 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;