From 7e13811493ca326296c13b691a7eb0cdce8492f7 Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 18 Jul 2022 13:56:41 +0000 Subject: [PATCH] Remove warning messages that add nothing in the situation they occure. If the RDE dies this is logged before but the error messages from imsg_rde() may be called a couple of times before the SE has a chance to exit. OK tb@ --- usr.sbin/bgpd/session.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 093f943c320..d07bb3a4ece 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.430 2022/06/27 13:26:51 claudio Exp $ */ +/* $OpenBSD: session.c,v 1.431 2022/07/18 13:56:41 claudio Exp $ */ /* * Copyright (c) 2003, 2004, 2005 Henning Brauer @@ -3506,11 +3506,9 @@ imsg_ctl_parent(int type, uint32_t peerid, pid_t pid, void *data, int imsg_ctl_rde(int type, pid_t pid, void *data, uint16_t datalen) { - if (ibuf_rde_ctl == NULL) { - log_warnx("Can't send message %u to RDE, ctl pipe closed", - type); + if (ibuf_rde_ctl == NULL) return (0); - } + /* * Use control socket to talk to RDE to bypass the queue of the * regular imsg socket. @@ -3521,10 +3519,8 @@ imsg_ctl_rde(int type, pid_t pid, void *data, uint16_t datalen) int imsg_rde(int type, uint32_t peerid, void *data, uint16_t datalen) { - if (ibuf_rde == NULL) { - log_warnx("Can't send message %u to RDE, pipe closed", type); + if (ibuf_rde == NULL) return (0); - } return (imsg_compose(ibuf_rde, type, peerid, 0, -1, data, datalen)); } -- 2.20.1