On Tue, Jul 05, 2016 at 12:03:53PM +, Fabien Siron wrote:
> Quoting Dmitry V. Levin (2016-07-04 22:14:40)
> > On Wed, Jun 29, 2016 at 12:20:00PM +, Fabien Siron wrote:
[...]
> > > +void
> > > +decode_netlink(struct tcb *tcp, unsigned long addr, unsigned long
> > > total_size) {
> > > +
Quoting Dmitry V. Levin (2016-07-04 22:14:40)
> On Wed, Jun 29, 2016 at 12:20:00PM +, Fabien Siron wrote:
> > +static unsigned long
> > +next_nlmsg(struct nlmsghdr *nlmsghdr, unsigned long addr, unsigned long
> > *len) {
> > + if (NLMSG_ALIGN(nlmsghdr->nlmsg_len) == 0 ||
> > + NLMS
On Wed, Jun 29, 2016 at 12:20:00PM +, Fabien Siron wrote:
> +static unsigned long
> +next_nlmsg(struct nlmsghdr *nlmsghdr, unsigned long addr, unsigned long
> *len) {
> + if (NLMSG_ALIGN(nlmsghdr->nlmsg_len) == 0 ||
> + NLMSG_ALIGN(nlmsghdr->nlmsg_len) > *len) {
> + *le
Handle the case where there are several messages in the buffer.
This is very useful to some protocols like SOCK_DIAG.
* netlink.c (fetch_nlmsg, next_nlmsg): New functions.
(decode_netlink_msg): New function.
(decode_netlink): Call decode_netlink_msg().
* tests/netlink_parsing.c (send_query): Adapt