diff options
author | Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> | 2018-09-12 11:20:07 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-10-02 19:08:59 +0200 |
commit | 6b91b5a198091f59d26a8301cf3528b52dce5931 (patch) | |
tree | 8c446be5246006e9cd706e1b5866469abe42d498 | |
parent | c28ce81c02a76d8d36e3e5b3cffdb72c31949423 (diff) | |
download | slirp-6b91b5a198091f59d26a8301cf3528b52dce5931.zip slirp-6b91b5a198091f59d26a8301cf3528b52dce5931.tar.gz slirp-6b91b5a198091f59d26a8301cf3528b52dce5931.tar.bz2 |
slirp: fix ipv6 timers
ICMP implementation for IPv6 uses timers based on virtual clock.
This is incorrect because this service is not related to the guest state,
and its events should not be recorded and replayed.
This patch changes using virtual clock to the new virtual_ext clock.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Message-Id: <20180912082007.3228.91491.stgit@pasha-VirtualBox>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | ip6_icmp.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -17,7 +17,7 @@ static void ra_timer_handler(void *opaque) { Slirp *slirp = opaque; timer_mod(slirp->ra_timer, - qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + NDP_Interval); + qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_EXT) + NDP_Interval); ndp_send_ra(slirp); } @@ -27,9 +27,10 @@ void icmp6_init(Slirp *slirp) return; } - slirp->ra_timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, ra_timer_handler, slirp); + slirp->ra_timer = + timer_new_ms(QEMU_CLOCK_VIRTUAL_EXT, ra_timer_handler, slirp); timer_mod(slirp->ra_timer, - qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + NDP_Interval); + qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL_EXT) + NDP_Interval); } void icmp6_cleanup(Slirp *slirp) |