Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3162220pxb; Mon, 18 Apr 2022 17:43:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6knOk5SD2LibV7AlApyILVwiJt87yxdSUEmRrjw5ZWgAvl1Fi15RWgh16FDek+7gBLlI/ X-Received: by 2002:a63:7c42:0:b0:39c:c333:b3d4 with SMTP id l2-20020a637c42000000b0039cc333b3d4mr12332565pgn.456.1650329030633; Mon, 18 Apr 2022 17:43:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650329030; cv=none; d=google.com; s=arc-20160816; b=AOqU8hviKwgBooM/nVjPxZfuNWC2PxH4sDRw1Mtdti3YgWdAbwfZFdPwah9aV5OZiH 29tnJ3lvXTTYz5Uhlw4MXYLcTs20CafBKH/CQnPSKkqzHMFPPubLwuvZsM8yhiJnjH7t MGIk/fEx2xrgOsiQHV7YDclBK5b/euh2NHmQlWThp1muBl1uEio2QKn+6eL7JO8PjUrD bkgR7JAItJoQlDPWHQckZCoCRc3HUOSq3iQYnt2aqxpRL2LAQjLAGFwe//gIsOICD8GG R4suz8hw5a77+RhmcVAqcoRPdVvMBe5ELe/nSkkxZNwxrZYFfrNWM3nSsBlA1HsSYZsS 3DQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iB5WVCL8nQq3pRztBKfYY2RAxAdu9CeOj73dHw9SiOs=; b=BNFXXPemAZJWGf8CPfTGXYHczqrJ1X/ri+wONrBEjBzOYY640CQc97F+J7vhmbzR0m VMIB6P/RL6eMV0PH+8SOsd94NFjQfI2iPikbHhf8tYjd7kNKBpRCnbOHs4X8VoB7znuc azb/QHjdppyniezs8w/KNTkkh15JyqLQfvhBr3FJ3akXaXpo7c7okGlgk8TpKuAh4TNv NAQ9c7BLBxehS6tDKw72L0jUOtyXWM19Nm1oYcUvwEDnbdijssEi/S6nA2whKVmJgocn Ru6Ca+Ebr48OZB31PfQ+ATmLChdUGBF5liIInmxCuLwAlOcNBOVjiTzwM1YKkp/an+v7 E0aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TIVwER6v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c13-20020a170903234d00b00156bc537059si11143675plh.17.2022.04.18.17.43.34; Mon, 18 Apr 2022 17:43:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TIVwER6v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244865AbiDRN6B (ORCPT + 99 others); Mon, 18 Apr 2022 09:58:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244922AbiDRNbB (ORCPT ); Mon, 18 Apr 2022 09:31:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE3425F7A; Mon, 18 Apr 2022 05:57:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 76E01B80E44; Mon, 18 Apr 2022 12:57:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B31FBC385A1; Mon, 18 Apr 2022 12:57:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286652; bh=BDHcUQSNa1S0BCOI9hvVcHxRA8beiJyH0ZTyLXXOohY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TIVwER6vXkvT1NTOlx603d2hdnRik3f8qV8xBafOfr4Yf1hGnDHvBfPPRrDgXSxvX FvQQDoRA0X440BU5+A1O9C+C+1qKQOITQ5w7qN7mr7WAD+InnZ3lQU+5c00RE6Qy6X gK3A3XcnQCA4A5l3lXz1ReNrUi+K9fJ54acOUe3k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Varghese , Paolo Abeni Subject: [PATCH 4.14 201/284] openvswitch: Fixed nd target mask field in the flow dump. Date: Mon, 18 Apr 2022 14:13:02 +0200 Message-Id: <20220418121217.441844751@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Martin Varghese commit f19c44452b58a84d95e209b847f5495d91c9983a upstream. IPv6 nd target mask was not getting populated in flow dump. In the function __ovs_nla_put_key the icmp code mask field was checked instead of icmp code key field to classify the flow as neighbour discovery. ufid:bdfbe3e5-60c2-43b0-a5ff-dfcac1c37328, recirc_id(0),dp_hash(0/0), skb_priority(0/0),in_port(ovs-nm1),skb_mark(0/0),ct_state(0/0), ct_zone(0/0),ct_mark(0/0),ct_label(0/0), eth(src=00:00:00:00:00:00/00:00:00:00:00:00, dst=00:00:00:00:00:00/00:00:00:00:00:00), eth_type(0x86dd), ipv6(src=::/::,dst=::/::,label=0/0,proto=58,tclass=0/0,hlimit=0/0,frag=no), icmpv6(type=135,code=0), nd(target=2001::2/::, sll=00:00:00:00:00:00/00:00:00:00:00:00, tll=00:00:00:00:00:00/00:00:00:00:00:00), packets:10, bytes:860, used:0.504s, dp:ovs, actions:ovs-nm2 Fixes: e64457191a25 (openvswitch: Restructure datapath.c and flow.c) Signed-off-by: Martin Varghese Link: https://lore.kernel.org/r/20220328054148.3057-1-martinvarghesenokia@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Greg Kroah-Hartman --- net/openvswitch/flow_netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/net/openvswitch/flow_netlink.c +++ b/net/openvswitch/flow_netlink.c @@ -1827,8 +1827,8 @@ static int __ovs_nla_put_key(const struc icmpv6_key->icmpv6_type = ntohs(output->tp.src); icmpv6_key->icmpv6_code = ntohs(output->tp.dst); - if (icmpv6_key->icmpv6_type == NDISC_NEIGHBOUR_SOLICITATION || - icmpv6_key->icmpv6_type == NDISC_NEIGHBOUR_ADVERTISEMENT) { + if (swkey->tp.src == htons(NDISC_NEIGHBOUR_SOLICITATION) || + swkey->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) { struct ovs_key_nd *nd_key; nla = nla_reserve(skb, OVS_KEY_ATTR_ND, sizeof(*nd_key));