network: update state file after dhcp6 events
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 17 Jul 2019 14:12:07 +0000 (23:12 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 17 Jul 2019 14:15:15 +0000 (23:15 +0900)
E.g. DNS servers may be received from DHCPv6 server. If the link is
already in configured state, the DNS servers are not written in the
state file.

src/network/networkd-dhcp6.c

index 9d55276..d6262a3 100644 (file)
@@ -497,6 +497,7 @@ static void dhcp6_handler(sd_dhcp6_client *client, int event, void *userdata) {
                 (void) dhcp6_lease_pd_prefix_lost(client, link);
                 (void) dhcp6_prefix_remove_all(link->manager, link);
 
+                link_dirty(link);
                 link->dhcp6_configured = false;
                 break;
 
@@ -519,6 +520,7 @@ static void dhcp6_handler(sd_dhcp6_client *client, int event, void *userdata) {
                         return;
                 }
 
+                link_dirty(link);
                 link->dhcp6_configured = true;
                 break;