Useful error logging in dhcp-split-relay code.

This commit is contained in:
Simon Kelley
2025-08-21 13:05:24 +01:00
parent d81b1d76a0
commit 18195e7bb2

View File

@@ -3114,7 +3114,11 @@ void relay_upstream4(struct in_addr iface_addr, int iface_index, struct dhcp_pac
{ {
/* get our address on the server-facing interface. */ /* get our address on the server-facing interface. */
if (ioctl(daemon->dhcpfd, SIOCGIFADDR, &ifr) == -1) if (ioctl(daemon->dhcpfd, SIOCGIFADDR, &ifr) == -1)
{
my_syslog(MS_DHCP | LOG_ERR, _("Cannot send to server via interface %s: %s"), relay->interface, strerror(errno));
continue; continue;
}
relay->uplink.addr4 = ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr; relay->uplink.addr4 = ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr;
} }