From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E82D0C43334 for ; Thu, 23 Jun 2022 00:19:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234393AbiFWATe (ORCPT ); Wed, 22 Jun 2022 20:19:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbiFWATc (ORCPT ); Wed, 22 Jun 2022 20:19:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1EB741612 for ; Wed, 22 Jun 2022 17:19:31 -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 4105F61BD9 for ; Thu, 23 Jun 2022 00:19:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73E29C34114; Thu, 23 Jun 2022 00:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655943570; bh=56uf5hhy4IJUI6zIFVaQrnUyrP9UkMLOj9+QhxodRMk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=V4wWaB1mwwfQlXRiKJMxJ4XVnpUspN6BRm/Ryi4+q/sr8WWKydI4XVCifpYP+Ckk+ rKODlJIh8eZ5eXLXk/HY1DRVSg3MH2upTsF2jVAkEYqMmOFdbyRm0Ac2nd8Kgz3twy hTIp4NMeh/6vftXJaFujsBHvA1dpLhAio00So2XBv3lm6qfbf6o9J6hIqMhm/G31vD y8Rgf1NHm2TW01SKbZiU8sT+qJaugZt2KYOUOEIWSDL7s2s9Ann4/aeRtpOYm3oXbL xPP/9HzwbAbC9lOlqKsWR5/TmfD++Bjxv8/BRM4M/uOISD8qiSX/DK30xII3h5UEwl l+juS1Bf5YdIA== Date: Wed, 22 Jun 2022 17:19:29 -0700 From: Jakub Kicinski To: Aleksey Shumnik Cc: netdev@vger.kernel.org, kuznet@ms2.inr.ac.ru, xeb@mail.ru Subject: Re: [PATCH] net/ipv4/ip_gre.c net/ipv6/ip6_gre.c: ip and gre header are recorded twice Message-ID: <20220622171929.77078c4d@kernel.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 21 Jun 2022 16:48:09 +0300 Aleksey Shumnik wrote: > Subject: [PATCH] net/ipv4/ip_gre.c net/ipv6/ip6_gre.c: ip and gre header are recorded twice > Date: Tue, 21 Jun 2022 16:48:09 +0300 > > Dear Maintainers, > > I tried to ping IPv6 hub address on the mGRE interface from the spok > and found some problem: > I caught packets and saw that there are 2 identical IP and GRE headers > (when use IPv4 there is no duplication) > Below is the package structure: > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > | eth | iph (1) | greh (1) | iph (1) | greh (1) | iph (2) | greh (2) | icmp | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ What socket type is the ping you have using? > I found cause of the problem, in ip_gre.c and ip6_gre.c IP and GRE > headers created twice, first time in ip gre_header() and > ip6gre_header() and second time in __gre_xmit(), so I deleted > unnecessary creation of headers and everything started working as it > should. > Below is a patch to eliminate the problem of duplicate headers: > > diff -c a/net/inv6/ip6_gre.c b/net/inv6/ip6_gre.c The patch looks strangely mangled, it's white space damaged and refers to a net/inv6 which does not exist. Could you regenerate your changes using git? git commit / format-patch / send-email ?