dhcpcd: Update to 6.4.0
The lxc_ro_promote_secondaries patch no longer applies so I disabled it for now (@offlinehacker).
This commit is contained in:
parent
3614b34c6a
commit
993e8da496
@ -1,24 +1,44 @@
|
||||
Index: dhcpcd.c
|
||||
==================================================================
|
||||
--- a/dhcpcd.c
|
||||
+++ b/dhcpcd.c
|
||||
@@ -747,14 +747,14 @@
|
||||
if (ifp->hwlen != 0)
|
||||
memcpy(ifl->hwaddr, ifp->hwaddr, ifl->hwlen);
|
||||
Fix a segfault in handle_interface: if we're adding an interface that
|
||||
we already knew about (in particular due to a udev event), then
|
||||
calling init_state/start_interface on ifp is bad because we later free
|
||||
ifp. This leads to messages like:
|
||||
|
||||
dhcpcd[1342]: eth0: IAID conflicts with one assigned to eth0
|
||||
|
||||
and then a crash:
|
||||
|
||||
Invalid read of size 8
|
||||
at 0x41CD07: dhcp_handlepacket (dhcp.c:2555)
|
||||
by 0x408A74: eloop_start (eloop.c:399)
|
||||
by 0x4073B6: main (dhcpcd.c:1537)
|
||||
|
||||
Address 0x54573d8 is 200 bytes inside a block of size 232 free'd
|
||||
at 0x4C27507: free (in /nix/store/jafbjc2y6izmh3sk78fl65n55jll4mj8-valgrind-3.9.0/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
|
||||
by 0x40F0A8: free_interface (net.c:153)
|
||||
by 0x405443: handle_interface (dhcpcd.c:764) by 0x57E0F06: ??? (udev.c:97)
|
||||
by 0x42EB62: dev_handle_data (dev.c:153)
|
||||
by 0x408A74: eloop_start (eloop.c:399)
|
||||
by 0x4073B6: main (dhcpcd.c:1537)
|
||||
|
||||
So ignore interfaces that we already know about.
|
||||
|
||||
diff -ru -x '*~' dhcpcd-6.4.0-orig/dhcpcd.c dhcpcd-6.4.0/dhcpcd.c
|
||||
--- dhcpcd-6.4.0-orig/dhcpcd.c 2014-06-14 22:13:12.000000000 +0200
|
||||
+++ dhcpcd-6.4.0/dhcpcd.c 2014-07-03 11:13:39.133186533 +0200
|
||||
@@ -774,11 +774,11 @@
|
||||
} else {
|
||||
TAILQ_REMOVE(ifs, ifp, next);
|
||||
TAILQ_INSERT_TAIL(ctx->ifaces, ifp, next);
|
||||
- }
|
||||
- if (action == 1) {
|
||||
- if (action > 0) {
|
||||
- init_state(ifp, ctx->argc, ctx->argv);
|
||||
- start_interface(ifp);
|
||||
+ if (action == 1) {
|
||||
- run_preinit(ifp);
|
||||
- dhcpcd_startinterface(ifp);
|
||||
+ if (action > 0) {
|
||||
+ init_state(ifp, ctx->argc, ctx->argv);
|
||||
+ start_interface(ifp);
|
||||
+ run_preinit(ifp);
|
||||
+ dhcpcd_startinterface(ifp);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
/* Free our discovered list */
|
||||
while ((ifp = TAILQ_FIRST(ifs))) {
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
{ stdenv, fetchurl, pkgconfig, udev }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dhcpcd-6.3.2";
|
||||
name = "dhcpcd-6.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://roy.marples.name/downloads/dhcpcd/${name}.tar.bz2";
|
||||
sha256 = "1v2m5wdr6x5cz6i0n1y63am9dhj5j7ylrk717scjgwwjdbq1x75n";
|
||||
sha256 = "04whlqg1lik1c690kpgmw5hh6qzim64bw0l4fpr4vb8cj74aj4q4";
|
||||
};
|
||||
|
||||
patches = [ ./lxc_ro_promote_secondaries.patch ./reload.patch ./check-interface.patch ];
|
||||
patches = [ /* ./lxc_ro_promote_secondaries.patch */ ./reload.patch ./check-interface.patch ];
|
||||
|
||||
buildInputs = [ pkgconfig udev ];
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
Fix segfault when reloading the configuration: free_globals() left the
|
||||
ifac/ifdc variables at -1 instead of 0, causing a crash later in
|
||||
splitv().
|
||||
|
||||
--- a/dhcpcd.c
|
||||
+++ b/dhcpcd.c
|
||||
@@ -143,16 +143,18 @@
|
||||
|
Loading…
Reference in New Issue
Block a user