diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2023-03-02 20:20:39 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2023-03-02 19:38:03 -0300 |
| commit | 6861a5e4628bf8b480b15ec77cf6a43b5d3aae0d (patch) | |
| tree | 9d4f6e88b06fa5ff8debcc7f18ccf3b26723f83b /ospf6d/ospf6_route.c | |
| parent | 73d9d322fe22c9e357fcc801562ab118f23c1969 (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.c')
| -rw-r--r-- | ospf6d/ospf6_route.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 72dfa240af..443032933d 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -267,7 +267,8 @@ int ospf6_num_nexthops(struct list *nh_list) return (listcount(nh_list)); } -void ospf6_add_nexthop(struct list *nh_list, int ifindex, struct in6_addr *addr) +void ospf6_add_nexthop(struct list *nh_list, int ifindex, + const struct in6_addr *addr) { struct ospf6_nexthop *nh; struct ospf6_nexthop nh_match; |
