From 6dd50cd011de99fa6dd443b2992c15ec16e1421d Mon Sep 17 00:00:00 2001 From: Peter Hessler Date: Sat, 3 Sep 2016 22:24:44 +0000 Subject: only clear the error counter if we are successful, not if we get partially through processing --- sys/net/bfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/net/bfd.c') diff --git a/sys/net/bfd.c b/sys/net/bfd.c index cc5a5522daa..c334a393d2f 100644 --- a/sys/net/bfd.c +++ b/sys/net/bfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bfd.c,v 1.13 2016/09/03 21:01:42 phessler Exp $ */ +/* $OpenBSD: bfd.c,v 1.14 2016/09/03 22:24:43 phessler Exp $ */ /* * Copyright (c) 2016 Peter Hessler @@ -751,7 +751,6 @@ printf("%s: peer your discr 0x%x != local 0x%x\n", goto discard; sc->sc_peer->RemoteSessionState = state; - sc->error = 0; sc->sc_peer->RemoteMinRxInterval = ntohl(peer->bfd_required_min_rx_interval); /* Local change to the algorithm, we don't accept below 10ms */ @@ -817,6 +816,7 @@ printf("%s: set BFD_STATE_DOWN\n", __func__); sc->sc_peer->RemoteDemandMode = (flags & BFD_FLAG_D); } + sc->error = 0; discard: m_free(m); -- cgit v1.2.3