File 0001-nm-dispatcher-only-act-on-iface-up-down-events.patch of Package clatd
From fb4587bfd6d0f6e034d1421a70639cc97a11307b Mon Sep 17 00:00:00 2001
From: Tore Anderson <tore@fud.no>
Date: Mon, 28 Mar 2016 08:26:20 +0200
Subject: [PATCH 1/2] nm-dispatcher: only act on iface up/down events
Ensure other events (like hostname changes, DHCP lease renewals, etc.)
are ignored as they are very unlikely to be relevant for clatd.
---
scripts/clatd.networkmanager | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/clatd.networkmanager b/scripts/clatd.networkmanager
index 4187959..8a815ba 100644
--- a/scripts/clatd.networkmanager
+++ b/scripts/clatd.networkmanager
@@ -14,6 +14,11 @@
# committing suicide from the restarts below
[ "$DEVICE_IFACE" = "clat" ] && exit 0
+# We're only acting on interface "up" or "down" events. NM will run the
+# dispatcher scripts for other events we're not interested in, like the
+# hostname being set or a DHCP lease being renewed. Ignore those.
+[ "$2" != "up" ] && [ "$2" != "down" ] && 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
--
2.16.4