Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp627484pxb; Tue, 5 Apr 2022 16:28:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2aMYq/ReBEOdLF2jVIzM1/yV0VIbFXiP3C3Z0pYvgnDalswV0RCIAya9+ICzVzVtKQc6j X-Received: by 2002:a17:903:186:b0:154:3606:7a73 with SMTP id z6-20020a170903018600b0015436067a73mr5808526plg.89.1649201288317; Tue, 05 Apr 2022 16:28:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649201288; cv=none; d=google.com; s=arc-20160816; b=JBCr6ZdX5lktdf9BgdYU4oSPc+C4ABm4OvxipGtvfmRtQNeU2C8e1HmOJVGjovwKO4 PTHAdTVpvYxFU3Scp0Sn3b//GpEeQb/81/tzeDcWzTOK8sm/soh2MDr5aCcMrIg8LIc2 xTZa0gMQI6Kq4sE1aAfqv7CioXk9s9dlwgruRCtY95bFsHdEViEXv7cmeKLdp2Og94tw FOvBILB1YIF2ARLZ8pIdfF11PPOw0rsaHKLwGhV5Pt+2opbh69xUFJQQVlJ8OapgskJ4 n80d0KsJ5e8vWI+mg7BHax9UqbRHxloU8SSR/W5gBKi4T4naqIjVbQUO86TZlSbQuyIG XM1A== 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=ongGksbewz8NhvcQyzzNiFD8IhtI6BeBWhsrqeqLyL8bHuK5yrA7t40SzoORGAXoLu MrAWlkDLZG3iXNs4RHgK16181chF2JhxUaIHCfYD9z22hSq6xCVGoBz0yMMk9YU3TlrI DxYkPHEF7XDSbw9QwX/3AeDqNBFPuEBerk/hAuGt3w+MdoGjxLr2uefVD2qUe4zumeNH JsRbKFpspDA80Qo02z+bNKmJ+igLYdVobjV4Dg0YSkBNgxOUvou3S4CPhsGBw4IUpocI uI+9hkFrOm0fpjyHX3wKwze6rR8Gq+2gdwWgje1lco3dSneYJ+3s2akf68tuaSD8s6AH 9/SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=f0y0wWQB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n7-20020a635c47000000b003816043ef09si11651090pgm.254.2022.04.05.16.28.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:28:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=f0y0wWQB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 BA73FF8969; Tue, 5 Apr 2022 16:11:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345656AbiDEONu (ORCPT + 99 others); Tue, 5 Apr 2022 10:13:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235975AbiDEJbC (ORCPT ); Tue, 5 Apr 2022 05:31:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 982011CFF4; Tue, 5 Apr 2022 02:18:13 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 34951615E5; Tue, 5 Apr 2022 09:18:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C86BC385A3; Tue, 5 Apr 2022 09:18:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649150292; bh=1Y2tJszXJ8mM7Vg/4Mf9uvXQFr8vz3unAZ/gygB5MPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f0y0wWQBSoWJWmwSej2C87HjSfmMkBJtPajXrb9CvkDzNMeIsPzKZ/gHoVv38lhzU G8fPnLVmEM8VJ0zEV+xeDbPopM95Y+Xpx7Q3SqzxXl7A1njhrUeB30uNFeGmj7k/vC 28uSBIHk/nT4ynYq7RZmCyrJ5jbUFIgQm6kKXEz8= 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.16 1007/1017] openvswitch: Fixed nd target mask field in the flow dump. Date: Tue, 5 Apr 2022 09:32:00 +0200 Message-Id: <20220405070424.091516766@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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));