Fixed the temporary hack to run with 2.6.24-rc5 again.

pull/7/head
Oliver Hartkopp 2007-12-23 18:17:29 +00:00
parent 5f164d3414
commit ec4a0bcd6d
1 changed files with 4 additions and 2 deletions

6
vcan.c
View File

@ -26,8 +26,9 @@
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
//#include <linux/if_link.h>
#include <linux/if_link.h>
#if 0
#define IFLA_LINKINFO 18
enum
@ -38,6 +39,7 @@ enum
IFLA_INFO_XSTATS,
__IFLA_INFO_MAX,
};
#endif
#define NLMSG_TAIL(nmsg) \
((struct rtattr *)(((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
@ -88,7 +90,7 @@ int main(int argc, char **argv)
linkinfo = NLMSG_TAIL(&req.n);
addattr_l(&req.n, sizeof(req), IFLA_LINKINFO, NULL, 0);
addattr_l(&req.n, sizeof(req), IFLA_INFO_NAME, "vcan", strlen("vcan"));
addattr_l(&req.n, sizeof(req), IFLA_INFO_KIND, "vcan", strlen("vcan"));
linkinfo->rta_len = (void*)NLMSG_TAIL(&req.n) - (void*)linkinfo;
} else if (strcmp(cmd, "delete") == 0) {