From: Patrik Flykt Date: Tue, 2 May 2017 19:36:24 +0000 (+0300) Subject: sd-ndisc: Reset counter for sent Router Solicitations (#5874) X-Git-Tag: v234~248 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7feeb8998040ce9358f5c1d805c03e59d72e1190;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/libsystemd-network/sd-ndisc.c b/src/libsystemd-network/sd-ndisc.c index 1d3be9b8623..83e57d43f73 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; }