summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@vmware.com>2020-03-18 05:21:41 +0100
committerSusant Sahani <ssahani@vmware.com>2020-03-18 05:21:41 +0100
commit5712d689b91c06e4892adc29b50f16989d161901 (patch)
treeae103e0982d350872e9d7803dc42dc67b501320c /src/network
parentnetworkctl: add support to display ip6gre, ip6gretap, ip6erspan (diff)
downloadsystemd-5712d689b91c06e4892adc29b50f16989d161901.tar.xz
systemd-5712d689b91c06e4892adc29b50f16989d161901.zip
networkctl: Add support to display vti and vti6 tunnels
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkctl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index c4aecc51b9..bc67af3c25 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -276,6 +276,12 @@ static int decode_netdev(sd_netlink_message *m, LinkInfo *info) {
} else if (STR_IN_SET(received_kind, "ip6gre", "ip6gretap", "ip6erspan")) {
(void) sd_netlink_message_read_in6_addr(m, IFLA_GRE_LOCAL, &info->local.in6);
(void) sd_netlink_message_read_in6_addr(m, IFLA_GRE_REMOTE, &info->remote.in6);
+ } else if (streq(received_kind, "vti")) {
+ (void) sd_netlink_message_read_in_addr(m, IFLA_VTI_LOCAL, &info->local.in);
+ (void) sd_netlink_message_read_in_addr(m, IFLA_VTI_REMOTE, &info->remote.in);
+ } else if (streq(received_kind, "vti6")) {
+ (void) sd_netlink_message_read_in6_addr(m, IFLA_VTI_LOCAL, &info->local.in6);
+ (void) sd_netlink_message_read_in6_addr(m, IFLA_VTI_REMOTE, &info->remote.in6);
}
strncpy(info->netdev_kind, received_kind, IFNAMSIZ);
@@ -1482,7 +1488,7 @@ static int link_status_one(
TABLE_UINT16, info->vlan_id);
if (r < 0)
return table_log_add_error(r);
- } else if (STRPTR_IN_SET(info->netdev_kind, "ipip", "sit", "gre", "gretap", "erspan")) {
+ } else if (STRPTR_IN_SET(info->netdev_kind, "ipip", "sit", "gre", "gretap", "erspan", "vti")) {
if (!in_addr_is_null(AF_INET, &info->local)) {
r = table_add_many(table,
TABLE_EMPTY,
@@ -1500,7 +1506,7 @@ static int link_status_one(
if (r < 0)
return table_log_add_error(r);
}
- } else if (STRPTR_IN_SET(info->netdev_kind, "ip6gre", "ip6gretap", "ip6erspan")) {
+ } else if (STRPTR_IN_SET(info->netdev_kind, "ip6gre", "ip6gretap", "ip6erspan", "vti6")) {
if (!in_addr_is_null(AF_INET6, &info->local)) {
r = table_add_many(table,
TABLE_EMPTY,