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
https://tools.ietf.org/html/rfc8415#section-21.21 
<https://tools.ietf.org/html/rfc8415#section-21.21>

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...

BR, 

Normen

> On 20. Oct 2019, at 20:24, Geert Stappers <stapp...@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.
>> 
>> Best,
>> Dominik
> 
>> From 93490e98789bf91d86d46e96c643feea4a08e387 Mon Sep 17 00:00:00 2001
>> From: Dominik DL6ER <dl...@dl6er.de <mailto:dl...@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@lists.thekelleys.org.uk 
>> <mailto:dnsmasq-discuss@lists.thekelleys.org.uk>>
>> 
>> Signed-off-by: Dominik DL6ER <dl...@dl6er.de <mailto:dl...@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.
> 
> 
> Cheers
> Geert Stappers
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk 
> <mailto:Dnsmasq-discuss@lists.thekelleys.org.uk>
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss 
> <http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss>
_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to