From e0f22fde1b5243acefa7e16db83bf6feb3d8039e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 30 Nov 2025 17:22:35 +0100 Subject: ... --- hosts/vidhar/network/pppoe.nix | 2 +- overlays/pppd/default.nix | 8 ++++++++ overlays/pppd/no-double-timeout.patch | 13 +++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 overlays/pppd/default.nix create mode 100644 overlays/pppd/no-double-timeout.patch diff --git a/hosts/vidhar/network/pppoe.nix b/hosts/vidhar/network/pppoe.nix index a891e269..d95922aa 100644 --- a/hosts/vidhar/network/pppoe.nix +++ b/hosts/vidhar/network/pppoe.nix @@ -3,7 +3,7 @@ with lib; let - pppInterface = config.networking.pppInterface; + inherit (config.networking) pppInterface; in { options = { networking.pppInterface = mkOption { diff --git a/overlays/pppd/default.nix b/overlays/pppd/default.nix new file mode 100644 index 00000000..3c84af4c --- /dev/null +++ b/overlays/pppd/default.nix @@ -0,0 +1,8 @@ +{ final, prev, ... }: +{ + pppd = prev.pppd.overrideAttrs (oldAttrs: { + patches = (oldAttrs.patches or []) ++ [ + ./no-double-timeout.patch + ]; + }); +} diff --git a/overlays/pppd/no-double-timeout.patch b/overlays/pppd/no-double-timeout.patch new file mode 100644 index 00000000..53f41ae1 --- /dev/null +++ b/overlays/pppd/no-double-timeout.patch @@ -0,0 +1,13 @@ +diff --git i/pppd/plugins/pppoe/discovery.c w/pppd/plugins/pppoe/discovery.c +index 86bda61..8060558 100644 +--- i/pppd/plugins/pppoe/discovery.c ++++ w/pppd/plugins/pppoe/discovery.c +@@ -686,7 +686,7 @@ discovery1(PPPoEConnection *conn, int waitWholeTimeoutForPADO) + conn->discoveryState = STATE_SENT_PADI; + waitForPADO(conn, timeout, waitWholeTimeoutForPADO); + +- timeout *= 2; ++ // timeout *= 2; + } while (conn->discoveryState == STATE_SENT_PADI); + } + -- cgit v1.2.3