summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@vmware.com>2020-04-10 15:50:23 +0200
committerSusant Sahani <ssahani@vmware.com>2020-04-11 16:12:42 +0200
commit659f85a519f4e33c17079d613603db7c822f17aa (patch)
tree54152fea1dcd115ec7a3557fe8811c5e4c83afe6 /src
parentnetwork: VXLan - Add support for remote address (diff)
downloadsystemd-659f85a519f4e33c17079d613603db7c822f17aa.tar.xz
systemd-659f85a519f4e33c17079d613603db7c822f17aa.zip
networkctl: Add support to display VXLan remote address
Diffstat (limited to 'src')
-rw-r--r--src/network/networkctl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index 952fd55578..2e2ba4732c 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -1549,9 +1549,17 @@ static int link_status_one(
}
if (IN_SET(info->vxlan_info.group_family, AF_INET, AF_INET6)) {
+ const char *p;
+
+ r = in_addr_is_multicast(info->vxlan_info.group_family, &info->vxlan_info.group);
+ if (r <= 0)
+ p = "Remote:";
+ else
+ p = "Group:";
+
r = table_add_many(table,
TABLE_EMPTY,
- TABLE_STRING, "Group:",
+ TABLE_STRING, p,
info->vxlan_info.group_family == AF_INET ? TABLE_IN_ADDR : TABLE_IN6_ADDR,
&info->vxlan_info.group);
if (r < 0)