From c48ad644c0f2e84ba97820351293e9a02a6250bc Mon Sep 17 00:00:00 2001 From: Tore Anderson Date: Sun, 5 Oct 2014 20:27:07 +0200 Subject: [PATCH] Avoid a restart loop with NM dispatcher scripts Newer NetworkManager versions will run the dispatcher scripts when new unknown interfaces show up, including 'clat'. That will cause a clatd restart right after startup, and we'll never get to fully initialise. So ensure the dispatcher script does nothing if the device in question is our own 'clat' to prevent this. --- scripts/clatd.networkmanager | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/clatd.networkmanager b/scripts/clatd.networkmanager index 0be2e85..4187959 100644 --- a/scripts/clatd.networkmanager +++ b/scripts/clatd.networkmanager @@ -7,6 +7,13 @@ # Written by Tore Anderson # +# Newer NetworkManager versions will run the dispatcher scripts once +# a new unmanaged interface shows up, including the 'clat' interface +# created by clatd/TAYGA. So if we're being called due to our own +# interface showing up, do nothing, otherwise we will end up +# committing suicide from the restarts below +[ "$DEVICE_IFACE" = "clat" ] && exit 0 + # We simply restart clatd in all situations, as no matter if an interface # goes up or down, it may mean that the PLAT device changes, it may mean # native IPv4 appearing or disappearing, or it may mean that DNS64 became