]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: rename linux_configure_after_setting_mtu() to linux_configure_continue()
authorDan Streetman <ddstreet@canonical.com>
Thu, 19 Dec 2019 18:14:42 +0000 (13:14 -0500)
committerDan Streetman <ddstreet@canonical.com>
Thu, 9 Jan 2020 20:19:08 +0000 (15:19 -0500)
This is a simple rename to make the function name more generic;
the next commit expands its usage to more than only the mtu handler.

src/network/networkd-link.c

index f353833e0de25ea969408a1182ae67673edb0395..732fd91e3cbe7f765e88253c22339db8c4e1310b 100644 (file)
@@ -1308,7 +1308,7 @@ static int link_set_proxy_arp(Link *link) {
         return 0;
 }
 
-static int link_configure_after_setting_mtu(Link *link);
+static int link_configure_continue(Link *link);
 
 static int set_mtu_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
         int r;
@@ -1329,7 +1329,7 @@ static int set_mtu_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link)
                 log_link_debug(link, "Setting MTU done.");
 
         if (link->state == LINK_STATE_INITIALIZED) {
-                r = link_configure_after_setting_mtu(link);
+                r = link_configure_continue(link);
                 if (r < 0)
                         link_enter_failed(link);
         }
@@ -2785,10 +2785,22 @@ static int link_configure(Link *link) {
         if (r < 0)
                 return r;
 
-        return link_configure_after_setting_mtu(link);
+        return link_configure_continue(link);
 }
 
-static int link_configure_after_setting_mtu(Link *link) {
+/* The configuration continues in this separate function, instead of
+ * including this in the above link_configure() function, for two
+ * reasons:
+ * 1) some devices reset the link when the mtu is set, which caused
+ *    an infinite loop here in networkd; see:
+ *    https://github.com/systemd/systemd/issues/6593
+ *    https://github.com/systemd/systemd/issues/9831
+ * 2) if ipv6ll is disabled, then bringing the interface up must be
+ *    delayed until after we get confirmation from the kernel that
+ *    the addr_gen_mode parameter has been set (via netlink), see:
+ *    https://github.com/systemd/systemd/issues/13882
+ */
+static int link_configure_continue(Link *link) {
         int r;
 
         assert(link);