From patchwork Fri Apr 14 23:06:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Zhou X-Patchwork-Id: 750976 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 3w4YJN2rJYz9s84 for ; Sat, 15 Apr 2017 09:09:24 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 6F096CD7; Fri, 14 Apr 2017 23:06:37 +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 C46A6CBF for ; Fri, 14 Apr 2017 23:06:33 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 278AEFB for ; Fri, 14 Apr 2017 23:06:33 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id a188so16796160pfa.2 for ; Fri, 14 Apr 2017 16:06:33 -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=hMPGOR1GSO/je+nU+DLyxJU9ljfqWVfsVIVeYyGI1M4=; b=Wb51tAMrrbWhpqE718BdrQ8fKhdOPGigxpjUD+97BDXfw7j359BUJXgLfQFV3WOQfY EN5oasdf8LEu0n6B4j/82vFjQ7OZlznqZqpvd2+oM/q1uLyNqvOTHGPaplGeDuJ2Yloz J2fO2sqeMNhkl9rj6GNV4gysqv7NBzvbXXq9MLitOxST1IwbfycBO6jQUBFNp1+LcGH/ 1SxTXuVLGqkxO+3HrcECGNVsGI7xw4C2ru+37ZpzXqUk37OtWpUtomt79J15G5FfzxJo fy1Lj5eTWjvdlZgTRBi4f9bDHxWKgNeggZoe4SCaFOi6W9NSWCbbxuH4dvEm9x3kEMeP bgiA== X-Gm-Message-State: AN3rC/6FQJDBbg57BkqYAAo4hov/r5DedJ2uEaeht42c91dH+CBPKzYC Rr5Vc+OD1qNB+A== X-Received: by 10.99.114.80 with SMTP id c16mr213772pgn.121.1492211192803; Fri, 14 Apr 2017 16:06:32 -0700 (PDT) Received: from centos.eng.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id t70sm5019294pgd.33.2017.04.14.16.06.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Apr 2017 16:06:32 -0700 (PDT) From: Andy Zhou To: dev@openvswitch.org Date: Fri, 14 Apr 2017 16:06:10 -0700 Message-Id: <1492211174-28936-6-git-send-email-azhou@ovn.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1492211174-28936-1-git-send-email-azhou@ovn.org> References: <1492211174-28936-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: Kris Murphy Subject: [ovs-dev] [datapath backport v2 06/10] datapath: openvswitch: Add missing case OVS_TUNNEL_KEY_ATTR_PAD 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: Kris Murphy openvswitch: Add missing case OVS_TUNNEL_KEY_ATTR_PAD Added a case for OVS_TUNNEL_KEY_ATTR_PAD to the switch statement in ip_tun_from_nlattr in order to prevent the default case returning an error. Fixes: b46f6ded906e ("libnl: nla_put_be64(): align on a 64-bit area") Signed-off-by: Kris Murphy Acked-by: Joe Stringer Signed-off-by: David S. Miller Upstream: 8f3dbfd79ed9("openvswitch: Add missing case OVS_TUNNEL_KEY_ATTR_PAD") Fixes: f34648187b03 ("datapath: backport: libnl: nla_put_be64(): align on a 64-bit area") Signed-off-by: Andy Zhou Acked-by: Joe Stringer --- v1->v2: Add ovs fixes message. Note, backport to 2.6+ --- AUTHORS.rst | 1 + datapath/flow_netlink.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index 36df68b270e6..c18b3ebba0d3 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -179,6 +179,7 @@ Kevin Lo kevlo@FreeBSD.org Kevin Traynor kevin.traynor@intel.com Khem Raj raj.khem@gmail.com Kmindg G kmindg@gmail.com +Kris Murphy kriskend@linux.vnet.ibm.com Krishna Kondaka kkondaka@vmware.com Kyle Mestery mestery@mestery.com Kyle Upton kupton@baymicrosystems.com diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c index e31852ebb421..704e2da5f7a6 100644 --- a/datapath/flow_netlink.c +++ b/datapath/flow_netlink.c @@ -667,6 +667,8 @@ static int ip_tun_from_nlattr(const struct nlattr *attr, tun_flags |= TUNNEL_VXLAN_OPT; opts_type = type; break; + case OVS_TUNNEL_KEY_ATTR_PAD: + break; default: OVS_NLERR(log, "Unknown IP tunnel attribute %d", type);