1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

networkctl: Add support to display DHCP SMTP servers

This commit is contained in:
Susant Sahani 2020-03-23 10:42:00 +01:00
parent c1c6ff10a1
commit ad1e288013

View File

@ -1241,7 +1241,7 @@ static int link_status_one(
const LinkInfo *info) {
_cleanup_strv_free_ char **dns = NULL, **ntp = NULL, **sip = NULL, **search_domains = NULL, **route_domains = NULL,
**pop3_server = NULL;
**pop3_server = NULL, **smtp_server = NULL;
_cleanup_free_ char *setup_state = NULL, *operational_state = NULL, *tz = NULL;
_cleanup_free_ char *t = NULL, *network = NULL;
const char *driver = NULL, *path = NULL, *vendor = NULL, *model = NULL, *link = NULL;
@ -1269,6 +1269,7 @@ static int link_status_one(
(void) sd_network_link_get_ntp(info->ifindex, &ntp);
(void) sd_network_link_get_sip(info->ifindex, &sip);
(void) sd_network_link_get_pop3_servers(info->ifindex, &pop3_server);
(void) sd_network_link_get_smtp_servers(info->ifindex, &smtp_server);
if (info->sd_device) {
(void) sd_device_get_property_value(info->sd_device, "ID_NET_LINK_FILE", &link);
@ -1832,6 +1833,9 @@ static int link_status_one(
if (r < 0)
return r;
r = dump_list(table, "POP3 servers:", pop3_server);
if (r < 0)
return r;
r = dump_list(table, "SMTP servers:", smtp_server);
if (r < 0)
return r;
r = dump_ifindexes(table, "Carrier Bound To:", carrier_bound_to);