]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-ndisc: Reset counter for sent Router Solicitations (#5874)
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Tue, 2 May 2017 19:36:24 +0000 (22:36 +0300)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 2 May 2017 19:36:24 +0000 (15:36 -0400)
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.

src/libsystemd-network/sd-ndisc.c

index 1d3be9b86239ca61227068a8b62e932175142d78..83e57d43f734b390aee1d54863452985916901f6 100644 (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;
 }