diff --git a/rmnetctl/src/librmnetctl.c b/rmnetctl/src/librmnetctl.c index d621f43..fa034cc 100644 --- a/rmnetctl/src/librmnetctl.c +++ b/rmnetctl/src/librmnetctl.c @@ -96,6 +96,13 @@ struct nlmsg { char data[NLMSG_DATA_SIZE]; }; +#define RMNETCTL_NUM_TX_QUEUES 10 + +/* This needs to be hardcoded here because some legacy linux systems + * do not have this definition + */ +#define RMNET_IFLA_NUM_TX_QUEUES 31 + /*=========================================================================== LOCAL FUNCTION DEFINITIONS ===========================================================================*/ @@ -1160,6 +1167,14 @@ int rtrmnet_ctl_newvnd(rmnetctl_hndl_t *hndl, char *devname, char *vndname, req.nl_addr.nlmsg_len = NLMSG_ALIGN(req.nl_addr.nlmsg_len) + RTA_ALIGN(RTA_LENGTH(sizeof(val))); + attrinfo = (struct rtattr *)(((char *)&req) + + NLMSG_ALIGN(req.nl_addr.nlmsg_len)); + attrinfo->rta_type = RMNET_IFLA_NUM_TX_QUEUES; + attrinfo->rta_len = RTA_LENGTH(4); + *(int *)RTA_DATA(attrinfo) = RMNETCTL_NUM_TX_QUEUES; + req.nl_addr.nlmsg_len = NLMSG_ALIGN(req.nl_addr.nlmsg_len) + + RTA_ALIGN(RTA_LENGTH((4))); + /* Set up IFLA info kind RMNET that has linkinfo and type */ attrinfo = (struct rtattr *)(((char *)&req) + NLMSG_ALIGN(req.nl_addr.nlmsg_len));