From patchwork Fri Apr 7 00:18:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Zhou X-Patchwork-Id: 748003 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vzgGv08n8z9s3w for ; Fri, 7 Apr 2017 10:21:11 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 71DAAB66; Fri, 7 Apr 2017 00:18:52 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 89AD7B43 for ; Fri, 7 Apr 2017 00:18:48 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 08B58257 for ; Fri, 7 Apr 2017 00:18:47 +0000 (UTC) Received: by mail-pg0-f65.google.com with SMTP id o123so11360429pga.1 for ; Thu, 06 Apr 2017 17:18:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:content-transfer-encoding; bh=U1xUtmRRocw7WIyo+haHqJep3ggPdiNSZAk4v7sBiMc=; b=eXfPl7d/1Xn8KsKUT4Z3aykoelL833eyPgHJdAJceK/H2ropTjYTittsb7pi07vTPR YSgh0lsMicfCo2qhB7xm3rkJIo0qzE1DNOKvAXUvbTiRSfSAkAuImLfRxp+7myY8WxY5 pkmqjTC9xQQwNegsj7EXWkfB9PnDQ0nR/C2jSgZKnCCLzQX2Zn1bv+ORegrgBDK4B7Jg 9xfKruTvGf1r6WWlxLuQD5mIsUrtlPD713PrgQdVvVGCu39dJxWSZ6VUO6qLVe9RvImG vumiFjMR0x7u0iD6eGKg1WrFl0cPHJ9qFQfPr079dJXMAWkEX3+p60h26n/0kjRn+jAH Xcdg== X-Gm-Message-State: AFeK/H0EyNAV9+qDMxDroxqhhGHpGn7AhPGu0jGYWWttxtttEmBJYJxWPR/RAy7cgv0xHQ== X-Received: by 10.84.231.201 with SMTP id g9mr46883644pln.1.1491524327570; Thu, 06 Apr 2017 17:18:47 -0700 (PDT) Received: from centos.eng.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id p6sm5713090pgn.9.2017.04.06.17.18.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Apr 2017 17:18:46 -0700 (PDT) From: Andy Zhou To: dev@openvswitch.org Date: Thu, 6 Apr 2017 17:18:19 -0700 Message-Id: <1491524304-1907-5-git-send-email-azhou@ovn.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1491524304-1907-1-git-send-email-azhou@ovn.org> References: <1491524304-1907-1-git-send-email-azhou@ovn.org> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Or Gerlitz Subject: [ovs-dev] [datapath backport 05/10] datapath: net/openvswitch: Set the ipv6 source tunnel key address attribute correctly X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Or Gerlitz 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 Reported-by: Paul Blakey Acked-by: Jiri Benc Acked-by: Joe Stringer Signed-off-by: David S. Miller Upstream: 3d20f1f7bd575 ("net/openvswitch: Set the ipv6 source tunnel key address attribute correctly") Signed-off-by: Andy Zhou Acked-by: Joe Stringer --- AUTHORS.rst | 1 + datapath/flow_netlink.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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;