diff --git a/package.nix b/package.nix index cc65897..2d88ab2 100644 --- a/package.nix +++ b/package.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { fetchSubmodules = true; }; - patches = [ ./patches/ipb-profile-key.patch ./patches/tap-name-no-prefix.patch ./patches/prevent-dmesg-call.patch ./patches/simplify_l2tp_auth.patch ]; + patches = [ ./patches/ipb-profile-key.patch ./patches/tap-name-no-prefix.patch ./patches/prevent-dmesg-call.patch ./patches/simplify_l2tp_auth.patch ./patches/exit-client-on-disconnect.patch ]; nativeBuildInputs = with pkgs; [ cmake diff --git a/patches/exit-client-on-disconnect.patch b/patches/exit-client-on-disconnect.patch new file mode 100644 index 0000000..76cd3b0 --- /dev/null +++ b/patches/exit-client-on-disconnect.patch @@ -0,0 +1,16 @@ +--- a/src/Cedar/Session.c 2026-06-04 16:38:36.571857886 +0530 ++++ b/src/Cedar/Session.c 2026-06-04 16:38:36.581858026 +0530 +@@ -1789,6 +1789,13 @@ + + Debug("Session Halt.\n"); + ++ ++ // Exit process when a startup account exhausts retries. ++ // Lets systemd restart the service for a clean reconnect + DHCP. ++ if (s->Account != NULL && s->Account->StartupAccount) ++ { ++ _exit(1); ++ } + s->ClientStatus = CLIENT_STATUS_IDLE; + + // Regard as that the session is ended here