From ae0945733333f60fccb0b4ac170ca3ee7351828b Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Thu, 28 Oct 2021 12:35:56 -0300 Subject: [PATCH] lib: fix BFD IPv6 session address change Pass the correct family type and remove unneeded casts. Signed-off-by: Renato Westphal --- lib/bfd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/bfd.c b/lib/bfd.c index 70cbe0f2a6..cad0916d7d 100644 --- 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. */