From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id D093F5A026F for ; Thu, 5 Oct 2023 08:19:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696486762; 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=7M0FoBaL905qOHJjn1UUp5xGSWmUn/kWbU3kN5cG34k=; b=Kh3lM7jtXFUshZf0nEvT+QrhiLcKUeBUX8np7qTUE9G+Yd1OEcBTMpk0EGOGac1I6nxZAA /Vr6XMpYPnHri6gJ2sskA1YF9sGpPUeEO8RBPYXJd4U0H9OVpFxr0qKuitopC3sJMzat1e KcM+pEmxqSE3UxgYfRP7sykBJxnHsWQ= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-323-Qzyfo18AMjO2doiQS6_-BQ-1; Thu, 05 Oct 2023 02:19:21 -0400 X-MC-Unique: Qzyfo18AMjO2doiQS6_-BQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A78911C05196; Thu, 5 Oct 2023 06:19:20 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DB40D140E950; Thu, 5 Oct 2023 06:19:19 +0000 (UTC) Date: Thu, 5 Oct 2023 08:19:17 +0200 From: Stefano Brivio To: Stas Sergeev Subject: Re: [PATCH] dhcp: put option 53 at the beginning Message-ID: <20231005081917.11314f07@elisabeth> In-Reply-To: <20231003080122.2985329-1-stsp2@yandex.ru> References: <20231003080122.2985329-1-stsp2@yandex.ru> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: 72LPZ6WHKYDQBBJSP5AASGCFRR54RLDO X-Message-ID-Hash: 72LPZ6WHKYDQBBJSP5AASGCFRR54RLDO 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 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 Tue, 3 Oct 2023 13:01:22 +0500 Stas Sergeev wrote: > ... unless it is listed in 55. > Many clients expect option 53 at the beginning. > mTCP has this code: > if ( resp->options[0] != 53 ) { > TRACE_WARN(( "Dhcp: first option was not a Dhcp msg type\n" )); > return; > } > > wattcp32 has this: > static int DHCP_is_ack (void) > { > const BYTE *opt = (const BYTE*) &dhcp_in.dh_opt[4]; > > return (opt[0] == DHCP_OPT_MSG_TYPE && opt[1] == 1 && opt[2] == DHCP_ACK); > } > static int DHCP_is_nack (void) > { > const BYTE *opt = (const BYTE*) &dhcp_in.dh_opt[4]; > > return (opt[0] == DHCP_OPT_MSG_TYPE && opt[1] == 1 && opt[2] == DHCP_NAK); > } > > Link: https://bugs.passt.top/show_bug.cgi?id=77 > Signed-off-by: Stas Sergeev Applied, thanks! -- Stefano