summaryrefslogtreecommitdiff
path: root/proto/bgp/attrs.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-05-30 16:20:35 +0200
committerMaria Matejka <mq@ucw.cz>2022-05-30 16:20:35 +0200
commitb3649ec77ee7101fe77845bb727cc8e8a7cd4b1c (patch)
treef43da6a92f03aa09cd78a9afa679a3ffb6248e3b /proto/bgp/attrs.c
parentba35b0f818cadc354aba3efe373f21939249c6ed (diff)
parentef6a903e6f44b467f9606018446095521ad01ef1 (diff)
Merge commit 'ef6a903e6f44b467f9606018446095521ad01ef1' into haugesund
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r--proto/bgp/attrs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index ed1bb12f..44c65e00 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -15,7 +15,7 @@
#include "nest/bird.h"
#include "nest/iface.h"
#include "nest/protocol.h"
-#include "nest/route.h"
+#include "nest/rt.h"
#include "nest/attrs.h"
#include "conf/conf.h"
#include "lib/resource.h"
@@ -2229,7 +2229,7 @@ bgp_rte_recalculate(rtable *table, net *net, rte *new, rte *old, rte *old_best)
/* The default case - find a new best-in-group route */
rte *r = new; /* new may not be in the list */
- for (struct rte_storage *s = net->routes; rte_is_valid(s); s = s->next)
+ for (struct rte_storage *s = net->routes; rte_is_valid(RTE_OR_NULL(s)); s = s->next)
if (use_deterministic_med(s) && same_group(&s->rte, lpref, lasn))
{
s->rte.pflags |= BGP_REF_SUPPRESSED;
@@ -2246,7 +2246,7 @@ bgp_rte_recalculate(rtable *table, net *net, rte *new, rte *old, rte *old_best)
new->pflags &= ~BGP_REF_SUPPRESSED;
/* Found all existing routes mergable with best-in-group */
- for (struct rte_storage *s = net->routes; rte_is_valid(s); s = s->next)
+ for (struct rte_storage *s = net->routes; rte_is_valid(RTE_OR_NULL(s)); s = s->next)
if (use_deterministic_med(s) && same_group(&s->rte, lpref, lasn))
if ((&s->rte != r) && bgp_rte_mergable(r, &s->rte))
s->rte.pflags &= ~BGP_REF_SUPPRESSED;