HomeFreeBSD

carp6: revise the generation of ND6 NA

Description

carp6: revise the generation of ND6 NA

  • use ND_NA_FLAG_ROUTER flag in carp_send_na() when we work as router.
  • use in6addr_any as destination address for nd6_na_output(), then it will use ipv6-all-nodes multicast address.
  • add in6_selectsrc_nbr() function that accepts additional argument ip6_moptions. Use this function from ND6 code to avoid cases when nd6_na_output/nd6_ns_output can not find source address for multicast destinations.
  • add some comments from RFC2461 for better understanding.
  • use tlladdr argument as flags and use ND6_NA_OPT_LLA when we need to add target link-layer address option, and ND6_NA_CARP_MASTER when we know that target address is CARP master. Then we can prepare correct CARP's mac address if target address is CARP master.
  • move blocks of code where multicast options is initialized and use it when destination address is multicast.

Reviewed by: kp
Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D52825

Details

Provenance
aeAuthored on Fri, Oct 3, 7:57 AM
Reviewer
kp
Differential Revision
D52825: ip6+carp: revise the generation of ND6 NA
Parents
rG08b497dc6c4d: vmimage.subr: Support NO_ROOT pkgbase
Branches
Unknown
Tags
Unknown