net: if: Mark IPv6 address valid for point2point links

As DAD is not done for point-to-point links, we can mark them
valid immediately. If this is not done, then the address will
never be picked as a source address to a sent packet.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2021-02-28 18:22:47 +02:00 committed by Anas Nashif
commit 5c4bcf110d

View file

@ -1680,6 +1680,11 @@ struct net_if_addr *net_if_ipv6_addr_add(struct net_if *iface,
&ipv6->unicast[i].address.in6_addr);
net_if_ipv6_start_dad(iface, &ipv6->unicast[i]);
} else {
/* If DAD is not done for point-to-point links, then
* the address is usable immediately.
*/
ipv6->unicast[i].addr_state = NET_ADDR_PREFERRED;
}
net_mgmt_event_notify_with_info(