Subject: Re: netlink: 12 bytes leftover after parsing attributes - triggered by iproute2 libnetlink's rtnl_dump_request()

From: Stephen Hemminger <[email-masked]>
Date: Tue, 20 Mar 2012 17:02:29 -0700

On Tue, 20 Mar 2012 15:00:30 +0000
Ben Hutchings <[email-masked]> wrote:

> On Tue, 2012-03-20 at 07:41 -0700, Stephen Hemminger wrote:
> > 
> > > 
> > > Should this get fixed at kernel level, iproute2 libnetlink level or
> > > at end-user level (e.g. collectd)?
> > > Three lines every 10 seconds is a damn lot!
> > > 
> > > Thanks,
> > > Bruno
> > 
> > Netlink is supposed to be encoded as Type-Length-Value and correctly written
> > programs ignore types they don't understand. So either the library is getting
> > confused by the type or the attribute is not encoded correctly.
> > 
> > 
> > The issue could be in libnetlink library. What version of collectd and libnetlink
> > are you using?
> 
> This was also reported as provoked by a client using the ntrack
> rtnetlink code: http://thread.gmane.org/gmane.linux.network/224236
> 
> Ben.
> 

The message "netlink: NN bytes leftover after processing attributes."
comes from libnl, not libnetlink.
The code in nla_parse() is getting confused.