From ad1e288013a5646bd209ee96eb5f646d6d7b55c0 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Mon, 23 Mar 2020 10:42:00 +0100 Subject: [PATCH] networkctl: Add support to display DHCP SMTP servers --- src/network/networkctl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/network/networkctl.c b/src/network/networkctl.c index cfe511c3870..58f79b3754c 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -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);