summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2020-06-09 21:18:28 +0200
committerGitHub <noreply@github.com>2020-06-09 21:18:28 +0200
commit45204921be610be839482a037985fd5a5052f2dd (patch)
tree246bcb7ec5538bfbc2f52ddf9a5c135fb5b9dd9e /src/network
parent2ffadd3ceee3abcb339d3ec08a11238794d42d24 (diff)
parent331ee15f18a58996d9dc8248918d35d5ce7f7131 (diff)
downloadsystemd-45204921be610be839482a037985fd5a5052f2dd.tar.gz
Merge pull request #16104 from ssahani/dhcpv6-iaid
networkctl: Display DHCPv6 IAID
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkctl.c12
-rw-r--r--src/network/networkd-link.c7
2 files changed, 17 insertions, 2 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index dea190eb0d..d4a5b52309 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -1381,7 +1381,7 @@ static int link_status_one(
_cleanup_strv_free_ char **dns = NULL, **ntp = NULL, **sip = NULL, **search_domains = NULL, **route_domains = NULL,
**pop3_server = NULL, **smtp_server = NULL, **lpr_server = NULL;
_cleanup_free_ char *setup_state = NULL, *operational_state = NULL, *tz = NULL;
- _cleanup_free_ char *t = NULL, *network = NULL, *client_id = NULL;
+ _cleanup_free_ char *t = NULL, *network = NULL, *client_id = NULL, *iaid = NULL;
const char *driver = NULL, *path = NULL, *vendor = NULL, *model = NULL, *link = NULL;
const char *on_color_operational, *off_color_operational,
*on_color_setup, *off_color_setup;
@@ -2083,6 +2083,16 @@ static int link_status_one(
return table_log_add_error(r);
}
+ r = sd_network_link_get_dhcp6_client_iaid_string(info->ifindex, &iaid);
+ if (r >= 0) {
+ r = table_add_many(table,
+ TABLE_EMPTY,
+ TABLE_STRING, "DHCP6 Client IAID:",
+ TABLE_STRING, iaid);
+ if (r < 0)
+ return table_log_add_error(r);
+ }
+
r = dump_lldp_neighbors(table, "Connected To:", info->ifindex);
if (r < 0)
return r;
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 20c5c1c4c8..b27b13c194 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -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;