Page MenuHomeFreeBSD

ip6+carp: revise the generation of ND6 NA
ClosedPublic

Authored by ae on Wed, Oct 1, 12:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 2, 8:36 AM
Unknown Object (File)
Wed, Oct 1, 6:41 PM
Unknown Object (File)
Wed, Oct 1, 4:47 PM
Unknown Object (File)
Wed, Oct 1, 2:58 PM
Unknown Object (File)
Wed, Oct 1, 2:39 PM
Unknown Object (File)
Wed, Oct 1, 2:30 PM

Details

Summary
  • 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:
kernel: carp: 83@vlan524: BACKUP -> MASTER (master will time out)
kernel: nd6_na_output: source can't be determined: dst=ff02::1, error=51
  • 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 call carp_macmatch6() if target address is CARP master and ND6 NA packet will have correct mac address.
  • move blocks of code where multicast options is initialized and use it when destination address is multicast. Thus we can set M_MCAST flag and prepare ip6_moptions for correct IPv6 source address selection.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ae held this revision as a draft.
ae published this revision for review.Wed, Oct 1, 12:26 PM
ae edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Thu, Oct 2, 8:35 AM
This revision was automatically updated to reflect the committed changes.