Subject: Re: [PATCH] phonet netlink: allow multiple messages per skb in route dump

From: Johannes Berg <[email-masked]>
Date: Mon, 19 Jan 2015 21:14:44 +0100

On Mon, 2015-01-19 at 22:11 +0200, Rémi Denis-Courmont wrote:
> Le lundi 19 janvier 2015, 12:15:24 Johannes Berg a écrit :
> > From: Johannes Berg <[email-masked]>
> > 
> > My previous patch to this file changed the code to be bug-compatible
> > towards userspace. Unless userspace (which I wasn't able to find)
> > implements the dump reader by hand in a wrong way, this isn't needed.
> 
> The canonical userspace is there (specifically src/pnroute.c):
> https://gitorious.org/meego-cellular/phonet-utils/

Ah, cool.

> AFAICT, it should work either way. By now, I expect what's left of the 
> Maemo/Meego/Mer/whatever community has forked or rewritten it though.

The loop

	for (struct nlmsghdr *nlh = (struct nlmsghdr *)&req;
	     NLMSG_OK (nlh, (size_t)ret); nlh = NLMSG_NEXT (nlh, ret))

should make it do the right thing, I agree.

johannes