[PATCH] net: Dump venet links
Cyrill Gorcunov
gorcunov at openvz.org
Tue Sep 17 13:46:51 EDT 2013
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
net.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/net.c b/net.c
index 2c2caed..dd2460c 100644
--- a/net.c
+++ b/net.c
@@ -148,6 +148,7 @@ static int dump_one_link(struct nlmsghdr *hdr, void *arg)
struct ifinfomsg *ifi;
int ret = 0, len = hdr->nlmsg_len - NLMSG_LENGTH(sizeof(*ifi));
struct rtattr *tb[IFLA_MAX + 1];
+ char *kind;
ifi = NLMSG_DATA(hdr);
@@ -170,6 +171,13 @@ static int dump_one_link(struct nlmsghdr *hdr, void *arg)
case ARPHRD_NONE:
ret = dump_one_gendev(ifi, tb, fds);
break;
+ case ARPHRD_VOID:
+ kind = link_kind(ifi, tb);
+ if (kind && !strcmp(kind, "venet")) {
+ ret = dump_one_netdev(ND_TYPE__VENET, ifi, tb, fds, NULL);
+ break;
+ }
+ /* Fall through otherwise! */
default:
pr_err("Unsupported link type %d, kind %s\n",
ifi->ifi_type, link_kind(ifi, tb));
--
1.8.1.4
--C7zPtVaVf+AK4Oqc--
More information about the CRIU
mailing list