1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 14:55:37 +03:00

dhcp-server: don't propagate erros up the event loop

If we can't send a message this is no reason to completely abort the
event handler.

Issue identified by Nandor Han <nandor.han@ge.com>, Sebastian Reichel
<sebastian.reichel@collabora.co.uk>.

Replaces: #8525
This commit is contained in:
Lennart Poettering 2018-03-21 20:30:56 +01:00
parent cfcbb13583
commit 57027d0356

View File

@ -964,6 +964,7 @@ static int server_receive_message(sd_event_source *s, int fd,
};
struct cmsghdr *cmsg;
ssize_t buflen, len;
int r;
assert(server);
@ -1003,7 +1004,11 @@ static int server_receive_message(sd_event_source *s, int fd,
}
}
return dhcp_server_handle_message(server, message, (size_t)len);
r = dhcp_server_handle_message(server, message, (size_t) len);
if (r < 0)
log_dhcp_server_errno(server, r, "Couldn't process incoming message: %m");
return 0;
}
int sd_dhcp_server_start(sd_dhcp_server *server) {