chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rtnl: when querying local addresses and gateways, take address family into account
[elogind.git]
/
src
/
network
/
networkctl.c
diff --git
a/src/network/networkctl.c
b/src/network/networkctl.c
index 3e304b261f147d8a8ff6144896d8b0d558c137a5..6c5eb5b9362f5792612d89f2988e31bde49b12a8 100644
(file)
--- a/
src/network/networkctl.c
+++ b/
src/network/networkctl.c
@@
-496,7
+496,7
@@
static int dump_addresses(sd_rtnl *rtnl, const char *prefix, int ifindex) {
_cleanup_free_ struct local_address *local = NULL;
int r, n, i;
_cleanup_free_ struct local_address *local = NULL;
int r, n, i;
- n = local_addresses(rtnl, ifindex, &local);
+ n = local_addresses(rtnl, ifindex,
AF_UNSPEC,
&local);
if (n < 0)
return n;
if (n < 0)
return n;
@@
-708,7
+708,7
@@
static int link_status(char **args, unsigned n) {
printf(" State: %s%s%s\n", on_color_operational, strna(operational_state), off_color_operational);
printf(" State: %s%s%s\n", on_color_operational, strna(operational_state), off_color_operational);
- c = local_addresses(rtnl, 0, &addresses);
+ c = local_addresses(rtnl, 0,
AF_UNSPEC,
&addresses);
for (i = 0; i < c; i++) {
_cleanup_free_ char *pretty = NULL;
for (i = 0; i < c; i++) {
_cleanup_free_ char *pretty = NULL;