HomeFreeBSD

Do not perform DAD on stf(4) interfaces.

Description

Do not perform DAD on stf(4) interfaces.

stf(4) interfaces are not multicast-capable so they can't perform DAD.
They also did not set IFF_DRV_RUNNING when an address was assigned, so
the logic in nd6_timer() would periodically flag such an address as
tentative, resulting in interface flapping.

Fix the problem by setting IFF_DRV_RUNNING when an address is assigned,
and do some related cleanup:

  • In in6if_do_dad(), remove a redundant check for !UP || !RUNNING. There is only one caller in the tree, and it only looks at whether the return value is non-zero.
  • Have in6if_do_dad() return false if the interface is not multicast-capable.
  • Set ND6_IFF_NO_DAD when an address is assigned to an stf(4) interface and the interface goes UP as a result. Note that this is not sufficient to fix the problem because the new address is marked as tentative and DAD is started before in6_ifattach() is called. However, setting no_dad is formally correct.
  • Change nd6_timer() to not flag addresses as tentative if no_dad is set.

This is based on a patch from Viktor Dukhovni.

Reported by: Viktor Dukhovni <ietf-dane@dukhovni.org>
Reviewed by: ae
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19751

Details

Provenance
markjAuthored on
Reviewer
ae
Differential Revision
D19751: Do not perform DAD on stf(4) interfaces.
Parents
rS345738: MFC r345596:
Branches
Unknown
Tags
Unknown