From db69159e214c6e980d70e0a7e2d50b0b190ba345 Mon Sep 17 00:00:00 2001 From: Peter Hessler Date: Thu, 9 May 2019 14:29:31 +0000 Subject: we don't need to check rtisvalid() in these places, the functions we are protecing will do the right thing OK claudio@ --- sys/net/bfd.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'sys/net') diff --git a/sys/net/bfd.c b/sys/net/bfd.c index 41572ba49c7..0d2ec8af512 100644 --- a/sys/net/bfd.c +++ b/sys/net/bfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bfd.c,v 1.74 2019/01/20 22:52:23 phessler Exp $ */ +/* $OpenBSD: bfd.c,v 1.75 2019/05/09 14:29:30 phessler Exp $ */ /* * Copyright (c) 2016-2018 Peter Hessler @@ -243,8 +243,7 @@ bfd_clear_task(void *arg) TAILQ_REMOVE(&bfd_queue, bfd, bc_entry); /* inform our neighbor */ - if (rtisvalid(bfd->bc_rt)) - bfd_senddown(bfd); + bfd_senddown(bfd); rt->rt_flags &= ~RTF_BFD; if (bfd->bc_so) { @@ -1004,13 +1003,6 @@ bfd_send_control(void *x) int bfd_send(struct bfd_config *bfd, struct mbuf *m) { - struct rtentry *rt = bfd->bc_rt; - - if (!rtisvalid(rt)) { - m_freem(m); - return (EHOSTDOWN); - } - return(sosend(bfd->bc_sosend, NULL, NULL, m, NULL, MSG_DONTWAIT)); } -- cgit v1.2.3