[Dnsmasq-discuss] [PATCH] DHCPv6 IAID should be of unsigned type
nbkowalewski at gmx.net
Tue Oct 22 17:17:41 BST 2019
Hi Geert, Dominik,
FAIW - i was curious to see if RFC 8415 of November 2018, the update of the now officially obsoleted RFC 3315, uses some other wording, but it also just speaks about 4 octets that jointly are an unsigned integer
The RFC obviously expects an implementor to know which data type in his specific environment and implementation would match this requirement - obviously for example it would be good if the on the wire format would not change by big endian/little endian diversions and so on...
> On 20. Oct 2019, at 20:24, Geert Stappers <stappers at stappers.nl> wrote:
> On Sun, Oct 20, 2019 at 07:19:13PM +0200, Dominik DL6ER wrote:
>> Dear mailing list,
>> The proposed patch ensures that the DHCPv6 IAID is of unsigned type.
>> This is entirely uncritical, however, as the variable is already now
>> interpreted and handled as being of unsigned type in
>> * lease.c:read_leases(),
>> * helper.c:create_helper(),
>> * dbus.c:dbus_add_lease(), and
>> * outpacket.c:put_opt6_long(),
>> its definition should reflect this to avoid inconsistencies.
>> RFC3315 (section 22.4) confirms that the IAID is a 4 bytes long
>> unsigned integer.
>> From 93490e98789bf91d86d46e96c643feea4a08e387 Mon Sep 17 00:00:00 2001
>> From: Dominik DL6ER <dl6er at dl6er.de <mailto:dl6er at dl6er.de>>
>> Date: Sun, 20 Oct 2019 18:51:52 +0200
>> Subject: [PATCH] DHCPv6 IAID should be of unsigned type.
>> It is derived from strtoul() in lease.c:read_leases() and already
>> now interpreted as unsigned in helper.c:276 and outpacket.c:put_opt6_long().
>> RFC3315 (section 22.4) shows that the IAID is 4
>> bytes long so we do not need to go up to unsigned long.
>> To: dnsmasq-discuss <dnsmasq-discuss at lists.thekelleys.org.uk <mailto:dnsmasq-discuss at lists.thekelleys.org.uk>>
>> Signed-off-by: Dominik DL6ER <dl6er at dl6er.de <mailto:dl6er at dl6er.de>>
> But how long is a int? And that is for which compiler?
> So where the patch is now someting like `s/int iaid/unsigned int iaid/`,
> would I like to see something like `s/int iaid/uint32 iaid/`.
> Because uint32 is always 4 bytes long.
> Geert Stappers
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk <mailto:Dnsmasq-discuss at lists.thekelleys.org.uk>
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss <http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dnsmasq-discuss