]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: drop fallback mechanism to assign DHCPv6 addresses with IFA_F_NOPREFIXROUTE
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 17 Jul 2019 00:40:06 +0000 (09:40 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 17 Jul 2019 14:13:40 +0000 (23:13 +0900)
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.

src/network/networkd-dhcp6.c
src/network/networkd-link.c
src/network/networkd-link.h

index 7905e09a4850d5bb6f79c0029d7f4d0db849bed8..0a011c5b38a1e9ec9e79f37c352fce4609862007 100644 (file)
@@ -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);
index a08ad80f15aa9ce652bf580e4897ba80fb85e1be..63f742209643bff5985265820a968e08efe60318 100644 (file)
@@ -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,
index e8680bbb1f6b1c6b4ad78b830b70885cad2b05f5..bfdcef0e50fa0e25f1c9d125da197b4f697c62ac 100644 (file)
@@ -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;