diff --git a/lib/libnetlink.c b/lib/libnetlink.c index c581e11c..878911ec 100644 --- a/lib/libnetlink.c +++ b/lib/libnetlink.c @@ -94,6 +94,9 @@ int rtnl_wilddump_request(struct rtnl_handle *rth, int family, int type) struct { struct nlmsghdr nlh; struct rtgenmsg g; + __u16 align_rta; /* attribute has to be 32bit aligned */ + struct rtattr ext_req; + __u32 ext_filter_mask; } req; memset(&req, 0, sizeof(req)); @@ -104,6 +107,10 @@ int rtnl_wilddump_request(struct rtnl_handle *rth, int family, int type) req.nlh.nlmsg_seq = rth->dump = ++rth->seq; req.g.rtgen_family = family; + req.ext_req.rta_type = IFLA_EXT_MASK; + req.ext_req.rta_len = RTA_LENGTH(sizeof(__u32)); + req.ext_filter_mask = RTEXT_FILTER_VF; + return send(rth->fd, (void*)&req, sizeof(req), 0); }