mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
2d8c0d24f2
This fixes several problems in the dhcpcd service: * A segfault during startup, due to a race with udev (dhcpcd would get an ADD event from udev, causing it to re-add an interface that it already had, leading to a segfault later on). * A hang/segfault processing "dhcpcd rebind" (which NixOS calls after waking up from suspend). Also, add "lo" to the list of ignored interfaces. It usually ignores "lo", but apparently not when it gets an ADD event from udev.
25 lines
582 B
Diff
25 lines
582 B
Diff
Index: dhcpcd.c
|
|
==================================================================
|
|
--- a/dhcpcd.c
|
|
+++ b/dhcpcd.c
|
|
@@ -747,14 +747,14 @@
|
|
if (ifp->hwlen != 0)
|
|
memcpy(ifl->hwaddr, ifp->hwaddr, ifl->hwlen);
|
|
} else {
|
|
TAILQ_REMOVE(ifs, ifp, next);
|
|
TAILQ_INSERT_TAIL(ctx->ifaces, ifp, next);
|
|
- }
|
|
- if (action == 1) {
|
|
- init_state(ifp, ctx->argc, ctx->argv);
|
|
- start_interface(ifp);
|
|
+ if (action == 1) {
|
|
+ init_state(ifp, ctx->argc, ctx->argv);
|
|
+ start_interface(ifp);
|
|
+ }
|
|
}
|
|
}
|
|
|
|
/* Free our discovered list */
|
|
while ((ifp = TAILQ_FIRST(ifs))) {
|
|
|