From: Roy Marples Date: Tue, 9 Dec 2014 12:52:52 +0000 (+0000) Subject: Allow other processes to handle the DHCP port on the wildcard address. X-Git-Tag: v6.6.5~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=214e9a165c67e8a33b444bb3b03722dea39dbc4f;p=thirdparty%2Fdhcpcd.git Allow other processes to handle the DHCP port on the wildcard address. --- diff --git a/dhcp.c b/dhcp.c index 43d4aaea..b9a6fb1e 100644 --- a/dhcp.c +++ b/dhcp.c @@ -3074,11 +3074,14 @@ dhcp_start1(void *arg) if (ifp->ctx->udp_fd == -1) { ifp->ctx->udp_fd = dhcp_openudp(NULL); if (ifp->ctx->udp_fd == -1) { - syslog(LOG_ERR, "dhcp_openudp: %m"); - return; - } - eloop_event_add(ifp->ctx->eloop, - ifp->ctx->udp_fd, dhcp_handleudp, ifp->ctx, NULL, NULL); + /* Don't log an error if some other process + * is handling this. */ + if (errno != EADDRINUSE) + syslog(LOG_ERR, "dhcp_openudp: %m"); + } else + eloop_event_add(ifp->ctx->eloop, + ifp->ctx->udp_fd, dhcp_handleudp, + ifp->ctx, NULL, NULL); } if (dhcp_init(ifp) == -1) {