From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Greear Subject: =?UTF-8?Q?Re:_veth_regression_with_=22don=e2=80=99t_modify_ip=5fsum?= =?UTF-8?Q?med;_doing_so_treats_packets_with_bad_checksums_as_good.=22?= Date: Fri, 25 Mar 2016 15:23:01 -0700 Message-ID: <56F5BA45.2030706@candelatech.com> References: <56F463D6.7080406@candelatech.com> <56F4810A.9060904@candelatech.com> <56F49036.8050902@candelatech.com> <56F490B2.3090603@candelatech.com> <56F4BFF1.8010806@candelatech.com> <56F4C8FD.7030907@candelatech.com> <56F5A618.9070206@candelatech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Cong Wang , netdev , Evan Jones , Cong Wang To: Vijay Pandurangan Return-path: Received: from mail2.candelatech.com ([208.74.158.173]:43703 "EHLO mail2.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754273AbcCYWXE (ORCPT ); Fri, 25 Mar 2016 18:23:04 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On 03/25/2016 02:59 PM, Vijay Pandurangan wrote: > consider two scenarios, where process a sends raw ethernet frames > containing UDP packets to b > > I) process a --> veth --> process b > > II) process a -> eth -> wire -> eth -> process b > > I believe (I) is the simplest setup we can create that will replicate this bug. > > If process a sends frames that contain UDP packets to process b, what > is the behaviour we want if the UDP packet *has an incorrect > checksum*? > > It seems to me that I and II should have identical behaviour, and I > would think that (II) would not deliver the packets to the > application. > > In (I) with Cong's patch would we be delivering corrupt UDP packets to > process b despite an incorrect checksum in (I)? > > If so, I would argue that this patch isn't right. Checksums are normally used to deal with flaky transport mechanisms, and once a machine receives the frame, we do not keep re-calculating checksums as we move it through various drivers and subsystems. In particular, checksums are NOT a security mechanism and can be easily faked. Since packets sent on one veth never actually hit any unreliable transport before they are received on the peer veth, then there should be no need to checksum packets whose origin is known to be on the local machine. Any frame sent from a socket can be considered to be a local packet in my opinion. That is what Cong's patch does as far as I can tell. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com