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=AJ/wWwlc; 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 C20625A0269 for ; Wed, 15 Jul 2026 09:11:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784099484; 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=Eo67lat8RPC4Yezi+fwm0r99Xst6SKrlR1SJ2AAFSAc=; b=AJ/wWwlcEfFJjClbPdyhtU6Dvzud/qwqeAXykDh33impdbacBM2jb1LALCLsdmxAqpb/wH NFbZAhn7udmNflyceqy8KygwozfRT5GnEHf8g/uEZf/0hr8HElqCLkEDq8AfRMWorjy4Hg LEziPmKuP+C3fslEZ4GVEx2mRXWK7Ps= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-664-garBcuDIPDiRH3BNKJzYeQ-1; Wed, 15 Jul 2026 03:11:22 -0400 X-MC-Unique: garBcuDIPDiRH3BNKJzYeQ-1 X-Mimecast-MFC-AGG-ID: garBcuDIPDiRH3BNKJzYeQ_1784099482 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-493bdaf8549so48632845e9.2 for ; Wed, 15 Jul 2026 00:11:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784099482; x=1784704282; h=date:content-transfer-encoding:content-type:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=Eo67lat8RPC4Yezi+fwm0r99Xst6SKrlR1SJ2AAFSAc=; b=MGngW0kxTaiRk3q8uBqyQqO0OOKkAtGY22vGiknxtuGnYMx63JB45hWcfBcAa0tW7m wSxhFTb0sEzXzJRIYosqoiOpBVA/vg2nAjAWk3WWaYg/BsBIs/HkSMvkudllI2FN5k9v u6wLPA7Vty6xdxWI4zbinW7tzE7xxleyVOi+hVKqlimx+M/N4s4JZpakTcZpslKZ6dOI xtRh/yEuu1Wi//FC21Tw9js7yy0BmT2eWsVAg5gZixDv5vrS9bQpvWasuSwEti2mUw0O cKq6SvmEPUGV0w+Gt+qlXCulWCoeC56kmYYiT9OC6iw7IAl/hf+jc2+Am7BvhN5qIizO Krlw== X-Forwarded-Encrypted: i=1; AHgh+Rqdhs2obQATGZ5DfPa62/Lb8yB32a5nbW86eGTu3mpBkI4et0jF7R7eTSzxvrnGthbVu1LNTKj6MJs=@passt.top X-Gm-Message-State: AOJu0Yya2idgn2inE6wlpl97Unv+8wx+tIBOcP7152LEbYZXvwQAHR0a IflCoO4wCjiPhcWUcmOIUfpxggbXp+m9tivOGjJfz17MJ9jCr9oulk4083yOxx5JXXKJPJeQbk+ AoB9KMTEyopX9gJsVPAScU6/IW6psZRQznN97kPmRmShDwSGrJ7L2kg== X-Gm-Gg: AfdE7cnm45hy0XtRv2aLnZuUFwvB7/OpaRn9f0uD6DBOtSPSc+TkloX57jN6N3SnmA1 AK8Pu0OG1bq6QajHwIYuA6kkC+iNFSETYOzl9thvhePbcNMPNKkZCrCfTIu1fziLV3F3vStM+kO Re5HpfEquShDcD7bO4PejAR1/8bPVwtp/gkKy7KtZpta9Nn4WVC/M9LTVo01/1hJrKjMgOFPf+E hmrQE/tQYzBObC8pbRFKvKBbAxKJWB/TtBBYhl76sYGT/A39BHdFLkyWXOERfgGuCdvn3k/mWwx b345l8PHI59kjf7mA72aD/GfJRCQL6BY0QI+FNXVCVkr3X8WAEQWzWEEoU028jHxcWRGQ0Tm9DG /TMW22/FHiUTTyPCwt8/97h9w+VX4ApbadI8dsdc= X-Received: by 2002:a05:600c:4593:b0:493:cc25:85cb with SMTP id 5b1f17b1804b1-4953c14752amr17840985e9.8.1784099481541; Wed, 15 Jul 2026 00:11:21 -0700 (PDT) X-Received: by 2002:a05:600c:4593:b0:493:cc25:85cb with SMTP id 5b1f17b1804b1-4953c14752amr17840525e9.8.1784099480956; Wed, 15 Jul 2026 00:11:20 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508731fcdsm113202815e9.4.2026.07.15.00.11.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2026 00:11:20 -0700 (PDT) From: Stefano Brivio To: Jon Maloy Subject: Re: [PATCH v9] dhcpv6: Fix reply destination to match client's source address Message-ID: <20260715091118.6b584449@elisabeth> In-Reply-To: <20260710215833.1731937-1-jmaloy@redhat.com> References: <20260710215833.1731937-1-jmaloy@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Wed, 15 Jul 2026 09:11:19 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Rrq45j2XaI4_UHgihwrtyIa8ss1-OHofVVKvTBX3dA0_1784099482 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: M5VC44R5IFXV4II4DUZRSTKK26KKUOPW X-Message-ID-Hash: M5VC44R5IFXV4II4DUZRSTKK26KKUOPW 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: david@gibson.dropbear.id.au, 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 Fri, 10 Jul 2026 17:58:33 -0400 Jon Maloy wrote: > tap_ip6_daddr() selects the reply destination based on our source > address type (link-local), so it always returns addr_ll_seen. But if > the client sent from a global address, we would reply to an address > different from what the client is expecting. Since RFC 9915 (section > 18.3.10) allows clients to use global addresses for DHCPv6, we now > correct this, and always respond to the address the client was using. > > We also remove a redundant addr_ll_seen assignment, since this is > already done by tap.c when processing IPv6 packets. > > Note: if the client uses a global source address, our reply will > still have a link-local source, creating a scope mismatch. Fixing > this properly would require a mechanism to allocate a global address > for the DHCPv6 server, which we currently don't have. Responding to > the client's actual source address is still a net improvement over the > previous behavior of replying to an unrelated cached address. > > Note 2: This commit isn't actually a fix to an observed problem, but > rather an answer to a theoretical issue, adding completeness to the > mechanism and simplifying subsequent changes in this series. > > Signed-off-by: Jon Maloy > Reviewed-by: David Gibson > > --- > v8: -Updated commit log, acknowledging concerns expressed by David and > Stefano. > -Some minor changes also addressing feedback from the same persons. > v9: -Broken out of multi-addr series and posted as standalone patch. > No code changes. Applied. -- Stefano