summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2017-05-02 22:36:24 +0300
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-05-02 15:36:24 -0400
commit7feeb8998040ce9358f5c1d805c03e59d72e1190 (patch)
treed5523321e83f784b412c678f01810e08a483b9f2
parentf00ff0de40030ed86e7d78c8c1f77b042b51d38c (diff)
sd-ndisc: Reset counter for sent Router Solicitations (#5874)
Reset also the counter for number of Router Solicitations sent when the associated file descriptor is closed and the event source unreferenced. With this change the router discovery can now be stopped and restarted arbitrary many times.
-rw-r--r--src/libsystemd-network/sd-ndisc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-ndisc.c b/src/libsystemd-network/sd-ndisc.c
index 1d3be9b862..83e57d43f7 100644
--- a/src/libsystemd-network/sd-ndisc.c
+++ b/src/libsystemd-network/sd-ndisc.c
@@ -131,6 +131,7 @@ static int ndisc_reset(sd_ndisc *nd) {
nd->timeout_event_source = sd_event_source_unref(nd->timeout_event_source);
nd->recv_event_source = sd_event_source_unref(nd->recv_event_source);
nd->fd = safe_close(nd->fd);
+ nd->nd_sent = 0;
return 0;
}