Silence new kernel warning introduced in 3.3: 'netlink: 12 bytes leftover
after parsing attributes.' RTM_GETLINK messages should have a struct rtattr as payload.
This commit is contained in:
		@@ -143,7 +143,7 @@ static int nl_sendgetlink(struct client_state_t *cs)
 | 
			
		||||
    struct nlmsghdr *nlh = (struct nlmsghdr *)nlbuf;
 | 
			
		||||
 | 
			
		||||
    memset(nlbuf, 0, sizeof nlbuf);
 | 
			
		||||
    nlh->nlmsg_len = NLMSG_LENGTH(sizeof (struct ifinfomsg));
 | 
			
		||||
    nlh->nlmsg_len = NLMSG_LENGTH(sizeof (struct rtattr));
 | 
			
		||||
    nlh->nlmsg_type = RTM_GETLINK;
 | 
			
		||||
    nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ROOT;
 | 
			
		||||
    nlh->nlmsg_seq = time(NULL);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user