1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-08 09:57:41 +03:00

socket: don't allow mixing of accepting and non-accepting sockets in the same unit

This commit is contained in:
Lennart Poettering 2010-07-16 19:41:50 +02:00
parent cac6f7c872
commit 0009d2a633

View File

@ -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;