summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-06-16 12:39:08 +0200
committerMaria Matejka <mq@ucw.cz>2022-06-16 12:39:08 +0200
commit54d94f4b1a5b9d8f2943236323d789290bb7bb2f (patch)
treef245ff5de196415b52caae6e006888b0157f6c0f /proto
parent4364ee9b6f3764c971ab111bf7dc87477fd7272c (diff)
Showing the nexthop resolution target in import tables
Diffstat (limited to 'proto')
-rw-r--r--proto/bgp/bgp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h
index b3966bc3..cca7873a 100644
--- a/proto/bgp/bgp.h
+++ b/proto/bgp/bgp.h
@@ -520,6 +520,9 @@ static inline int
rte_resolvable(const rte *rt)
{
eattr *nhea = ea_find(rt->attrs, &ea_gen_nexthop);
+ if (!nhea)
+ return 0;
+
struct nexthop_adata *nhad = (void *) nhea->u.ptr;
return NEXTHOP_IS_REACHABLE(nhad) || (nhad->dest != RTD_UNREACHABLE);
}