mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 11:50:14 +01:00
device/ndisc: skip link-local addresses from NDisc
(cherry picked from commit fa09e7eb53)
This commit is contained in:
parent
cb5a47a4db
commit
eca12c2ee1
3 changed files with 8 additions and 1 deletions
|
|
@ -11393,7 +11393,8 @@ queued_ip6_config_change (gpointer user_data)
|
|||
* ("Addressing Model"): "All interfaces are required to have at least
|
||||
* one link-local unicast address".
|
||||
*/
|
||||
if (priv->ip6_config && nm_ip6_config_get_num_addresses (priv->ip6_config))
|
||||
if ( priv->ip6_config
|
||||
&& nm_ip6_config_get_num_addresses (priv->ip6_config))
|
||||
need_ipv6ll = TRUE;
|
||||
|
||||
if (need_ipv6ll)
|
||||
|
|
|
|||
|
|
@ -195,6 +195,10 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
|
|||
continue;
|
||||
nm_utils_ip6_address_clear_host_address (&r_network, ndp_msg_opt_prefix (msg, offset), r_plen);
|
||||
|
||||
if ( IN6_IS_ADDR_UNSPECIFIED (&r_network)
|
||||
|| IN6_IS_ADDR_LINKLOCAL (&r_network))
|
||||
continue;
|
||||
|
||||
if (ndp_msg_opt_prefix_flag_on_link (msg, offset)) {
|
||||
NMNDiscRoute route = {
|
||||
.network = r_network,
|
||||
|
|
|
|||
|
|
@ -351,6 +351,8 @@ nm_ndisc_add_address (NMNDisc *ndisc, const NMNDiscAddress *new)
|
|||
|
||||
nm_assert (new);
|
||||
nm_assert (new->timestamp > 0 && new->timestamp < G_MAXINT32);
|
||||
nm_assert (!IN6_IS_ADDR_UNSPECIFIED (&new->address));
|
||||
nm_assert (!IN6_IS_ADDR_LINKLOCAL (&new->address));
|
||||
|
||||
for (i = 0; i < rdata->addresses->len; i++) {
|
||||
NMNDiscAddress *item = &g_array_index (rdata->addresses, NMNDiscAddress, i);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue