From e613f9f5cfbf1e6569617f34de89fa9ff68ebbab Mon Sep 17 00:00:00 2001 From: benno Date: Sun, 9 Sep 2018 15:02:26 +0000 Subject: [PATCH] use rib_valid() to check if a rib is useable. ok claudio@ --- usr.sbin/bgpd/rde.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 72e55237f71..266481dccf1 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.421 2018/09/09 12:33:51 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.422 2018/09/09 15:02:26 benno Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -2931,7 +2931,7 @@ rde_reload_runner(void) u_int16_t rid; for (rid = 0; rid < rib_size; rid++) { - if (*ribs[rid].name == '\0') + if (!rib_valid(rid)) continue; if (ribs[rid].dumping) rib_dump_r(&ribs[rid].ribctx); @@ -2951,7 +2951,7 @@ rde_softreconfig_in_done(void *arg) /* now do the Adj-RIB-Out sync */ for (rid = 0; rid < rib_size; rid++) { - if (*ribs[rid].name == '\0') + if (!rib_valid(rid)) continue; ribs[rid].state = RECONF_NONE; } @@ -2965,7 +2965,7 @@ rde_softreconfig_in_done(void *arg) } for (rid = 0; rid < rib_size; rid++) { - if (*ribs[rid].name == '\0') + if (!rib_valid(rid)) continue; if (ribs[rid].state == RECONF_RELOAD) { struct rib_context *ctx; -- 2.20.1