diff options
author | Peter Hessler <phessler@cvs.openbsd.org> | 2016-09-03 22:24:44 +0000 |
---|---|---|
committer | Peter Hessler <phessler@cvs.openbsd.org> | 2016-09-03 22:24:44 +0000 |
commit | 6dd50cd011de99fa6dd443b2992c15ec16e1421d (patch) | |
tree | 7e98d3a3ede497eae18345b9826e586c2a22460a /sys | |
parent | 58f7c366c2a2853fb8d3605375e138dd61f56bef (diff) |
only clear the error counter if we are successful, not if we get
partially through processing
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/bfd.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 <phessler@openbsd.org> @@ -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); |