Don't touch a path if we don't have to

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2018-04-25 20:54:33 +00:00
parent c8b07c6edb
commit d896f9ff3c

3
mud.c
View File

@@ -760,6 +760,9 @@ mud_set_state(struct mud *mud, struct sockaddr *addr, enum mud_state state)
if (!path) if (!path)
return -1; return -1;
if (path->state == state)
return 0;
path->state = state; path->state = state;
mud_update_mtu(mud); mud_update_mtu(mud);