diff options
author | 2017-01-24 03:53:32 +0000 | |
---|---|---|
committer | 2017-01-24 03:53:32 +0000 | |
commit | ef23b3c9fadf8dd499aebb3fb3623c1e7f67ad86 (patch) | |
tree | 3e426e22be2c4c392470c15d7d4dc2ddc2da7484 | |
parent | Fix typo in brainpool curve name within a comment. (diff) | |
download | wireguard-openbsd-ef23b3c9fadf8dd499aebb3fb3623c1e7f67ad86.tar.xz wireguard-openbsd-ef23b3c9fadf8dd499aebb3fb3623c1e7f67ad86.zip |
only send the rt msg on timeout failure if bfd is not down
-rw-r--r-- | sys/net/bfd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/net/bfd.c b/sys/net/bfd.c index e3b9161b030..9704892823b 100644 --- a/sys/net/bfd.c +++ b/sys/net/bfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bfd.c,v 1.56 2017/01/24 02:52:36 phessler Exp $ */ +/* $OpenBSD: bfd.c,v 1.57 2017/01/24 03:53:32 phessler Exp $ */ /* * Copyright (c) 2016 Peter Hessler <phessler@openbsd.org> @@ -649,8 +649,10 @@ bfd_timeout_rx(void *v) { struct bfd_config *bfd = v; - bfd_error(bfd); - rt_bfdmsg(bfd); + if (bfd->bc_state > BFD_STATE_DOWN) { + bfd_error(bfd); + rt_bfdmsg(bfd); + } timeout_add_usec(&bfd->bc_timo_rx, bfd->bc_minrx); } |