diff mbox

[ovs-dev,datapath,backport,05/10] datapath: net/openvswitch: Set the ipv6 source tunnel key address attribute correctly

Message ID 1491524304-1907-5-git-send-email-azhou@ovn.org
State Superseded
Headers show

Commit Message

Andy Zhou April 7, 2017, 12:18 a.m. UTC
From: Or Gerlitz <ogerlitz@mellanox.com>

Upstream commit:
    net/openvswitch: Set the ipv6 source tunnel key address attribute correctly

    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>
    Acked-by: Joe Stringer <joe@ovn.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Upstream: 3d20f1f7bd575 ("net/openvswitch: Set the ipv6 source tunnel key address attribute correctly")

Signed-off-by: Andy Zhou <azhou@ovn.org>
---
 AUTHORS.rst             | 1 +
 datapath/flow_netlink.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Joe Stringer April 13, 2017, 6:34 p.m. UTC | #1
On 6 April 2017 at 17:18, Andy Zhou <azhou@ovn.org> wrote:
> From: Or Gerlitz <ogerlitz@mellanox.com>
>
> Upstream commit:
>     net/openvswitch: Set the ipv6 source tunnel key address attribute correctly
>
>     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>
>     Acked-by: Joe Stringer <joe@ovn.org>
>     Signed-off-by: David S. Miller <davem@davemloft.net>
>
> Upstream: 3d20f1f7bd575 ("net/openvswitch: Set the ipv6 source tunnel key address attribute correctly")
>
> Signed-off-by: Andy Zhou <azhou@ovn.org>

For OVS tree, it also:

Fixes: 8a2d4905a00f ("datapath: Add support for IPv6 tunnels.")

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

This should be backported to 2.6+.
diff mbox

Patch

diff --git a/AUTHORS.rst b/AUTHORS.rst
index 5baee5839a2c..c8adeadccd6f 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -225,6 +225,7 @@  Nithin Raju                     nithin@vmware.com
 Niti Rohilla                    niti.rohilla@tcs.com
 Numan Siddique                  nusiddiq@redhat.com
 Ofer Ben-Yacov                  ofer.benyacov@gmail.com
+Or Gerlitz                      ogerlitz@mellanox.com
 Ori Shoshan                     ori.shoshan@guardicore.com
 Padmanabhan Krishnan            kprad1@yahoo.com
 Panu Matilainen                 pmatilai@redhat.com
diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
index e2b17fb935ab..e31852ebb421 100644
--- a/datapath/flow_netlink.c
+++ b/datapath/flow_netlink.c
@@ -606,7 +606,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;