chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
networkd: link - allow loopback links to be manage, but ignore DHCP/IPv4LL
[elogind.git]
/
src
/
network
/
networkctl.c
diff --git
a/src/network/networkctl.c
b/src/network/networkctl.c
index 8f2c1b397534ed508f5905a1432cef604ea56846..d6d2e1dd274ad980f5c1888264edbb56ea2532b9 100644
(file)
--- a/
src/network/networkctl.c
+++ b/
src/network/networkctl.c
@@
-141,7
+141,7
@@
static int decode_and_sort_links(sd_rtnl_message *m, LinkInfo **ret) {
c++;
}
c++;
}
- qsort(links, c, sizeof(LinkInfo), link_info_compare);
+ qsort
_safe
(links, c, sizeof(LinkInfo), link_info_compare);
*ret = links;
links = NULL;
*ret = links;
links = NULL;
@@
-427,7
+427,7
@@
static int link_status_one(sd_rtnl *rtnl, struct udev *udev, const char *name) {
if (!strv_isempty(dns))
dump_list(" DNS: ", dns);
if (!strv_isempty(domains))
if (!strv_isempty(dns))
dump_list(" DNS: ", dns);
if (!strv_isempty(domains))
- dump_list("
Domains
: ", domains);
+ dump_list("
Domain
: ", domains);
if (!strv_isempty(ntp))
dump_list(" NTP: ", ntp);
if (!strv_isempty(ntp))
dump_list(" NTP: ", ntp);
@@
-454,7
+454,7
@@
static int link_status(char **args, unsigned n) {
if (n <= 1 && !arg_all) {
_cleanup_free_ char *operational_state = NULL;
if (n <= 1 && !arg_all) {
_cleanup_free_ char *operational_state = NULL;
- _cleanup_strv_free_ char **dns = NULL, **ntp = NULL;
+ _cleanup_strv_free_ char **dns = NULL, **ntp = NULL
, **domains = NULL
;
_cleanup_free_ struct local_address *addresses = NULL;
const char *on_color_operational, *off_color_operational;
int i, c;
_cleanup_free_ struct local_address *addresses = NULL;
const char *on_color_operational, *off_color_operational;
int i, c;
@@
-480,7
+480,11
@@
static int link_status(char **args, unsigned n) {
if (!strv_isempty(dns))
dump_list(" DNS: ", dns);
if (!strv_isempty(dns))
dump_list(" DNS: ", dns);
- sd_network_get_dns(&ntp);
+ sd_network_get_domains(&domains);
+ if (!strv_isempty(domains))
+ dump_list(" Domain: ", domains);
+
+ sd_network_get_ntp(&ntp);
if (!strv_isempty(ntp))
dump_list(" NTP: ", ntp);
if (!strv_isempty(ntp))
dump_list(" NTP: ", ntp);