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=NTVw80+l; 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 E6ADF5A0265 for ; Wed, 01 Jul 2026 19:00:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782925234; 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=+3++s+DqtBdGefbN8ydfw+fbAJt3jyeOWBK8KJVYLEw=; b=NTVw80+l7fNewxk2BzYNYGLa+zYzP7RbW1/HBNhYwivoLWQyFTm6TYWxAcRcsAtq1FfuWS WHKcTuCEpx+IPA8hDg88/0HgkSh2unsfFaVdgq6+udr+RBm/TfpFI0W34FGxtZspGCAUR4 5P2u8JVhYgnLPzJMIO4bMy0G+CpIEWs= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-424-m36LldNHOom_Ce-0ssfDAQ-1; Wed, 01 Jul 2026 13:00:33 -0400 X-MC-Unique: m36LldNHOom_Ce-0ssfDAQ-1 X-Mimecast-MFC-AGG-ID: m36LldNHOom_Ce-0ssfDAQ_1782925232 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-47162f83c75so1419288f8f.1 for ; Wed, 01 Jul 2026 10:00:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782925232; x=1783530032; 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=+3++s+DqtBdGefbN8ydfw+fbAJt3jyeOWBK8KJVYLEw=; b=EK6DIJgpbwlik9aJo32J1PTiBWlr3XeT9YtEhbJTp/JX9252vnzpbJK8O1kKLR/3h2 xR8V65Nime2xV8ZH6Mbfey7cPdVPxPueiAzUH7xE4PcOSp+o6OLo2jgWQns6I9b+bNz3 ZucdvgGR6P5LmUrJQI8iG4OsyK45RPKc2cnLwUPQaJgCZtaAegXKsRwXo9MCyRRAKSxg FIOckS5EGs8h4NimvGdqGlLezLdQZAki9xRuYViLOMV7NzWLgQWR7js4j8QRFVmmyREw i4T+sY2rl1NILlgXMMRuhBym1xvxnbPkUs1040U6iPG4ptUuPG8X0feKVOYyNkllmTqF Wdew== X-Gm-Message-State: AOJu0YzaUJ+MbyQOOhViISWYRsc4Dn3p8uk/EwJDXN6E8nbPO0D/gdI8 MchbJ6bDIVDPkrqMDN+qRxmKTbdBpIXWUmDJs/idACn3nV7YyOWEEOa/zqgoNhv2uOWJzPSVfzv A3EGYTfeubINfH8VOTHTKBTi+5F+8d0+R73tQMSCJbY9y+oP2W5x5ea3zfYNQZQ== X-Gm-Gg: AfdE7clqywTUl/82P7CXHfExByGBsehZGk91COdoRYoGj0DSLXMQNk/9bX9YjQXhB8j uuAeBOxeGO1pgpsDUqufC3y3NJorY+1GP7M1aXhK06xr7DsEs7Rnd96GTK8kLjtDYdKYWESR8+L EHeWTorGg/TqUp6rHiEF5Dw55D+NroelxYZEkQ/A45xXL+UaYx8r9gsFUBYhkx2aJL3r1W1ljT7 fH1585vm41A9TxL14/JpfLmHPteI3kZq3fu6H+DKQJlTZKRkTerM83XxE32yKJLmivSZONSROy3 gLhLheHT72JAu458j0rhzxiWT25AjzjIvMlY55SZr8aCnlOhdJ7dmU0ZExaL1DLjR7fxts5+y66 uhMu5J5LmHX8mmFg1sLl+aw== X-Received: by 2002:a05:6000:2583:b0:472:3090:d88c with SMTP id ffacd0b85a97d-475e0a01f0dmr10265924f8f.24.1782925231911; Wed, 01 Jul 2026 10:00:31 -0700 (PDT) X-Received: by 2002:a05:6000:2583:b0:472:3090:d88c with SMTP id ffacd0b85a97d-475e0a01f0dmr10265868f8f.24.1782925231292; Wed, 01 Jul 2026 10:00:31 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-477db8a4b83sm1359070f8f.12.2026.07.01.10.00.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2026 10:00:30 -0700 (PDT) From: Stefano Brivio To: Anshu Kumari Subject: Re: [PATCH v4 3/4] dhcp: Add --dhcp-opt with option table and value parser Message-ID: <20260701190029.3a80c95a@elisabeth> In-Reply-To: <20260617132243.1499556-4-anskuma@redhat.com> References: <20260617132243.1499556-1-anskuma@redhat.com> <20260617132243.1499556-4-anskuma@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, 01 Jul 2026 19:00:30 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: LuHksfcb0tale5bHodsbGxhhe5gn3uXLHgJEk_BnuUw_1782925232 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: GO76I2JMJFVGD7XODNEALU3IVHCXNHLT X-Message-ID-Hash: GO76I2JMJFVGD7XODNEALU3IVHCXNHLT 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, jmaloy@redhat.com, david@gibson.dropbear.id.au, lvivier@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, 17 Jun 2026 18:52:37 +0530 Anshu Kumari wrote: > [...] > > @@ -182,6 +182,8 @@ struct ip6_ctx { > * @dns_search: DNS search list > * @hostname: Guest hostname > * @fqdn: Guest FQDN > + * @dhcp_opts: User-specified DHCP options from --dhcp-opt > + * @dhcp_opts.str: String value from command line > * @ifi6: Template interface for IPv6, -1: none, 0: IPv6 disabled > * @ip6: IPv6 configuration > * @pasta_ifn: Name of namespace interface for pasta > @@ -264,6 +266,10 @@ struct ctx { > char hostname[PASST_MAXDNAME]; > char fqdn[PASST_MAXDNAME]; > > + struct { > + char str[255]; > + } dhcp_opts[256]; This just occurred to me after reviewing the DHCPv6 equivalent: as you only support options in the table, you could use the count of items in that table, instead of 256. See my review of v2 1/2 of the DHCPv6 series for one way to do that. -- Stefano