From: Yu Watanabe Date: Wed, 17 Jul 2019 00:40:06 +0000 (+0900) Subject: network: drop fallback mechanism to assign DHCPv6 addresses with IFA_F_NOPREFIXROUTE X-Git-Tag: v243-rc1~94^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8107f4731e43b5571a40aa5df881dd8b5f0d3fe6;p=thirdparty%2Fsystemd.git network: drop fallback mechanism to assign DHCPv6 addresses with IFA_F_NOPREFIXROUTE The flag IFA_F_NOPREFIXROUTE was introduced in kernel-3.14. But even if the kernel does not support the flag, it should be just ignored. So, it is not necessary to do the fallback logic. Moreover, the current logic is not a fallback mechanism but just retrying. So, it should not work. Let's drop that. --- diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c index 7905e09a485..0a011c5b38a 100644 --- a/src/network/networkd-dhcp6.c +++ b/src/network/networkd-dhcp6.c @@ -405,21 +405,10 @@ static int dhcp6_address_handler(sd_netlink *rtnl, sd_netlink_message *m, Link * r = sd_netlink_message_get_errno(m); if (r < 0 && r != -EEXIST) { - if (link->rtnl_extended_attrs) { - log_link_warning(link, "Could not set extended netlink attributes, reverting to fallback mechanism"); - - link->rtnl_extended_attrs = false; - dhcp6_lease_address_acquired(link->dhcp6_client, link); - - return 1; - } - log_link_error_errno(link, r, "Could not set DHCPv6 address: %m"); - link_enter_failed(link); return 1; - } - if (r >= 0) + } else if (r >= 0) (void) manager_rtnl_process_address(rtnl, m, link->manager); r = link_request_set_routes(link); diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index a08ad80f15a..63f74220964 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -605,7 +605,6 @@ static int link_new(Manager *manager, sd_netlink_message *message, Link **ret) { .n_ref = 1, .manager = manager, .state = LINK_STATE_PENDING, - .rtnl_extended_attrs = true, .ifindex = ifindex, .iftype = iftype, .sysctl_ipv6_enabled = -1, diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h index e8680bbb1f6..bfdcef0e50f 100644 --- a/src/network/networkd-link.h +++ b/src/network/networkd-link.h @@ -113,7 +113,6 @@ typedef struct Link { sd_radv *radv; sd_dhcp6_client *dhcp6_client; - bool rtnl_extended_attrs; /* This is about LLDP reception */ sd_lldp *lldp;