Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3422501pxf; Mon, 29 Mar 2021 01:37:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoOOr56i0dII/LmrGPSlh3kbqZ47QdWVO4ZegyDoVIE3f9oWlluL8GGYt7yBZtLycMVC4r X-Received: by 2002:aa7:d5c9:: with SMTP id d9mr28475465eds.102.1617007023166; Mon, 29 Mar 2021 01:37:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617007023; cv=none; d=google.com; s=arc-20160816; b=SpFXQUsZqhRqmXVZTviC4uWBFW4Q79IOlz3d6emlHBS0aiXa3vwFvfuLNj0dL7FUGv vSwqx0XUwlAvYDVhVlGGBaCw8q8pHPRadkuC4r+n6drQvXWAGUtk0OrbM/tAdUpbJZbs SHKmZWt2iXzv1Led3buhydmWXIwRu70p4LDF2QsdqDyF+4aX/7iw83R00TNKin3QnxW7 qOSP5QqlKrakVYQ9RNiE0eQdGFzrN8LQs19Dy2C7FI04xFgbFemwSY8YbYPy6GCEhSZN YnKoc84gphsT3PJsTQZU+VlgsLNt6l4O5r9Mm3q0YFfoLL4V2KL7R7sh3F+guL9+WGn8 mtHA== 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=amksXZ53VFgeNU5Sg61gLZ4DmyuLPFhd6eJGhgclz/I=; b=SIRrB1mKEXauyKldB1ncsNC9UDuUoe15zxh2ipXT81LdGpwpSuSBpKseJFuWwGAkq9 Zz7QA/3YVVtMf0BCEGfQiyaWzfrkXOz8NJpbS+0Z7rhCIldp0MACLUen5fBzp/qPtqGH Bh/YinGifJkkRm5cimEZO0/wyY3cqqJ3l0LV2XaEXsPxSnR5zAzAt5SrGLlZfaD6tIbT XvLF5UNt7ljx7bryDu3JwGKbee+v1XNcefw5etus+JlOpsGJyTtsMm1Wgcv0dsPxZ/Yj 73TyGEn24WfymodA/V3C2yNk94DXzxblHVhx3lXKI4+A7BvtA608KRk1UMZQiqpDBvFM zwVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1VKs0EU9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si11529919ede.535.2021.03.29.01.36.40; Mon, 29 Mar 2021 01:37:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1VKs0EU9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233339AbhC2IfW (ORCPT + 99 others); Mon, 29 Mar 2021 04:35:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:37726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232783AbhC2IVg (ORCPT ); Mon, 29 Mar 2021 04:21:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 32BEA619AD; Mon, 29 Mar 2021 08:21:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006095; bh=Ba2NuJZImjH+3+wF82eeJX5QAvlo61T8r251thgToK4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1VKs0EU99bAWdkEyAnVe/eXGh3m433V7akx64G0F1r8y9xrYBCnDl9aKTekZNjPMW NXH27I6Q3MUVDPZg9YWjwra9JBj8a5xi4kfDCWDwFG/IbhQF3XgDhB3yUNqi9l3FfM WVr4T44WU5HHQ+PFBmII+IV8Ud8bJ3L7079c/FbA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Lobakin , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 117/221] flow_dissector: fix byteorder of dissected ICMP ID Date: Mon, 29 Mar 2021 09:57:28 +0200 Message-Id: <20210329075633.109415926@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Lobakin [ Upstream commit a25f822285420486f5da434efc8d940d42a83bce ] flow_dissector_key_icmp::id is of type u16 (CPU byteorder), ICMP header has its ID field in network byteorder obviously. Sparse says: net/core/flow_dissector.c:178:43: warning: restricted __be16 degrades to integer Convert ID value to CPU byteorder when storing it into flow_dissector_key_icmp. Fixes: 5dec597e5cd0 ("flow_dissector: extract more ICMP information") Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/core/flow_dissector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index e21950a2c897..c79be25b2e0c 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -175,7 +175,7 @@ void skb_flow_get_icmp_tci(const struct sk_buff *skb, * avoid confusion with packets without such field */ if (icmp_has_id(ih->type)) - key_icmp->id = ih->un.echo.id ? : 1; + key_icmp->id = ih->un.echo.id ? ntohs(ih->un.echo.id) : 1; else key_icmp->id = 0; } -- 2.30.1