summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_route.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2023-03-02 20:20:39 -0300
committerRenato Westphal <renato@opensourcerouting.org>2023-03-02 19:38:03 -0300
commit6861a5e4628bf8b480b15ec77cf6a43b5d3aae0d (patch)
tree9d4f6e88b06fa5ff8debcc7f18ccf3b26723f83b /ospf6d/ospf6_route.h
parent73d9d322fe22c9e357fcc801562ab118f23c1969 (diff)
ospf6d: handle redistributed routes without nexthop addresses
Do not assume that all redistributed routes have a nexthop address, otherwise blackhole nexthops can be misinterpreted as IPv6 addresses, leading to inconsistencies. Also, change the signature of a few functions to allow const nexthop addresses, such that in6addr_any can be used without type casts. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_route.h')
-rw-r--r--ospf6d/ospf6_route.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ospf6d/ospf6_route.h b/ospf6d/ospf6_route.h
index 2d4fcc930e..c2125951ec 100644
--- a/ospf6d/ospf6_route.h
+++ b/ospf6d/ospf6_route.h
@@ -312,7 +312,7 @@ extern int ospf6_num_nexthops(struct list *nh_list);
extern void ospf6_copy_nexthops(struct list *dst, struct list *src);
extern void ospf6_merge_nexthops(struct list *dst, struct list *src);
extern void ospf6_add_nexthop(struct list *nh_list, int ifindex,
- struct in6_addr *addr);
+ const struct in6_addr *addr);
extern void ospf6_add_route_nexthop_blackhole(struct ospf6_route *route);
extern int ospf6_num_nexthops(struct list *nh_list);
extern bool ospf6_route_cmp_nexthops(struct ospf6_route *a,