netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bridge VLAN kernel/iproute2 incompatibility
@ 2013-08-12 16:24 Asbjørn Sloth Tønnesen
  2013-08-12 16:30 ` [PATCH] rtnetlink: rtnl_bridge_getlink: Call nlmsg_find_attr() with ifinfomsg header Asbjoern Sloth Toennesen
  2013-08-14  2:10 ` Bridge VLAN kernel/iproute2 incompatibility David Miller
  0 siblings, 2 replies; 7+ messages in thread
From: Asbjørn Sloth Tønnesen @ 2013-08-12 16:24 UTC (permalink / raw)
  To: David S. Miller, Vlad Yasevich, Stephen Hemminger, netdev, bridge
  Cc: linux-kernel

Hi,

Let's start with a little history:

Feb 20:   Vlad Yasevich got his VLAN-aware bridge patchset included in
          the 3.9 merge window.
          In the kernel commit 6cbdceeb, he added attribute support to
          bridge GETLINK requests sent with rtgenmsg.

Mar 6th:  Vlad got this iproute2 reference implementation of the bridge
          vlan netlink interface accepted (iproute2 9eff0e5c)

Apr 25th: iproute2 switched from using rtgenmsg to ifinfomsg (63338dca)
          http://patchwork.ozlabs.org/patch/239602/
          http://marc.info/?t=136680900700007

Apr 28th: Linus released 3.9

Apr 30th: Stephen released iproute2 3.9.0

The `bridge vlan show` command haven't been working since the switch to
ifinfomsg, or in a released version of iproute2. Since the kernel side
only supports rtgenmsg, which iproute2 switched away from just prior to
the iproute2 3.9.0 release.

I haven't been able to find any documentation, about neither rtgenmsg
nor ifinfomsg, and in which situation to use which, but kernel commit
88c5b5ce seams to suggest that ifinfomsg should be used.

Fixing this in kernel will break compatibility, but I doubt that anybody
have been using it due to this bug in the user space reference
implementation, at least not without noticing this bug. That said the
functionality is still fully functional in 3.9, when reversing iproute2
commit 63338dca.

This could also be fixed in iproute2, but thats an ugly patch that would
reintroduce rtgenmsg in iproute2, and from searching in netdev it seams
like rtgenmsg usage is discouraged. I'm assuming that the only reason
that Vlad implemented the kernel side to use rtgenmsg, was because
iproute2 was using it at the time.

I will reply with kernel patch, I can also post the alternative iproute2
patch if requested.

-- 
Best regards
Asbjørn Sloth Tønnesen
Network engineer
Fiberby ApS - AS42541

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] rtnetlink: rtnl_bridge_getlink: Call nlmsg_find_attr() with ifinfomsg header
  2013-08-12 16:24 Bridge VLAN kernel/iproute2 incompatibility Asbjørn Sloth Tønnesen
@ 2013-08-12 16:30 ` Asbjoern Sloth Toennesen
  2013-08-12 19:57   ` Vlad Yasevich
  2013-08-14  2:10 ` Bridge VLAN kernel/iproute2 incompatibility David Miller
  1 sibling, 1 reply; 7+ messages in thread
From: Asbjoern Sloth Toennesen @ 2013-08-12 16:30 UTC (permalink / raw)
  To: David S. Miller, Vlad Yasevich, Stephen Hemminger, netdev, bridge
  Cc: linux-kernel

Fix the iproute2 command `bridge vlan show`, after switching from
rtgenmsg to ifinfomsg.

Signed-off-by: Asbjoern Sloth Toennesen <ast@fiberby.net>
---
 net/core/rtnetlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 3de7408..a043171 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2384,7 +2384,7 @@ static int rtnl_bridge_getlink(struct sk_buff *skb, struct netlink_callback *cb)
 	struct nlattr *extfilt;
 	u32 filter_mask = 0;
 
-	extfilt = nlmsg_find_attr(cb->nlh, sizeof(struct rtgenmsg),
+	extfilt = nlmsg_find_attr(cb->nlh, sizeof(struct ifinfomsg),
 				  IFLA_EXT_MASK);
 	if (extfilt)
 		filter_mask = nla_get_u32(extfilt);
-- 
1.8.4.rc1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] rtnetlink: rtnl_bridge_getlink: Call nlmsg_find_attr() with ifinfomsg header
  2013-08-12 16:30 ` [PATCH] rtnetlink: rtnl_bridge_getlink: Call nlmsg_find_attr() with ifinfomsg header Asbjoern Sloth Toennesen
@ 2013-08-12 19:57   ` Vlad Yasevich
  2013-08-13 22:54     ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Vlad Yasevich @ 2013-08-12 19:57 UTC (permalink / raw)
  To: Asbjoern Sloth Toennesen
  Cc: Stephen Hemminger, netdev, bridge, David S. Miller, linux-kernel

On 08/12/2013 12:30 PM, Asbjoern Sloth Toennesen wrote:
> Fix the iproute2 command `bridge vlan show`, after switching from
> rtgenmsg to ifinfomsg.
>
> Signed-off-by: Asbjoern Sloth Toennesen <ast@fiberby.net>


Thanks..  I've still been using an older iproute version and didn't see 
this.


Reviewed-by: Vlad Yasevich <vyasevich@gmail.com>
> ---
>   net/core/rtnetlink.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index 3de7408..a043171 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -2384,7 +2384,7 @@ static int rtnl_bridge_getlink(struct sk_buff *skb, struct netlink_callback *cb)
>   	struct nlattr *extfilt;
>   	u32 filter_mask = 0;
>
> -	extfilt = nlmsg_find_attr(cb->nlh, sizeof(struct rtgenmsg),
> +	extfilt = nlmsg_find_attr(cb->nlh, sizeof(struct ifinfomsg),
>   				  IFLA_EXT_MASK);
>   	if (extfilt)
>   		filter_mask = nla_get_u32(extfilt);
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] rtnetlink: rtnl_bridge_getlink: Call nlmsg_find_attr() with ifinfomsg header
  2013-08-12 19:57   ` Vlad Yasevich
@ 2013-08-13 22:54     ` David Miller
  2013-08-13 23:06       ` Vlad Yasevich
  0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2013-08-13 22:54 UTC (permalink / raw)
  To: vyasevic; +Cc: ast, stephen, netdev, bridge, linux-kernel

From: Vlad Yasevich <vyasevic@redhat.com>
Date: Mon, 12 Aug 2013 15:57:29 -0400

> On 08/12/2013 12:30 PM, Asbjoern Sloth Toennesen wrote:
>> Fix the iproute2 command `bridge vlan show`, after switching from
>> rtgenmsg to ifinfomsg.
>>
>> Signed-off-by: Asbjoern Sloth Toennesen <ast@fiberby.net>
> 
> 
> Thanks..  I've still been using an older iproute version and didn't
> see this.
> 
> 
> Reviewed-by: Vlad Yasevich <vyasevich@gmail.com>

What introduced this regression?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] rtnetlink: rtnl_bridge_getlink: Call nlmsg_find_attr() with ifinfomsg header
  2013-08-13 22:54     ` David Miller
@ 2013-08-13 23:06       ` Vlad Yasevich
  2013-08-13 23:31         ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Vlad Yasevich @ 2013-08-13 23:06 UTC (permalink / raw)
  To: David Miller; +Cc: stephen, netdev, bridge, ast, linux-kernel

On 08/13/2013 06:54 PM, David Miller wrote:
> From: Vlad Yasevich <vyasevic@redhat.com>
> Date: Mon, 12 Aug 2013 15:57:29 -0400
>
>> On 08/12/2013 12:30 PM, Asbjoern Sloth Toennesen wrote:
>>> Fix the iproute2 command `bridge vlan show`, after switching from
>>> rtgenmsg to ifinfomsg.
>>>
>>> Signed-off-by: Asbjoern Sloth Toennesen <ast@fiberby.net>
>>
>>
>> Thanks..  I've still been using an older iproute version and didn't
>> see this.
>>
>>
>> Reviewed-by: Vlad Yasevich <vyasevich@gmail.com>
>
> What introduced this regression?
>

ast explained it in his header message (Bridge VLAN kernel/iproute2 
incompatibility)

-vlad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] rtnetlink: rtnl_bridge_getlink: Call nlmsg_find_attr() with ifinfomsg header
  2013-08-13 23:06       ` Vlad Yasevich
@ 2013-08-13 23:31         ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2013-08-13 23:31 UTC (permalink / raw)
  To: vyasevic; +Cc: stephen, netdev, bridge, ast, linux-kernel

From: Vlad Yasevich <vyasevic@redhat.com>
Date: Tue, 13 Aug 2013 19:06:37 -0400

> ast explained it in his header message (Bridge VLAN kernel/iproute2
> incompatibility)

That's not a header message.

Header messages have a subject prefix of the form "[PATCH 0/N]".
If he had done this I wouldn't have had to ask such silly
questions.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bridge VLAN kernel/iproute2 incompatibility
  2013-08-12 16:24 Bridge VLAN kernel/iproute2 incompatibility Asbjørn Sloth Tønnesen
  2013-08-12 16:30 ` [PATCH] rtnetlink: rtnl_bridge_getlink: Call nlmsg_find_attr() with ifinfomsg header Asbjoern Sloth Toennesen
@ 2013-08-14  2:10 ` David Miller
  1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2013-08-14  2:10 UTC (permalink / raw)
  To: ast; +Cc: vyasevic, stephen, bridge, linux-kernel, netdev

From: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Date: Mon, 12 Aug 2013 16:24:06 +0000

> Let's start with a little history:

I've applied your kernel patch, but the detailed analysis you put
here, belongs in the commit message.

Thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-14  2:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-12 16:24 Bridge VLAN kernel/iproute2 incompatibility Asbjørn Sloth Tønnesen
2013-08-12 16:30 ` [PATCH] rtnetlink: rtnl_bridge_getlink: Call nlmsg_find_attr() with ifinfomsg header Asbjoern Sloth Toennesen
2013-08-12 19:57   ` Vlad Yasevich
2013-08-13 22:54     ` David Miller
2013-08-13 23:06       ` Vlad Yasevich
2013-08-13 23:31         ` David Miller
2013-08-14  2:10 ` Bridge VLAN kernel/iproute2 incompatibility David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).