Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1010747pxb; Wed, 6 Apr 2022 06:39:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxURMu8mIvNRj+NCbMLfQuGkVtyFE9hdgmEWIdPBfdFX12XzhNZOE2CBiaFxQ1ryoGiAIz+ X-Received: by 2002:a17:902:d4c6:b0:156:78c:8486 with SMTP id o6-20020a170902d4c600b00156078c8486mr8804423plg.85.1649252385462; Wed, 06 Apr 2022 06:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649252385; cv=none; d=google.com; s=arc-20160816; b=plFIvK+bkSYPIKxeOp+qbv/AA+6UOl+davgxDRvO60x1lY515xPtuuc0Qi0eHYkf+1 32wdMBha8hSvRBv65Tnc5r/nekhoAlLxx7A1vX07zl1u72a43MMhZo1dgsSzfYN/Nvai OFKiZVoMeDLXHhQwdyOGtB1/6sRswPGSp9RPIqnIsOM8ykavsM32oM0FFkaeKkFc9+Qu mXZc5cFUNZcALFsUl3VK6BFTljywX7cIPGxa9OfIpNfSOLSLpQsRvt+BvxkfZm9G5387 PzmwUNr74TD61csh8/RCnuZFAvC082aiaRhLW+22eg+akwbPOJURC5kXunMvpFvPq662 773A== 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=K/ktlKWN1np35Sc+te1VUwZmRJiBHTgjgDO8BdJgftk=; b=wZb+GI/+ep7mBgaftSBOGkIJ+SyLNzKj5wbs1FBayOTmo6J4Zv2AYGJdJVhksfGDbb ZNFCCtnPPb0GqQ+oQdFvZiOSrWMLRMJJ7R4PEyLTXI249rWnykgEBlq/xnkusbmGXfka dj3SaLHAy8H2PUlrbHQgnOEuX3LN2DCUhJBi4ttfnbSRb7alhpizkIoStnYmLidGpkXO qje0dLwCovjoUg7o4KqmGSAnr1xD23KJhQM8mtzVnyBDX2a7o47eGgWQCEEtU+b8QLpJ A0WqCCbYepvsUw8aBftpDGS7/dHTHSpN8t9Sm7VMdyWj+uPH1RJCTIU37d0ixC83IEtM nL9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FQ0X5md+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b13-20020a63714d000000b0038295fbcb98si18453548pgn.247.2022.04.06.06.39.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 06:39:45 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FQ0X5md+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 75B4F55F35B; Wed, 6 Apr 2022 04:25:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1389181AbiDEV6x (ORCPT + 99 others); Tue, 5 Apr 2022 17:58:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354387AbiDEKOA (ORCPT ); Tue, 5 Apr 2022 06:14:00 -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 443856C91A; Tue, 5 Apr 2022 02:59:43 -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 E3CF7B81C86; Tue, 5 Apr 2022 09:59:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5907CC385A1; Tue, 5 Apr 2022 09:59:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152780; bh=1Y2tJszXJ8mM7Vg/4Mf9uvXQFr8vz3unAZ/gygB5MPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FQ0X5md+nJs0B8cqsnJW0l13TpKPlZOl2RtKGejqDHvF3Eqjtru/j/PBgW1/nCLtK t2/H5Lpk7CR00iO6i8NxM2pitUh2hvxJlUyuVuumgSPuRtCfKh8WMTPyv6r3zFby5c 7B08kapqxH+mCEUSMW0A+QV8JSQ7KoGNs9+qOXPg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Varghese , Paolo Abeni Subject: [PATCH 5.15 899/913] openvswitch: Fixed nd target mask field in the flow dump. Date: Tue, 5 Apr 2022 09:32:41 +0200 Message-Id: <20220405070406.767887542@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 @@ -2201,8 +2201,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));