diff options
author | Peter Hessler <phessler@cvs.openbsd.org> | 2017-01-19 08:55:47 +0000 |
---|---|---|
committer | Peter Hessler <phessler@cvs.openbsd.org> | 2017-01-19 08:55:47 +0000 |
commit | ae72b3f169967e5f94671c60da1e40ccdc9713c8 (patch) | |
tree | 91421db3c4d36a1d36baa46cf0c5e5fe61475ce4 /sys/net | |
parent | b8219b9b39d12e2f8334bc38bfe48b6e1227ae56 (diff) |
when deconfiguring a BFD session, clear both the RTF_BFD flag on the
route, and the pointer to the route bfd uses
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/bfd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/bfd.c b/sys/net/bfd.c index 0145e09ecc1..6eca6377a05 100644 --- a/sys/net/bfd.c +++ b/sys/net/bfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bfd.c,v 1.42 2017/01/12 16:14:42 mpi Exp $ */ +/* $OpenBSD: bfd.c,v 1.43 2017/01/19 08:55:46 phessler Exp $ */ /* * Copyright (c) 2016 Peter Hessler <phessler@openbsd.org> @@ -234,6 +234,7 @@ bfdclear(struct rtentry *rt) if (rtisvalid(bfd->bc_rt)) bfd_senddown(bfd); + rt->rt_flags &= ~RTF_BFD; if (bfd->bc_so) { /* remove upcall before calling soclose or it will be called */ bfd->bc_so->so_upcall = NULL; @@ -247,6 +248,7 @@ bfdclear(struct rtentry *rt) soclose(bfd->bc_sosend); rtfree(bfd->bc_rt); + bfd->bc_rt = NULL; pool_put(&bfd_pool_time, bfd->bc_time); pool_put(&bfd_pool_neigh, bfd->bc_neighbor); |