]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: DHCPv6 - export IAID to state file
authorSusant Sahani <ssahani@vmware.com>
Tue, 9 Jun 2020 08:49:08 +0000 (10:49 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 9 Jun 2020 10:58:31 +0000 (19:58 +0900)
src/network/networkd-link.c

index 20c5c1c4c8f821ce1bd1f313e6d0ad9e736d1bce..b27b13c194ff8644fb056b4ceb8607e767ef96db 100644 (file)
@@ -4086,8 +4086,9 @@ int link_save(Link *link) {
         const char *admin_state, *oper_state, *carrier_state, *address_state;
         _cleanup_free_ char *temp_path = NULL;
         _cleanup_fclose_ FILE *f = NULL;
-        Address *a;
+        uint32_t iaid;
         Route *route;
+        Address *a;
         Iterator i;
         int r;
 
@@ -4420,6 +4421,10 @@ int link_save(Link *link) {
                 }
         }
 
+        r = sd_dhcp6_client_get_iaid(link->dhcp6_client, &iaid);
+        if (r >= 0)
+                fprintf(f, "DHCP6_CLIENT_IAID=0x%x\n", iaid);
+
         r = fflush_and_check(f);
         if (r < 0)
                 goto fail;