diff options
author | 2016-09-19 09:03:41 +0000 | |
---|---|---|
committer | 2016-09-19 09:03:41 +0000 | |
commit | 746993aebf28f7ee6b8c39a50f26d6da75ef6a08 (patch) | |
tree | b41cd432ba1245d87284477c1719ed18d975367f | |
parent | remove a bunch of noisy implementation-helper printfs (diff) | |
download | wireguard-openbsd-746993aebf28f7ee6b8c39a50f26d6da75ef6a08.tar.xz wireguard-openbsd-746993aebf28f7ee6b8c39a50f26d6da75ef6a08.zip |
send a nice diagnostic reason when we destroy all bfd interfaces (reboot)
-rw-r--r-- | sys/net/bfd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/bfd.c b/sys/net/bfd.c index dc768eb80a4..5d55c5f4690 100644 --- a/sys/net/bfd.c +++ b/sys/net/bfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bfd.c,v 1.30 2016/09/19 07:58:57 phessler Exp $ */ +/* $OpenBSD: bfd.c,v 1.31 2016/09/19 09:03:41 phessler Exp $ */ /* * Copyright (c) 2016 Peter Hessler <phessler@openbsd.org> @@ -227,7 +227,7 @@ bfdclear(struct rtentry *rt) TAILQ_REMOVE(&bfd_queue, bfd, bc_entry); - /* send suicide packets immediately */ + /* inform our neighbor */ if (rtisvalid(bfd->bc_rt)) bfd_senddown(bfd); @@ -279,8 +279,9 @@ bfddestroy(void) { struct bfd_config *bfd; - /* send suicide packets immediately */ + /* inform our neighbor we are rebooting */ while ((bfd = TAILQ_FIRST(&bfd_queue))) { + bfd->bc_neighbor->bn_ldiag = BFD_DIAG_FIB_DOWN; bfdclear(bfd->bc_rt); } |