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=WFImfl4/; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 4D5505A0626 for ; Thu, 20 Feb 2025 17:08:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1740067712; 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=Qt6WUIaVnEqox6GIl5EAqOr2DOFCa+WFEwhf01PQ2ek=; b=WFImfl4/U2GHfWpw3DxUu/4MC78BR3YihOwKwzdlSmVgpcyRR1Wio5Uo9r/sTynebSwK5f ip1gWWWAovE8VpYDQRgTkQ56jD40wx3RRzCWocEXAWrCThC6DkDfbR/xOqLvNsWsUDRphh h5MAA5kSFNSfmyLWQiMTt6UorBqrQfE= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-482-1mzuK5UtOker6WFJDoASyw-1; Thu, 20 Feb 2025 11:08:30 -0500 X-MC-Unique: 1mzuK5UtOker6WFJDoASyw-1 X-Mimecast-MFC-AGG-ID: 1mzuK5UtOker6WFJDoASyw_1740067710 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-6e66c406bb4so20850736d6.0 for ; Thu, 20 Feb 2025 08:08:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740067710; x=1740672510; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Qt6WUIaVnEqox6GIl5EAqOr2DOFCa+WFEwhf01PQ2ek=; b=lIItS+Jx734GUrMbMh8GzMG4GE80VFuoznWUJWFZEgY9ooNjpBwe3oR652BJRUUk3H qpdepvJ37+fHYPel9ZIzYNMrssVkDIFCTQXxMpYx457HYcRjGMpjNa/gbyelWSMa37mG KdXEEbogNh8Lbwmr1UUSvbjXH1+v5a4gTVAgpAhha63yuGDeKB5XmgQi7pYxhC+f403e laFpKEFvieSiuIE9kYG+5ZjUzfWgx265UHiS57SqtrJq/BoNHUkaZSfewesXiFS8EcZ6 JvtBN9h8jpvwhFReJeY89f/lQJMfQv3k2hqTkTG58u1IdprkV8uN7BIx6p8cNtcryx5n AZuQ== X-Gm-Message-State: AOJu0YzJMvS486xeu0QaRB8Td43cT5iYaAtYO49irvgd2/Fk/yKQ1d2l J4613uzv3pZwUwXnMQKtq/v2omwCrRZMSh9hM+cNDmgBTgm6qBp9DXPEdVX8FUBAmHzmnUjtGUU DRlfN8eWzD+runwUJIaYTwbJX5IJBfuDWw9EGQlb6kTMho0NciA== X-Gm-Gg: ASbGncvXU8bTvvtH64AwsqX6hTN1qAy5gRNkkVARtpfLXASYIjD6TuBud5Jq1XsjwT2 Qf9SHAeeAzqmcnxAaQ9lXNWkhhyTqjtiyh6lgcdAqFIXDuCfA6lVqF0G6+6ucq1HEYE1iC+oWLZ rKvHRVUc3yz3ksjslxZ7c84ragcfGDEdxvuxXR+kIzdsbD+qbbkDgxIibwIHT3o2cBstzVZsVmk 74JgkGktPN3roCA0FWVpMwU7KiAcc8FNzHatIbahm1LBjcF6bFj1NkAVa0Gf5LZ+VIGK25gPOF1 goc= X-Received: by 2002:ad4:5aac:0:b0:6e4:5971:135d with SMTP id 6a1803df08f44-6e6a26396a4mr57216286d6.18.1740067710305; Thu, 20 Feb 2025 08:08:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFz9siGI7tI4AxC0248KnLnzvidMuXTlyqz+nmDFf+97OcUaN04gngiE/ZEhDnLLV+7rDKdIw== X-Received: by 2002:ad4:5aac:0:b0:6e4:5971:135d with SMTP id 6a1803df08f44-6e6a26396a4mr57215676d6.18.1740067709879; Thu, 20 Feb 2025 08:08:29 -0800 (PST) Received: from [10.0.0.215] ([24.225.235.209]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6e67ac30bafsm49822766d6.111.2025.02.20.08.08.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Feb 2025 08:08:29 -0800 (PST) Message-ID: <1552ddef-b61f-4754-9990-e3c0d28b3782@redhat.com> Date: Thu, 20 Feb 2025 11:08:28 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/2] Reconstruct ICMP headers for failed UDP connect To: David Gibson References: <20250219193007.2336670-1-jmaloy@redhat.com> From: Jon Maloy In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 04f1Svn__R7pjLJ3M77F3nQuI-7pOvLIvs4KVenl9kw_1740067710 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: DRRZLTVJ4IFQBFIRNIXPT5H4OLOKDZGU X-Message-ID-Hash: DRRZLTVJ4IFQBFIRNIXPT5H4OLOKDZGU X-MailFrom: jmaloy@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, sbrivio@redhat.com, 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 2025-02-19 22:47, David Gibson wrote: > On Wed, Feb 19, 2025 at 02:30:05PM -0500, Jon Maloy wrote: >> Reconstruct incoming ICMP headers for failed UDP connect and forward back >> to local peer. >> >> v2: - Added patch breaking out udp header creation from function >> tap_udp4_send(). >> - Updated the ICMP creation by using the new function. >> - Added logics to find correct flow, depending on origin. >> - All done after feedback from David Gibson. >> v3: - More changes after feedback from David Gibson. > [...] > "listening" socket. > > The only way I can see to fix this would be to create connect()ed > sockets for both ends of a flow when we establish it. I _think_ we can > have the listening and connected socket concurrently (at least with > REUSEADDR) with the connect()ed socket taking priority when it > matches. > > However, it does have a complication: there's a brief time window > between bind() and connect() on the new socket, when it might pick up > packets that should go to the original listening socket. We'd need to > decide what to do with that case. > > In any case, it kind of looks like there's not much point trying to > handle error events on the listening socket (beyond a debug() > message), since I'm not sure such events are ever delivered. > I eliminated the handling of listener sockets ICMPs in my latest version. I can create a separate connected socket in a separate patch, if you agree that is the way to go. ///jon