diff options
Diffstat (limited to 'pkgs/tools/networking/dhcpcd')
-rw-r--r-- | pkgs/tools/networking/dhcpcd/check-interface.patch | 24 | ||||
-rw-r--r-- | pkgs/tools/networking/dhcpcd/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/networking/dhcpcd/reload.patch | 22 |
3 files changed, 47 insertions, 1 deletions
diff --git a/pkgs/tools/networking/dhcpcd/check-interface.patch b/pkgs/tools/networking/dhcpcd/check-interface.patch new file mode 100644 index 0000000000000..2b732b740ad40 --- /dev/null +++ b/pkgs/tools/networking/dhcpcd/check-interface.patch @@ -0,0 +1,24 @@ +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))) { + diff --git a/pkgs/tools/networking/dhcpcd/default.nix b/pkgs/tools/networking/dhcpcd/default.nix index d247dbe38aa68..40f6538750f19 100644 --- a/pkgs/tools/networking/dhcpcd/default.nix +++ b/pkgs/tools/networking/dhcpcd/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1v2m5wdr6x5cz6i0n1y63am9dhj5j7ylrk717scjgwwjdbq1x75n"; }; - patches = [ ./lxc_ro_promote_secondaries.patch ]; + patches = [ ./lxc_ro_promote_secondaries.patch ./reload.patch ./check-interface.patch ]; buildInputs = [ pkgconfig udev ]; diff --git a/pkgs/tools/networking/dhcpcd/reload.patch b/pkgs/tools/networking/dhcpcd/reload.patch new file mode 100644 index 0000000000000..0ecb75a447609 --- /dev/null +++ b/pkgs/tools/networking/dhcpcd/reload.patch @@ -0,0 +1,22 @@ +--- a/dhcpcd.c ++++ b/dhcpcd.c +@@ -143,16 +143,18 @@ + if (ctx->ifac) { + for (ctx->ifac--; ctx->ifac >= 0; ctx->ifac--) + free(ctx->ifav[ctx->ifac]); + free(ctx->ifav); + ctx->ifav = NULL; ++ ctx->ifac = 0; + } + if (ctx->ifdc) { + for (ctx->ifdc--; ctx->ifdc >= 0; ctx->ifdc--) + free(ctx->ifdv[ctx->ifdc]); + free(ctx->ifdv); + ctx->ifdv = NULL; ++ ctx->ifdc = 0; + } + + #ifdef INET + if (ctx->dhcp_opts) { + for (opt = ctx->dhcp_opts; + |