All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net/openvswitch: Set the ipv6 source tunnel key address attribute correctly
@ 2017-03-15 16:10 Or Gerlitz
  2017-03-15 16:28 ` Jiri Benc
  2017-03-15 22:11 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Or Gerlitz @ 2017-03-15 16:10 UTC (permalink / raw)
  To: David S. Miller
  Cc: Jiri Benc, Paul Blakey, Roi Dayan, mlxsw, netdev, Or Gerlitz

When dealing with ipv6 source tunnel key address attribute
(OVS_TUNNEL_KEY_ATTR_IPV6_SRC) we are wrongly setting the tunnel
dst ip, fix that.

Fixes: 6b26ba3a7d95 ('openvswitch: netlink attributes for IPv6 tunneling')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reported-by: Paul Blakey <paulb@mellanox.com>
---

Jiri, so I have few wild guesses how things work w.o this fix, e.g: 

(1) typically the tunnel source ip attribute isn't set by user-space
(2) the vxlan driver overrides the source ip from what they get after 
    route lookup on the dest
(3) more?

 net/openvswitch/flow_netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index 6f5fa50..a08ff83 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -604,7 +604,7 @@ static int ip_tun_from_nlattr(const struct nlattr *attr,
 			ipv4 = true;
 			break;
 		case OVS_TUNNEL_KEY_ATTR_IPV6_SRC:
-			SW_FLOW_KEY_PUT(match, tun_key.u.ipv6.dst,
+			SW_FLOW_KEY_PUT(match, tun_key.u.ipv6.src,
 					nla_get_in6_addr(a), is_mask);
 			ipv6 = true;
 			break;
-- 
2.3.7

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

* Re: [PATCH net] net/openvswitch: Set the ipv6 source tunnel key address attribute correctly
  2017-03-15 16:10 [PATCH net] net/openvswitch: Set the ipv6 source tunnel key address attribute correctly Or Gerlitz
@ 2017-03-15 16:28 ` Jiri Benc
  2017-03-15 17:41   ` Joe Stringer
  2017-03-15 22:11 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Jiri Benc @ 2017-03-15 16:28 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: David S. Miller, Paul Blakey, Roi Dayan, mlxsw, netdev

On Wed, 15 Mar 2017 18:10:47 +0200, Or Gerlitz wrote:
> When dealing with ipv6 source tunnel key address attribute
> (OVS_TUNNEL_KEY_ATTR_IPV6_SRC) we are wrongly setting the tunnel
> dst ip, fix that.
> 
> Fixes: 6b26ba3a7d95 ('openvswitch: netlink attributes for IPv6 tunneling')
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> Reported-by: Paul Blakey <paulb@mellanox.com>

Acked-by: Jiri Benc <jbenc@redhat.com>

> Jiri, so I have few wild guesses how things work w.o this fix, e.g: 
> 
> (1) typically the tunnel source ip attribute isn't set by user-space

I think this is it.

Thanks for the fix!

 Jiri

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

* Re: [PATCH net] net/openvswitch: Set the ipv6 source tunnel key address attribute correctly
  2017-03-15 16:28 ` Jiri Benc
@ 2017-03-15 17:41   ` Joe Stringer
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Stringer @ 2017-03-15 17:41 UTC (permalink / raw)
  To: Jiri Benc
  Cc: Or Gerlitz, David S. Miller, Paul Blakey, Roi Dayan, mlxsw, netdev

On 15 March 2017 at 09:28, Jiri Benc <jbenc@redhat.com> wrote:
> On Wed, 15 Mar 2017 18:10:47 +0200, Or Gerlitz wrote:
>> When dealing with ipv6 source tunnel key address attribute
>> (OVS_TUNNEL_KEY_ATTR_IPV6_SRC) we are wrongly setting the tunnel
>> dst ip, fix that.
>>
>> Fixes: 6b26ba3a7d95 ('openvswitch: netlink attributes for IPv6 tunneling')
>> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
>> Reported-by: Paul Blakey <paulb@mellanox.com>
>
> Acked-by: Jiri Benc <jbenc@redhat.com>

Thanks, good spotting.

Acked-by: Joe Stringer <joe@ovn.org>

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

* Re: [PATCH net] net/openvswitch: Set the ipv6 source tunnel key address attribute correctly
  2017-03-15 16:10 [PATCH net] net/openvswitch: Set the ipv6 source tunnel key address attribute correctly Or Gerlitz
  2017-03-15 16:28 ` Jiri Benc
@ 2017-03-15 22:11 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2017-03-15 22:11 UTC (permalink / raw)
  To: ogerlitz; +Cc: jbenc, paulb, roid, mlxsw, netdev

From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Wed, 15 Mar 2017 18:10:47 +0200

> When dealing with ipv6 source tunnel key address attribute
> (OVS_TUNNEL_KEY_ATTR_IPV6_SRC) we are wrongly setting the tunnel
> dst ip, fix that.
> 
> Fixes: 6b26ba3a7d95 ('openvswitch: netlink attributes for IPv6 tunneling')
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
> Reported-by: Paul Blakey <paulb@mellanox.com>

Applied and queued up for -stable, thanks!

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

end of thread, other threads:[~2017-03-15 22:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15 16:10 [PATCH net] net/openvswitch: Set the ipv6 source tunnel key address attribute correctly Or Gerlitz
2017-03-15 16:28 ` Jiri Benc
2017-03-15 17:41   ` Joe Stringer
2017-03-15 22:11 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.