]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: fix BFD IPv6 session address change
authorRenato Westphal <renato@opensourcerouting.org>
Thu, 28 Oct 2021 15:35:56 +0000 (12:35 -0300)
committermergify-bot <noreply@mergify.io>
Sat, 6 Nov 2021 15:09:25 +0000 (15:09 +0000)
Pass the correct family type and remove unneeded casts.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
(cherry picked from commit ae0945733333f60fccb0b4ac170ca3ee7351828b)

lib/bfd.c

index ea363b7ca4a3404faf1f52d07b16615424eb44ab..2ad75c052f24dce24cf91e7862d3da7b488a7f85 100644 (file)
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -578,8 +578,7 @@ void bfd_sess_set_ipv4_addrs(struct bfd_session_params *bsp,
 void bfd_sess_set_ipv6_addrs(struct bfd_session_params *bsp,
                             struct in6_addr *src, struct in6_addr *dst)
 {
-       if (!bfd_sess_address_changed(bsp, AF_INET, (struct in6_addr *)src,
-                                     (struct in6_addr *)dst))
+       if (!bfd_sess_address_changed(bsp, AF_INET6, src, dst))
                return;
 
        /* If already installed, remove the old setting. */