diff options
author | kn <kn@cvs.openbsd.org> | 2019-05-28 18:39:07 +0000 |
---|---|---|
committer | kn <kn@cvs.openbsd.org> | 2019-05-28 18:39:07 +0000 |
commit | 9e37c04110372b2a31c9fb3386d8b4b5240c9184 (patch) | |
tree | f48e758d46d5b392925cd0eb03b13c8773b60dc4 /sys/net | |
parent | 0c68ea8f338d1044dd0b39a1a0565982332683ed (diff) |
Fix reporting of up->down transition in routing message
The code for updating the laststate and timer is looking at laststate before
it's been updated.
From Mitchell Krome <mitchellkrome at gmail dot com>, thanks!
OK claudio
Diffstat (limited to 'sys/net')
-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 0d2ec8af512..15b2a970a74 100644 --- a/sys/net/bfd.c +++ b/sys/net/bfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bfd.c,v 1.75 2019/05/09 14:29:30 phessler Exp $ */ +/* $OpenBSD: bfd.c,v 1.76 2019/05/28 18:39:06 kn Exp $ */ /* * Copyright (c) 2016-2018 Peter Hessler <phessler@openbsd.org> @@ -927,7 +927,7 @@ bfd_set_state(struct bfd_config *bfd, unsigned int state) bfd->bc_laststate = bfd->bc_state; /* FALLTHROUGH */ case BFD_STATE_DOWN: - if (bfd->bc_laststate == BFD_STATE_UP) { + if (bfd->bc_state == BFD_STATE_UP) { bfd->bc_laststate = bfd->bc_state; bfd_set_uptime(bfd); } |