timeout_del() the timer while stopping an interface so that no timeout
authorkevlo <kevlo@openbsd.org>
Tue, 5 Dec 2023 13:43:39 +0000 (13:43 +0000)
committerkevlo <kevlo@openbsd.org>
Tue, 5 Dec 2023 13:43:39 +0000 (13:43 +0000)
is fired afterwards.

ok claudio@

sys/dev/pci/if_vr.c

index babef2d..79e7529 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_vr.c,v 1.159 2022/03/11 18:00:50 mpi Exp $ */
+/*     $OpenBSD: if_vr.c,v 1.160 2023/12/05 13:43:39 kevlo Exp $       */
 
 /*
  * Copyright (c) 1997, 1998
@@ -1603,6 +1603,7 @@ vr_stop(struct vr_softc *sc)
        ifp->if_timer = 0;
 
        timeout_del(&sc->sc_to);
+       timeout_del(&sc->sc_rxto);
 
        ifp->if_flags &= ~IFF_RUNNING;
        ifq_clr_oactive(&ifp->if_snd);