summaryrefslogtreecommitdiff
path: root/src/network/networkctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-04 01:41:12 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-04 01:42:42 +0100
commit1d050e1e0a7082e23ee9b31fa0b819cb332b3444 (patch)
tree7545997688bd7b7e3a34e4f580d306347eb8a037 /src/network/networkctl.c
parentd2df88ffbac8858214adb9daaf7a93122fe26a50 (diff)
rtnl: when querying local addresses and gateways, take address family into account
Diffstat (limited to 'src/network/networkctl.c')
-rw-r--r--src/network/networkctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index 3e304b261f..6c5eb5b936 100644
--- 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;
- n = local_addresses(rtnl, ifindex, &local);
+ n = local_addresses(rtnl, ifindex, AF_UNSPEC, &local);
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);
- 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;