[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131128221916.GB4100@casper.infradead.org>
Date: Thu, 28 Nov 2013 22:19:16 +0000
From: Thomas Graf <tgraf@...g.ch>
To: Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net] diag: fix netlink API attributes
On 11/28/13 at 06:37pm, Nicolas Dichtel wrote:
> Le 28/11/2013 17:38, Thomas Graf a écrit :
> >On 11/28/13 at 02:57pm, Nicolas Dichtel wrote:
> >>The first netlink attribute (value 0) must always be defined as none/unspec.
> >>This is correctly done in inet_diag.h, but other diag interfaces are broken.
> >>
> >>Libraries like libnl skip this kind of attributes, thus it's never reported to
> >>the application.
> >>
> >>CC: Thomas Graf <tgraf@...g.ch>
> >>Signed-off-by: Nicolas Dichtel <nicolas.dichtel@...nd.com>
> >
> >First of all, thanks for the notification Nicolas. I'll fix libnl to
> >pass through these attributes.
> Fine :)
> Thank you!
Fixed in:
commit 6a8d90f5fec48b6e376ff29ccf3e0c620a41e758
Author: Thomas Graf <tgraf@...g.ch>
Date: Thu Nov 28 23:14:38 2013 +0100
attr: Allow attribute type 0
{netlink,packet,unix}_diag use attribute type 0 for valid
attributes. The value was reserved and usage was prohibited
by the protocol but we can't undo the breakge.
Make libnl accept attribute type 0 to allow parsing these
attributes.
Reported-by: Nicolas Dichtel <nicolas.dichtel@...nd.com>
Signed-off-by: Thomas Graf <tgraf@...g.ch>
> >I think the fix you propose is no an option as it breaks backwards
> >compatiblity with existing user space. We cannot change the value
> >of existing attributes.
> Yes, I was just wondering how to fix it.
> It also breaks the patch you've proposed in this thread:
> http://thread.gmane.org/gmane.linux.network/251478/focus=252764
>
> Hence, aligning attributes on 64-bits is still unresolved :(
Unfortunately I ran into other places where an attribute type 0
was used. Therefore the idea of using NLA_UNSPEC (0) to insert
padding attributes doesn't work. We would need to find another
way to insert padding. I'll be glad to share the WIP patch if
somebody else would like to continue the work.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists