dhclient DHCPv6 does not work with interface alias
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
isc-dhcp (Debian) |
New
|
Unknown
|
|||
isc-dhcp (Ubuntu) |
Won't Fix
|
Low
|
Unassigned | ||
Trusty |
Won't Fix
|
Low
|
Unassigned | ||
Xenial |
Won't Fix
|
Low
|
Unassigned | ||
Yakkety |
Won't Fix
|
Low
|
Unassigned | ||
Zesty |
Won't Fix
|
Low
|
Unassigned | ||
Artful |
Won't Fix
|
Low
|
Unassigned |
Bug Description
[Impact]
The isc-dhcp-client dhclient program does not work with interface alias names, e.g. eth0:1. It fails immediately.
[Test Case]
On trusty through artful, find an interface that is connected to a network that has a DHCPv6 server on it. First verify it can get a DHCPv6 address, e.g.:
$ sudo dhclient -6 -v ens7
that should successfully set up a DHCPv6 address on the interface. Then release the interface:
$ sudo dhclient -6 -v -r ens7
Now, try again but use the interface alias, e.g.:
$ sudo dhclient -6 -v ens7:1
It should succeed, but it will fail with:
no link-local IPv6 address for ens7:1
[Regression Potential]
Changing how isc-dhcp handles (enumerates/
[Other Info]
This bug exists in the upstream isc-dhcp; the ISC has no public bug tracker, and only accepts bug reports via private email, which has been sent.
Changed in isc-dhcp (Ubuntu): | |
assignee: | nobody → Dan Streetman (ddstreet) |
importance: | Undecided → Low |
Changed in isc-dhcp (Ubuntu Zesty): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in isc-dhcp (Ubuntu Yakkety): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in isc-dhcp (Ubuntu Xenial): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in isc-dhcp (Ubuntu Trusty): | |
assignee: | nobody → Dan Streetman (ddstreet) |
Changed in isc-dhcp (Ubuntu Zesty): | |
importance: | Undecided → Low |
Changed in isc-dhcp (Ubuntu Yakkety): | |
importance: | Undecided → Low |
Changed in isc-dhcp (Ubuntu Xenial): | |
importance: | Undecided → Low |
Changed in isc-dhcp (Ubuntu Trusty): | |
importance: | Undecided → Low |
Changed in isc-dhcp (Debian): | |
status: | Unknown → New |
Changed in isc-dhcp (Ubuntu Artful): | |
status: | New → In Progress |
Changed in isc-dhcp (Ubuntu Zesty): | |
status: | New → Confirmed |
Changed in isc-dhcp (Ubuntu Yakkety): | |
status: | New → Confirmed |
Changed in isc-dhcp (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in isc-dhcp (Ubuntu Trusty): | |
status: | New → Confirmed |
tags: | added: rls-aa-notfixing |
tags: |
added: patch-needswork removed: patch |
Changed in isc-dhcp (Ubuntu): | |
assignee: | Dan Streetman (ddstreet) → nobody |
Changed in isc-dhcp (Ubuntu Zesty): | |
assignee: | Dan Streetman (ddstreet) → nobody |
Changed in isc-dhcp (Ubuntu Artful): | |
status: | In Progress → Confirmed |
assignee: | Dan Streetman (ddstreet) → nobody |
Changed in isc-dhcp (Ubuntu Yakkety): | |
assignee: | Dan Streetman (ddstreet) → nobody |
Changed in isc-dhcp (Ubuntu Xenial): | |
assignee: | Dan Streetman (ddstreet) → nobody |
Changed in isc-dhcp (Ubuntu Trusty): | |
assignee: | Dan Streetman (ddstreet) → nobody |
Changed in isc-dhcp (Ubuntu): | |
status: | In Progress → Confirmed |
status: | Confirmed → Won't Fix |
Changed in isc-dhcp (Ubuntu Trusty): | |
status: | Confirmed → Won't Fix |
Changed in isc-dhcp (Ubuntu Xenial): | |
status: | Confirmed → Won't Fix |
Changed in isc-dhcp (Ubuntu Yakkety): | |
status: | Confirmed → Won't Fix |
Changed in isc-dhcp (Ubuntu Zesty): | |
status: | Confirmed → Won't Fix |
Changed in isc-dhcp (Ubuntu Artful): | |
status: | Confirmed → Won't Fix |
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.