From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine 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=YCatLHS5; 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 4CA3F5A0272 for ; Wed, 16 Apr 2025 16:27:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1744813671; 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=StpymIgbDUCG+pEQkdb5yv02BAjrgowzl5qnOxWNK3E=; b=YCatLHS5OZFLc9mBCBMQIl+uW545xV30r6S8yVb0DsuyBw7cfP1HUSa9k6iTIhYXalIPeG zzEiLq4KIwuN389527LsXCrrZmKZJhpgs9ozLaMBECgQwcj8DDHKht6mKM+v3sS4R7JVrs VDFHQN+sw5KPlZvSE7X5r2IrcTlE5LE= 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-321-b8Qh4rZqOHqN1yt2qvsr3w-1; Wed, 16 Apr 2025 10:27:50 -0400 X-MC-Unique: b8Qh4rZqOHqN1yt2qvsr3w-1 X-Mimecast-MFC-AGG-ID: b8Qh4rZqOHqN1yt2qvsr3w_1744813669 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-39130f02631so2893808f8f.2 for ; Wed, 16 Apr 2025 07:27:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744813668; x=1745418468; 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=StpymIgbDUCG+pEQkdb5yv02BAjrgowzl5qnOxWNK3E=; b=MGnxl/aQEd10yRQhRh8wJOjHpt/4sBY+xebzt3A3t3EK8S5zf2zmdvpj6zPeDWT9DY Mg62NebLVYKl59+kEmpmD6APD6AjUSJjV3zvZ8USVOOT952wDuIPnvn9Z9IE8KDud9Nv jcpbAjOStsOzLHBY/eR+NBhyCLYvbUxbywJiee8Atsx1HCxCoPz9NG2HypPDmeYWGF94 El2WSvvDOPHS4rbmYx4MXlYmPZnXUnj8qB3AUwGPG6Ybwl5SkJ6W4irY8P9Wg2VOjozS jT6YL1ouFajwztwYQxjB8TC1zoGfMxKUf01Lc+6qKAnJFsm3pXn6T7eOuH4PcFHRf/kz 0cqA== X-Forwarded-Encrypted: i=1; AJvYcCVv8xxEXGQigJPtivkJUJaxJYKjoggasNsF6HdnTOukma/x2fKnqpHfavT4/jIBmSGrhMno+rd6nzM=@passt.top X-Gm-Message-State: AOJu0YzQ9u21P/0BkqQ7jEo/IVYLO9wx8un8Ra3LXNCjxZHgkOlJeYej 1UpYpEerdUOREoDeiWQM5DlZhJ+eFwO3PNvLi2jrCbd/FxXgAm+pacD6xSXvhtB/djTiQRXa+n8 I/muz11LuB1HfPJweY4+3YAG3c/zPrfr8I8OspjmwaRfBuUglPAjQCVssnQ== X-Gm-Gg: ASbGncutRu/svRI1PzlFI6dDlwU/n0Yq9Tw13hGU2loMLEdk31su8BYP4Y4b2/O7agM VXkfRWCN3dtsOiY0g9XnekAS4Wxrh7kQFL3ldIRBIWpAN16wBmc1IoMTYEgBTZZ5ynvV4S1/+rc dPjizTXxEIaCsQqfSxQwP9lGhTkzqf9rS39rwS3+1navOFv3jpoArNOp3HEBhe26/AaHyo5Xz0G w+m7jZJMaxsv64Gt7K+nuhUEyInDXnIZoLZIehVSeFJVRStQ00816VfIUpF2xrYYlrCvF7EWyBe 9wfsGplkyLii8l8RF9l0tk8= X-Received: by 2002:a5d:5889:0:b0:390:e1c5:fe2 with SMTP id ffacd0b85a97d-39ee5b9f015mr2067112f8f.38.1744813668110; Wed, 16 Apr 2025 07:27:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH+pkqwi+mVKyWiBWA2TkjvtZsPbuMsHQyVeGS9229af0sgV4EG/Mxg2BLgKVRGhNNV7E+S+Q== X-Received: by 2002:a5d:5889:0:b0:390:e1c5:fe2 with SMTP id ffacd0b85a97d-39ee5b9f015mr2067086f8f.38.1744813667773; Wed, 16 Apr 2025 07:27:47 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39eae96c123sm17830952f8f.36.2025.04.16.07.27.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Apr 2025 07:27:47 -0700 (PDT) Date: Wed, 16 Apr 2025 16:27:46 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 0/4] Translate source addresses for ICMP errors Message-ID: <20250416162746.5fdaa466@elisabeth> In-Reply-To: <20250416090707.393497-1-david@gibson.dropbear.id.au> References: <20250416090707.393497-1-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: oSu3uw0KAm6TifYu-MWpnsY-EgAr9Qi_3YIzuvX2y4U_1744813669 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: UT56UXEFUVE4ZSFZQBN2NWPE6AZ5IJV2 X-Message-ID-Hash: UT56UXEFUVE4ZSFZQBN2NWPE6AZ5IJV2 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: Jon Maloy , passt-dev@passt.top 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, 16 Apr 2025 19:07:03 +1000 David Gibson wrote: > We now propagate ICMP errors on UDP flows back into ICMP packets on > the tap interface. However, we don't always get the source address > right for the synthesized message. Because ICMPs can be generated by > intermediate routers, that source address might not be one of the > endpoints, so the address translation we already have isn't > sufficient. > > Implement properly translating ICMP addresses when we need to. This > ended up a bit messier than I hoped, but it seems to work. A simple > case to test this is: > > pasta --config-net --map-host-loopback=172.16.1.1 -- \ > sh -c "echo hello | socat STDIO UDP4:172.16.1.1:10001" > > where 10001 is a port where nothing is listening on the host. Oh, that's convenient. I also checked this against the "bad resolver address" case I reported previously, everything "works": # nslookup passt.top 169.254.1.1 ;; communications error to 169.254.1.1#53: connection refused ;; communications error to 169.254.1.1#53: connection refused ;; communications error to 169.254.1.1#53: connection refused ;; no servers could be reached Except for those few comments to 2/4 and 3/4, everything else looks good to me. -- Stefano