diff options
author | Roopa Prabhu <roopa@nvidia.com> | 2022-05-08 04:53:38 +0000 |
---|---|---|
committer | David Ahern <dsahern@kernel.org> | 2022-05-08 09:50:32 -0600 |
commit | 45cd32f9f7d53087b48b76e0a880066fd7ea77a6 (patch) | |
tree | f48d47ee2e95ab560a180dc0f950568044ed4d5b /lib | |
parent | 837294e452521129718c913fd04e2214998ae9e4 (diff) | |
download | iproute2-45cd32f9f7d53087b48b76e0a880066fd7ea77a6.tar.gz |
bridge: vxlan device vnifilter support
This patch adds bridge command to manage
recently added vnifilter on a collect metadata
vxlan device.
examples:
$bridge vni add dev vxlan0 vni 400
$bridge vni add dev vxlan0 vni 200 group 239.1.1.101
$bridge vni del dev vxlan0 vni 400
$bridge vni show
$bridge -s vni show
Signed-off-by: Roopa Prabhu <roopa@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libnetlink.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/libnetlink.c b/lib/libnetlink.c index 4d33e4dd..b3c3d0ba 100644 --- a/lib/libnetlink.c +++ b/lib/libnetlink.c @@ -1609,3 +1609,21 @@ void nl_print_policy(const struct rtattr *attr, FILE *fp) } } } + +int rtnl_tunneldump_req(struct rtnl_handle *rth, int family, int ifindex) +{ + struct { + struct nlmsghdr nlh; + struct tunnel_msg tmsg; + char buf[256]; + } req = { + .nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct tunnel_msg)), + .nlh.nlmsg_type = RTM_GETTUNNEL, + .nlh.nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST, + .nlh.nlmsg_seq = rth->dump = ++rth->seq, + .tmsg.family = family, + .tmsg.ifindex = ifindex, + }; + + return send(rth->fd, &req, sizeof(req), 0); +} |