mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 04:36:45 +00:00
Merge pull request #3977 from opensourcerouting/bfd-small-fixes
bfdd: two small fixes
This commit is contained in:
commit
c3eb25c3fe
@ -1231,7 +1231,7 @@ void bs_to_bpc(struct bfd_session *bs, struct bfd_peer_cfg *bpc)
|
||||
|
||||
if (memcmp(&bs->key.local, &zero_addr, sizeof(bs->key.local))) {
|
||||
bpc->bpc_local.sa_sin.sin_family = AF_INET6;
|
||||
memcpy(&bpc->bpc_local.sa_sin.sin_addr, &bs->key.peer,
|
||||
memcpy(&bpc->bpc_local.sa_sin.sin_addr, &bs->key.local,
|
||||
sizeof(bpc->bpc_local.sa_sin.sin_addr));
|
||||
}
|
||||
break;
|
||||
@ -1242,7 +1242,7 @@ void bs_to_bpc(struct bfd_session *bs, struct bfd_peer_cfg *bpc)
|
||||
sizeof(bpc->bpc_peer.sa_sin6.sin6_addr));
|
||||
|
||||
bpc->bpc_local.sa_sin6.sin6_family = AF_INET6;
|
||||
memcpy(&bpc->bpc_local.sa_sin6.sin6_addr, &bs->key.peer,
|
||||
memcpy(&bpc->bpc_local.sa_sin6.sin6_addr, &bs->key.local,
|
||||
sizeof(bpc->bpc_local.sa_sin6.sin6_addr));
|
||||
break;
|
||||
}
|
||||
|
@ -141,6 +141,7 @@ void ptm_bfd_echo_snd(struct bfd_session *bfd)
|
||||
if (BFD_CHECK_FLAG(bfd->flags, BFD_SESS_FLAG_IPV6)) {
|
||||
sd = bglobal.bg_echov6;
|
||||
memset(&sin6, 0, sizeof(sin6));
|
||||
sin6.sin6_family = AF_INET6;
|
||||
memcpy(&sin6.sin6_addr, &bfd->key.peer, sizeof(sin6.sin6_addr));
|
||||
if (bfd->ifp && IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr))
|
||||
sin6.sin6_scope_id = bfd->ifp->ifindex;
|
||||
@ -155,6 +156,7 @@ void ptm_bfd_echo_snd(struct bfd_session *bfd)
|
||||
} else {
|
||||
sd = bglobal.bg_echo;
|
||||
memset(&sin6, 0, sizeof(sin6));
|
||||
sin.sin_family = AF_INET;
|
||||
memcpy(&sin.sin_addr, &bfd->key.peer, sizeof(sin.sin_addr));
|
||||
sin.sin_port = htons(BFD_DEF_ECHO_PORT);
|
||||
#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
|
||||
|
Loading…
Reference in New Issue
Block a user