From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=IHP9nnNb; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id B47D95A0638 for ; Fri, 14 Feb 2025 12:01:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739530866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CPpsQzFmEP9wMRPjZOv/P0nOX31AAgL78qjuI9JtJ48=; b=IHP9nnNbm9PMvwy+v+qBVLA+pnBgG10vEXN16MmHhO/JJolCrg9+2QOh1UmahpT7nRJLHt AJOOsXzKTPf5zcVfs33g0Ik1fUbg3pXMLhUk+IapHxWitcC/jU/lzj0ta8nl5LbJJ+xLCz 3t85Ch0ehvOOQn2Yxqgi33x5Uka2pYo= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-417-BCEUy_mzPpu-zEAn9bWDaw-1; Fri, 14 Feb 2025 06:01:05 -0500 X-MC-Unique: BCEUy_mzPpu-zEAn9bWDaw-1 X-Mimecast-MFC-AGG-ID: BCEUy_mzPpu-zEAn9bWDaw_1739530864 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-38dd533dad0so1828628f8f.0 for ; Fri, 14 Feb 2025 03:01:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739530863; x=1740135663; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=CPpsQzFmEP9wMRPjZOv/P0nOX31AAgL78qjuI9JtJ48=; b=DSZ1n6+T9q2LDALFnaU7T0oPUqRmVs+DLHjv7MKYc6TbC6jD/7F8RNUSefdMmQZlWB Xtag8pH1TiZlegR39xOaRDlbB8JHHRMRoflACqnOhokHNBjfQfjYs+dnJ6xb6Kz1f1mM h9ItQ1tQyUh7JDIOUjl7l6DEE1xbPRhOXqpW+gjX+jiyPTxwQ6Vrv0gV6yOkCL0nBrVi DNBStAPUfgvdXkLjhKSI5qITP8pWyzshH8QzOpwnFlVAG1/4JWg46KH8DDVkFsSDQRcl jusfUFXQ5P9W7ZIkMVjPVomDFtekgBBKvfPqAuZfgzSsD+aSzWzycTSi8TzZHigBYYNa E+zA== X-Gm-Message-State: AOJu0YxERLfJKPRpfAbMHPrAqX3qP/mwroRVg1Tj7NBlIqq88E9RTXrY SVQ48g9DsTaGxGIV3t5AXAZWzJA6siLomodKcj2qfgn3s8DOsJ7KqdZ85pcO3EkhPNOZDQkYHrm jgbwa3jPqYJlEwi8yoIU6LWBbXdFnGGKj8MyyQR3aOOuQtlYyglYNpJqKYBcYqis6qUsCBuGHcB dH6naODbZ3Gd6zh9FqNtYepsTui5X4lh5q X-Gm-Gg: ASbGncu2ncAaz/ChHyzRH8ncmX9zHRuNcadewclY+ZeaMMXz9kwfabzsQphWizJ2e3X itKefCwifCYQyMsFkfNy+kun1GblUG49Uf3jUITSkzTJYSxhsJfZ9ZpMPhIFxbjP0TJKEv8HejN 28CGN0HmpeO/xu7WkJcZC+JLVmqcCjQoEiy8AivjAJdtuDmMIg6MVbPy+7XRLQoDwi+JxComqwT VfXOzW+yvGW9bD7pSKj2i2IOMPB/szoN6JShOCdUZkSQcgK8ZpUN17fk5kuENe5qfWM1LyjM8g3 FCslt8x4P856/2BR X-Received: by 2002:a05:6000:18a7:b0:38d:dfb8:368d with SMTP id ffacd0b85a97d-38dea2f76ddmr10856574f8f.50.1739530862594; Fri, 14 Feb 2025 03:01:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwrAwdkKaeJubrlpOfK8dUBLxQ6h2qmuespXAtpmfoe/iJFBfiVC9JuLtitMWMGUBpbYgmoQ== X-Received: by 2002:a05:6000:18a7:b0:38d:dfb8:368d with SMTP id ffacd0b85a97d-38dea2f76ddmr10856515f8f.50.1739530861950; Fri, 14 Feb 2025 03:01:01 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-439618a9970sm41113045e9.33.2025.02.14.03.01.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2025 03:01:01 -0800 (PST) Date: Fri, 14 Feb 2025 12:00:58 +0100 From: Stefano Brivio To: Jon Maloy Subject: Re: [PATCH] tap: always set the no_frag flag in IPv4 headers. Message-ID: <20250214120058.178c4fba@elisabeth> In-Reply-To: <20250212235023.391449-1-jmaloy@redhat.com> References: <20250212235023.391449-1-jmaloy@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: M68DhYSG1KsG4nbD9ohpkbLSghkAmdHBu-A62Y25JWQ_1739530864 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: XHR54VU72FBS4ZIFJCYWQW242AXA2RKT X-Message-ID-Hash: XHR54VU72FBS4ZIFJCYWQW242AXA2RKT X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, lvivier@redhat.com, dgibson@redhat.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, 12 Feb 2025 18:50:23 -0500 Jon Maloy wrote: > When studying the Linux source code and Wireshark dumps it seems like > the no_frag flag in the IPv4 header is always set. Following discussions > in the Internet on this subject indicates that modern routers never > fragment packets, and that it isn't even supported in many cases. > > Adding to this that incoming messages forwarded on the tap interface > never even pass through a router it seems safe to always set this flag. > > This makes the IPv4 headers of forwarded messages identical to those > sent by the external sockets, something we must consider desirable. > > Signed-off-by: Jon Maloy > --- > tap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tap.c b/tap.c > index d0673e5..44b0fc0 100644 > --- a/tap.c > +++ b/tap.c > @@ -153,7 +153,7 @@ static void *tap_push_ip4h(struct iphdr *ip4h, struct in_addr src, > ip4h->tos = 0; > ip4h->tot_len = htons(l3len); > ip4h->id = 0; > - ip4h->frag_off = 0; > + ip4h->frag_off = htons(IP_DF); $ tshark -r test/test_logs/pasta.pcap -V -Y frame.number==9 | grep "Header Checksum" Header Checksum: 0x07d4 incorrect, should be 0xc7d3(may be caused by "IP checksum offload"?) See L2_BUF_IP4_PSUM(). -- Stefano