From d896f9ff3c9e49e20f1b521c7f07f177fdb24ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Wed, 25 Apr 2018 20:54:33 +0000 Subject: [PATCH] Don't touch a path if we don't have to MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- mud.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mud.c b/mud.c index b1e0573..fe16761 100644 --- a/mud.c +++ b/mud.c @@ -760,6 +760,9 @@ mud_set_state(struct mud *mud, struct sockaddr *addr, enum mud_state state) if (!path) return -1; + if (path->state == state) + return 0; + path->state = state; mud_update_mtu(mud);