This problem is because isc-dhcp strips the interface alias when it enumerates the system interfaces, i.e. in common/discover.c function next_iface():
/* interface aliases look like "eth0:1" or "wlan1:3" */
s = strchr(info->name, ':');
if (s != NULL) { *s = '\0';
}
However when later searching the previously-enumerated list for the matching interface for the cmdline interface parameter name, it does not strip the interface alias from the cmdline interface name, i.e. in common/discover.c function discover_interfaces():
/* Cycle through the list of interfaces looking for IP addresses. */
while (next_iface(&info, &err, &ifaces)) {
/* See if we've seen an interface that matches this one. */
for (tmp = interfaces; tmp; tmp = tmp->next) { if (!strcmp(tmp->name, info.name)) break;
}
The 'info' interface will always have its info.name set to the actual interface name, without any alias extension, while the 'tmp' interface (from the cmdline) will have its tmp->name set to the interface including alias extension; the strcmp then never matches, so isc-dhcp is not able to correctly match the requested interface with the actual system interface.
This problem is because isc-dhcp strips the interface alias when it enumerates the system interfaces, i.e. in common/discover.c function next_iface():
/* interface aliases look like "eth0:1" or "wlan1:3" */
*s = '\0';
s = strchr(info->name, ':');
if (s != NULL) {
}
However when later searching the previously- enumerated list for the matching interface for the cmdline interface parameter name, it does not strip the interface alias from the cmdline interface name, i.e. in common/discover.c function discover_ interfaces( ):
/* Cycle through the list of interfaces looking for IP addresses. */
while (next_iface(&info, &err, &ifaces)) {
/* See if we've seen an interface that matches this one. */
if (!strcmp(tmp->name, info.name))
break;
for (tmp = interfaces; tmp; tmp = tmp->next) {
}
The 'info' interface will always have its info.name set to the actual interface name, without any alias extension, while the 'tmp' interface (from the cmdline) will have its tmp->name set to the interface including alias extension; the strcmp then never matches, so isc-dhcp is not able to correctly match the requested interface with the actual system interface.