diff options
Diffstat (limited to 'bfdd/bfd.c')
| -rw-r--r-- | bfdd/bfd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c index ff62cd356b..28b6beadcb 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -605,9 +605,16 @@ struct bfd_session *ptm_bfd_sess_new(struct bfd_peer_cfg *bpc) if (bpc->bpc_has_vxlan) BFD_SET_FLAG(bfd->flags, BFD_SESS_FLAG_VXLAN); - if (bpc->bpc_ipv4 == false) + if (bpc->bpc_ipv4 == false) { BFD_SET_FLAG(bfd->flags, BFD_SESS_FLAG_IPV6); + /* Set the IPv6 scope id for link-local addresses. */ + if (IN6_IS_ADDR_LINKLOCAL(&bpc->bpc_local.sa_sin6.sin6_addr)) + bpc->bpc_local.sa_sin6.sin6_scope_id = bfd->ifindex; + if (IN6_IS_ADDR_LINKLOCAL(&bpc->bpc_peer.sa_sin6.sin6_addr)) + bpc->bpc_peer.sa_sin6.sin6_scope_id = bfd->ifindex; + } + /* Initialize the session */ bfd->ses_state = PTM_BFD_DOWN; bfd->discrs.my_discr = ptm_bfd_gen_ID(); |
