Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1015492ybc; Sat, 16 Nov 2019 13:06:49 -0800 (PST) X-Google-Smtp-Source: APXvYqx37XoxWcpjRqQDs9a7+H7QjwAKlfSfkJ9MiGzEh+b6l+6h/fD2w0/wnXHEaqIZfn3abEJs X-Received: by 2002:a17:907:426e:: with SMTP id nx22mr12363973ejb.139.1573938409485; Sat, 16 Nov 2019 13:06:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573938409; cv=none; d=google.com; s=arc-20160816; b=tbzwU4Ibh6esY5WcfNEfxCwK2h0eEDFIahdF42Cjw1IR7gnoGXEmVQ+oKngAnoKodD UBeFSQjU0VI+oLfogmgJw7PHYCwMMvaxCvpiV626EShuwK67XYHm9lbR2si6K8mhrGZR X2WqzzYgGehjIXu0oVKOyEjoGpb0hzDxIAYn4F8QHt3KOoqI7PVk7NPWEvCS2ydQIbJF DN4C095lOPFPQmK4gcUVTzPo5XpKuugRcz0zLa8UCGS3JImB9WqlSem4so5uWB6Dl4HI LrZoU6wReB+RJ4GYwATihhISiVvwzn9x/8FdAil976T6wicB+KSSJ98hwM+OoJ8ldvpD c/QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=2HzpGg4cSFf/LLuEJ8TpA/61aiQEWclLf4qEyPA4wBM=; b=uMMRu6UHJYPxlWzXppokGFkMzKyCcvUxPcVHnCpo/2wItm/1DvLJK4PH+MAQq3Xx6S ihV4I2qeDpIYA1U/zNmK/02pwYNgxShWvy4nv2hxcW2aqqaIG8cZg0zbw4pWbL7RVDCK e/d7pW2LeT/PArVjj1gNwOgJpNumzuj1roGyU8sxh43xX8pGNpwKlARkX+zqGJSTiVLq aJJ7Nh8t27PxXvEjlseaNk/Tva2NpSjrXib5IIbauyRaKUqhSNXrm0jwOofm6ZM1ZSst WkFmaW/7mZABWOUuLzr4SuRwIlAsaudA/KEJLcoRZ9ulo6wPy/JPnfqLd7FUpFfcWv1y fXkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oy7si8376901ejb.417.2019.11.16.13.06.25; Sat, 16 Nov 2019 13:06:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727800AbfKPVDN (ORCPT + 99 others); Sat, 16 Nov 2019 16:03:13 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:53796 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727505AbfKPVDN (ORCPT ); Sat, 16 Nov 2019 16:03:13 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:1e2::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 70772151A15FC; Sat, 16 Nov 2019 13:03:12 -0800 (PST) Date: Sat, 16 Nov 2019 13:03:12 -0800 (PST) Message-Id: <20191116.130312.1715585977428653229.davem@davemloft.net> To: mcroce@redhat.com Cc: netdev@vger.kernel.org, j.vosburgh@gmail.com, vfalico@gmail.com, andy@greyhouse.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] bonding: symmetric ICMP transmit From: David Miller In-Reply-To: <20191115111037.7843-1-mcroce@redhat.com> References: <20191115111037.7843-1-mcroce@redhat.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sat, 16 Nov 2019 13:03:12 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matteo Croce Date: Fri, 15 Nov 2019 12:10:37 +0100 > A bonding with layer2+3 or layer3+4 hashing uses the IP addresses and the ports > to balance packets between slaves. With some network errors, we receive an ICMP > error packet by the remote host or a router. If sent by a router, the source IP > can differ from the remote host one. Additionally the ICMP protocol has no port > numbers, so a layer3+4 bonding will get a different hash than the previous one. > These two conditions could let the packet go through a different interface than > the other packets of the same flow: ... > An ICMP error packet contains the header of the packet which caused the network > error, so inspect it and match the flow against it, so we can send the ICMP via > the same interface of the previous packet in the flow. > Move the IP and port dissect code into a generic function bond_flow_ip() and if > we are dissecting an ICMP error packet, call it again with the adjusted offset. ... > Signed-off-by: Matteo Croce Applied, thanks.