Package: isc-dhcp
Version: 4.3.5-3
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu artful ubuntu-patch
Dear Maintainer,
dhclient does not work when doing DHCPv6 with an interface alias, e.g.
dhclient -6 -v eth0:1
fails. The attached patch is required to fix it.
* When comparing enumerated interface name with cmdline interface name,
the cmdline interface name alias extension must be stripped since all
enumerated interface names have their alias extension stripped.
Without this, DHCPv6 fails for interface aliases. (LP: #1693819)
Thanks for considering the patch.
-- System Information:
Debian Release: stretch/sid
APT prefers zesty-updates
APT policy: (500, 'zesty-updates'), (500, 'zesty-security'), (500, 'zesty'),
(100, 'zesty-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.10.0-20-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru isc-dhcp-4.3.5/debian/control isc-dhcp-4.3.5/debian/control
--- isc-dhcp-4.3.5/debian/control 2017-01-19 12:11:21.000000000 -0500
+++ isc-dhcp-4.3.5/debian/control 2017-05-26 10:57:51.000000000 -0400
@@ -1,8 +1,7 @@
Source: isc-dhcp
Section: net
Priority: important
-Maintainer: Ubuntu Developers <[email protected]>
-XSBC-Original-Maintainer: Debian ISC DHCP maintainers
<[email protected]>
+Maintainer: Debian ISC DHCP maintainers
<[email protected]>
Uploaders: Andrew Pollock <[email protected]>, Michael Gilbert
<[email protected]>
Vcs-Git: https://anonscm.debian.org/pkg-dhcp/isc-dhcp.git
Vcs-Browser:
https://anonscm.debian.org/gitweb/?p=pkg-dhcp/isc-dhcp.git;a=summary
diff -Nru isc-dhcp-4.3.5/debian/patches/series
isc-dhcp-4.3.5/debian/patches/series
--- isc-dhcp-4.3.5/debian/patches/series 2017-01-19 12:11:21.000000000
-0500
+++ isc-dhcp-4.3.5/debian/patches/series 2017-05-26 10:57:24.000000000
-0400
@@ -32,3 +32,4 @@
dhcp-improved-xid-correct-byte-order.patch
dhcp-4.2.4-dhclient-options-changed.patch
ubuntu-dhcpd-conf.patch
+strip-alias-when-comparing-interface-names.patch
diff -Nru
isc-dhcp-4.3.5/debian/patches/strip-alias-when-comparing-interface-names.patch
isc-dhcp-4.3.5/debian/patches/strip-alias-when-comparing-interface-names.patch
---
isc-dhcp-4.3.5/debian/patches/strip-alias-when-comparing-interface-names.patch
1969-12-31 19:00:00.000000000 -0500
+++
isc-dhcp-4.3.5/debian/patches/strip-alias-when-comparing-interface-names.patch
2017-05-26 10:57:32.000000000 -0400
@@ -0,0 +1,40 @@
+Author: Dan Streetman <[email protected]>
+Description: Since isc-dhcp strips the interface alias from all
+ interfaces it enumerates, when comparing the cmdline interface
+ name to find the matching enumerated interface, the cmdline name
+ must have its alias stripped also. Without this, DHCPv6 fails
+ when using an interface alias.
+Forwarded: yes
+Bug: [ISC bug tracking is private; bug email has been sent]
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1693819
+
+---
+ common/discover.c | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+Index: isc-dhcp-4.3.5/common/discover.c
+===================================================================
+--- isc-dhcp-4.3.5.orig/common/discover.c
++++ isc-dhcp-4.3.5/common/discover.c
+@@ -600,7 +600,20 @@ discover_interfaces(int state) {
+
+ /* See if we've seen an interface that matches this one. */
+ for (tmp = interfaces; tmp; tmp = tmp->next) {
+- if (!strcmp(tmp->name, info.name))
++#if defined(sun) || defined(__linux)
++ char *s, n[IFNAMSIZ];
++
++ strcpy(n, tmp->name);
++ /* next_iface() strips the interface alias,
++ * so we mustn't include it when strcmp */
++ s = strchr(n, ':');
++ if (s != NULL) {
++ *s = '\0';
++ }
++#else
++ char *n = tmp->name;
++#endif /* defined(sun) || defined(__linux) */
++ if (!strcmp(n, info.name))
+ break;
+ }
+