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=hXi4Oxb5; 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 EE2A75A0262 for ; Sat, 20 Jun 2026 00:11:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781907084; 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=t++rHvmztta+CYfRUlj7sUqmj4vB4hAyCKwyy2BRFdw=; b=hXi4Oxb5tXBdX9oJV9RmZdxjBRMfN2FwmWFwMnpzZlSnokzIqLd7pNnXlBUhTZYCnn6IfR vt6S+yNZYIgzzqjBbTD/UUlTzAdDj1ps3lXbR0y3rMq6iBHFFJH+IzruG/nW3H1V60KZsj /ZRxqDAxpMuzTFDMy8/c4UxEkavDHK4= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-547-r8sFN8BFMNesijdoJtj-EA-1; Fri, 19 Jun 2026 18:11:22 -0400 X-MC-Unique: r8sFN8BFMNesijdoJtj-EA-1 X-Mimecast-MFC-AGG-ID: r8sFN8BFMNesijdoJtj-EA_1781907081 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-49244130073so5469805e9.1 for ; Fri, 19 Jun 2026 15:11:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781907081; x=1782511881; h=date:content-transfer-encoding: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; bh=t++rHvmztta+CYfRUlj7sUqmj4vB4hAyCKwyy2BRFdw=; b=fAbUv2SDFeY90TETWjWzPW2KTCd4JF2SZVLZvTtfUe3fnY9TP6kwd3zg89x8CzCN1y gFc8auRT7pzCIry96Ry7qjjIo+DNx4qe8TQiWlyum65waEOaylNpMBFj44997N9l/nLZ 6QCHDCnvOROrnVdCXHjqWHqiz2B+/PLgy3MmXJGqOz2B8HnoLbwbp+UW4JMPJVLmA0Rd bYWPJkEGa8uUSpqfJLD62RRxj1D2cLF26C38wh9OxoQnKZiT7gagf1Yc/+aB5vQR9ZBI WjV++0+UknejgUzPizOt3F5NcAHEg5EsVVT5W2Ky/8Cly9oT66mC/AqpJqGjdY5SG/Zh 6tXg== X-Forwarded-Encrypted: i=1; AFNElJ+yUHXlSP3qkYVgiW/GVjKTKGAczy+lAsdSMo0qE2IAIupl+VVDnkeMGu8rbIq0v/bI+MDhjSXlWLg=@passt.top X-Gm-Message-State: AOJu0Yx5zRmf0pv8X3igV9RepIJ2QDMSgb3iiU6MqETm6juOfqBNQ9l/ Js66K7LhKL8UjibAMOKdZnF+px9oRexzK+F6C9Jtd2IoTbjfwlP10c8I8jHr6p/66j52qJazuU6 mUkAY1+IqPp+/rYKmfCHFW/aB+ynPb9LiPOSVEWsPaty2m3Ed3i+faw== X-Gm-Gg: AfdE7clTg+ja3UBIKjosTHSTWN33LzLdEG75hNLYHu5VH0usIccP7ZTP9nOWMFjtWlp 4T1Jx5zg/yMh8ibo+NzS/an3xAFoGAFnCcVUjD8Nk4appRVDybw1FfEb9TPKopdbwnWiqch3zjy c6/HPWvXyx+3d8L9bfx4MUKH4AcoGHDmYOUfpafrxzU6XcWYfiJX8RVolEKbklwp2lAJRCHw4Gr TPniTLfTU8xfe8ZEnrpQLvK1mGv/oWfnTuo8SQJlv68Vnyf4wGluD2QNtS2TSP/w7CHSxWxN1Mu VaQaKsQfrjSq852E9f/nTko7YbtliKhdiMatlAsPkbW5cxU/odMN4SDr0vdqXaJ+4WX0GP/pPH9 Zbr+x8+y2R/rRb9WqznKhoTzC6TTrUu05Dp1+XPg= X-Received: by 2002:a05:600d:17:b0:492:4410:ec5a with SMTP id 5b1f17b1804b1-4924410eec0mr56041775e9.33.1781907081309; Fri, 19 Jun 2026 15:11:21 -0700 (PDT) X-Received: by 2002:a05:600d:17:b0:492:4410:ec5a with SMTP id 5b1f17b1804b1-4924410eec0mr56041525e9.33.1781907080906; Fri, 19 Jun 2026 15:11:20 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4924944fbbdsm16024695e9.12.2026.06.19.15.11.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jun 2026 15:11:20 -0700 (PDT) From: Stefano Brivio To: Jon Maloy Subject: Re: [PATCH v7 11/13] dhcp: Select address for DHCP distribution Message-ID: <20260620001119.4ae53687@elisabeth> In-Reply-To: <20260413005319.3295910-12-jmaloy@redhat.com> References: <20260413005319.3295910-1-jmaloy@redhat.com> <20260413005319.3295910-12-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: Sat, 20 Jun 2026 00:11:20 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 20YZ4fw-7dyIGGKr_Gd2PqLGIxNR9tWnuyhnGeZbpJg_1781907081 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: IJSD6OJULYIZTUITQ2NP3AGITNGNSSR7 X-Message-ID-Hash: IJSD6OJULYIZTUITQ2NP3AGITNGNSSR7 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 Sun, 12 Apr 2026 20:53:17 -0400 Jon Maloy wrote: > We introduce a CONF_ADDR_DHCP flag to mark if an added address is > eligible for DHCP advertisement. By doing this once and for all > in the fwd_set_addr() function, the DHCP code only needs to check > for this flag to know that all criteria for advertisement are > fulfilled. Hence, we update the code in dhcp.c correspondingly. > > We also let the conf_print() function use this flag to determine > and print the selected address. > > Signed-off-by: Jon Maloy > > [...] > > --- a/passt.h > +++ b/passt.h > @@ -83,6 +83,7 @@ struct guest_addr { > #define CONF_ADDR_GENERATED BIT(2) /* Generated by PASST/PASTA */ > #define CONF_ADDR_LINKLOCAL BIT(3) /* Link-local address */ > #define CONF_ADDR_OBSERVED BIT(4) /* Seen in guest traffic */ > +#define CONF_ADDR_DHCP BIT(5) /* Advertise via DHCP (IPv4) */ I think the name might lead to confusion, especially the day we get a netlink monitoring for addresses, as it might seem to imply that this comes from an address dynamically configured on the host. Perhaps CONF_ADDR_DHCPOFFER? -- Stefano