diff options
author | Peter Hessler <phessler@cvs.openbsd.org> | 2016-09-19 09:03:42 +0000 |
---|---|---|
committer | Peter Hessler <phessler@cvs.openbsd.org> | 2016-09-19 09:03:42 +0000 |
commit | ca0b13fc8399bb7a411a5ea61736ece4c4aae048 (patch) | |
tree | 1a9ecfb35718e1a81498c90347cbcea725076659 /sys/net/bfd.c | |
parent | 535e7d5bea4da475eada7484e8dd5dc244a6d950 (diff) |
send a nice diagnostic reason when we destroy all bfd interfaces (reboot)
Diffstat (limited to 'sys/net/bfd.c')
-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); } |