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.
This commit is contained in:
Patrik Flykt
2017-05-02 15:36:24 -04:00
committed by Zbigniew Jędrzejewski-Szmek
parent f00ff0de40
commit 7feeb89980
+1
View File
@@ -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;
}