]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: Delay addition of IPv6 Proxy NDP addresses
authorKevin P. Fleming <kevin@km6g.us>
Sat, 6 Feb 2021 15:58:43 +0000 (10:58 -0500)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 9 Feb 2021 10:56:56 +0000 (19:56 +0900)
Setting of IPv6 Proxy NDP addresses must be done at the same
time as static addresses, static routes, and other link attributes
that must be configured when the link is up. Doing this ensures
that they are reconfigured on the link if the link goes down
and returns to service.

src/network/networkd-address.c
src/network/networkd-link.c

index 549f5f1f82ee0a31b07169c06fee3ea5013adb02..c1883208720b45c4a8e3de1dc07c39c8b283da11 100644 (file)
@@ -9,6 +9,7 @@
 #include "netlink-util.h"
 #include "networkd-address-pool.h"
 #include "networkd-address.h"
+#include "networkd-ipv6-proxy-ndp.h"
 #include "networkd-manager.h"
 #include "networkd-network.h"
 #include "parse-util.h"
@@ -911,6 +912,7 @@ int address_configure(
 static int static_address_ready_callback(Address *address) {
         Address *a;
         Link *link;
+        int r;
 
         assert(address);
         assert(address->link);
@@ -935,6 +937,10 @@ static int static_address_ready_callback(Address *address) {
 
         link->addresses_ready = true;
 
+        r = link_set_ipv6_proxy_ndp_addresses(link);
+        if (r < 0)
+                return r;
+
         return link_set_routes(link);
 }
 
@@ -1059,6 +1065,11 @@ int link_set_addresses(Link *link) {
         if (link->address_messages == 0) {
                 link->addresses_configured = true;
                 link->addresses_ready = true;
+
+                r = link_set_ipv6_proxy_ndp_addresses(link);
+                if (r < 0)
+                        return r;
+
                 r = link_set_routes(link);
                 if (r < 0)
                         return r;
index ccefb46cbc60974eeaf5b8790379cbbda9f14398..aacfc31c5296d444db315a6309ee508f6ebb1629 100644 (file)
@@ -29,7 +29,6 @@
 #include "networkd-dhcp6.h"
 #include "networkd-fdb.h"
 #include "networkd-ipv4ll.h"
-#include "networkd-ipv6-proxy-ndp.h"
 #include "networkd-link-bus.h"
 #include "networkd-link.h"
 #include "networkd-lldp-tx.h"
@@ -2036,10 +2035,6 @@ int link_configure(Link *link) {
         if (r < 0)
                 return r;
 
-        r = link_set_ipv6_proxy_ndp_addresses(link);
-        if (r < 0)
-                return r;
-
         r = link_set_mac(link);
         if (r < 0)
                 return r;