From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 13/29] dhcpcd.exe: Flush any configured IP addresses on shutdown Date: Thu, 01 Dec 2022 17:23:02 +0000 Message-ID: <20221201172318.3166615-13-michael.tremer@ipfire.org> In-Reply-To: <20221201172318.3166615-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2649214661302045303==" List-Id: --===============2649214661302045303== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This allows us to start with a fresh interface every time dhcpcd is being restarted. Signed-off-by: Michael Tremer --- src/initscripts/networking/dhcpcd.exe | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/initscripts/networking/dhcpcd.exe b/src/initscripts/networki= ng/dhcpcd.exe index be6d63708..f79d5d16d 100644 --- a/src/initscripts/networking/dhcpcd.exe +++ b/src/initscripts/networking/dhcpcd.exe @@ -84,6 +84,11 @@ dhcpcd_down() run_subdir ${rc_base}/init.d/networking/red.down/ fi fi + + # Remove any configured IP address from the device + ip addr flush dev "${interface}" &>/dev/null + + return 0 } =20 # Called when dhcpcd relies on a third party to configure an IP address --=20 2.30.2 --===============2649214661302045303==--