]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkctl: Add support to display VXLan remote address 15397/head
authorSusant Sahani <ssahani@vmware.com>
Fri, 10 Apr 2020 13:50:23 +0000 (15:50 +0200)
committerSusant Sahani <ssahani@vmware.com>
Sat, 11 Apr 2020 14:12:42 +0000 (16:12 +0200)
src/network/networkctl.c

index 952fd555785ec94bad38f12db96ef1e702341494..2e2ba4732cd2badd4e5010f54d70a9c00041e5b9 100644 (file)
@@ -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)