[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#924442: busybox: fix compatibility with isc-dhcp-client 4.4.1



Package: busybox
Version: 1:1.27.2-2
Severity: minor
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu disco ubuntu-patch

Dear maintainers,

After updating Ubuntu to include isc-dhcp-client 4.4.1-2 from Debian
unstable, we found that initramfs-tools' autopkgtests were failing for us,
because we use isc-dhcp-client in the initramfs for more complete and
correct early networking support, and isc-dhcp-client's dhclient-script had
started passing arguments to busybox's ip that it didn't understand.

The attached patch changes busybox's 'ip addr add' implementation to accept
valid_lft and preferred_lft as recognized no-op options, which I think is
preferable to the current behavior of erroring out on options that are
allowed by the iproute2 implementation of the command.

Please consider applying this patch in Debian.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org
diff -Nru busybox-1.27.2/debian/patches/handle-ip-valid_lft.patch busybox-1.27.2/debian/patches/handle-ip-valid_lft.patch
--- busybox-1.27.2/debian/patches/handle-ip-valid_lft.patch	1969-12-31 16:00:00.000000000 -0800
+++ busybox-1.27.2/debian/patches/handle-ip-valid_lft.patch	2019-03-12 15:52:31.000000000 -0700
@@ -0,0 +1,31 @@
+Description: Don't choke on ip addr add [...] valid_lft [...] preferred_lft
+ isc-dhcp-dclient 4.4.1 has started passing valid_lft, preferred_lft to
+ ip addr add but busybox ip doesn't support these options.  Handle these
+ gracefully, making them no-ops for now.
+Author: Steve Langasek <steve.langasek@ubuntu.com>
+Last-Modified: 2019-03-12
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1819747
+Forwarded: no
+ 
+Index: busybox-1.27.2/networking/libiproute/ipaddress.c
+===================================================================
+--- busybox-1.27.2.orig/networking/libiproute/ipaddress.c
++++ busybox-1.27.2/networking/libiproute/ipaddress.c
+@@ -596,7 +596,8 @@
+ 	/* If you add stuff here, update ipaddr_full_usage */
+ 	static const char option[] ALIGN1 =
+ 		"peer\0""remote\0""broadcast\0""brd\0"
+-		"anycast\0""scope\0""dev\0""label\0""local\0";
++		"anycast\0""scope\0""dev\0""label\0"
++		"valid_lft\0""preferred_lft\0""local\0";
+ #define option_peer      option
+ #define option_broadcast (option           + sizeof("peer") + sizeof("remote"))
+ #define option_anycast   (option_broadcast + sizeof("broadcast") + sizeof("brd"))
+@@ -679,6 +680,7 @@
+ 		} else if (arg == 7) { /* label */
+ 			l = *argv;
+ 			addattr_l(&req.n, sizeof(req), IFA_LABEL, l, strlen(l) + 1);
++		} else if (arg <= 9) { /* valid_lft, preferred_lft */
+ 		} else {
+ 			/* local (specified or assumed) */
+ 			if (local_len) {
diff -Nru busybox-1.27.2/debian/patches/series busybox-1.27.2/debian/patches/series
--- busybox-1.27.2/debian/patches/series	2019-03-06 12:10:50.000000000 -0800
+++ busybox-1.27.2/debian/patches/series	2019-03-12 15:08:43.000000000 -0700
@@ -27,3 +27,4 @@
 CVE-2018-1000517.patch
 CVE-2018-20679.patch
 CVE-2019-5747.patch
+handle-ip-valid_lft.patch

Reply to: