From c4ffdc48d64f0b884fb8f607942fc91bc59cb52b Mon Sep 17 00:00:00 2001 From: claudio Date: Wed, 29 Aug 2018 08:51:49 +0000 Subject: [PATCH] Adjust comment to make it clear that a NULL nexthop is actually eligable --- usr.sbin/bgpd/rde_decide.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bgpd/rde_decide.c b/usr.sbin/bgpd/rde_decide.c index a912cacf72f..04f09a1620d 100644 --- a/usr.sbin/bgpd/rde_decide.c +++ b/usr.sbin/bgpd/rde_decide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_decide.c,v 1.70 2018/08/06 08:06:49 claudio Exp $ */ +/* $OpenBSD: rde_decide.c,v 1.71 2018/08/29 08:51:49 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker @@ -137,7 +137,11 @@ prefix_cmp(struct prefix *p1, struct prefix *p2) if (asp2->flags & F_ATTR_LOOP) return (1); - /* 1. check if prefix is eligible a.k.a reachable */ + /* + * 1. check if prefix is eligible a.k.a reachable + * A NULL nexthop is eligible since it is used for locally + * announced networks. + */ if (prefix_nexthop(p2) != NULL && prefix_nexthop(p2)->state != NEXTHOP_REACH) return (1); -- 2.20.1