NetworkConfiguration / dhcpcd

DHCP / IPv4LL / IPv6RA / DHCPv6 client.
https://roy.marples.name/projects/dhcpcd
BSD 2-Clause "Simplified" License
326 stars 104 forks source link

DHCPv4 V-I Vendor Class with multiple ENs overwrites the EN values #328

Open rmarioe opened 1 month ago

rmarioe commented 1 month ago

Hi,

I see when defining the vendclass two times with different EN, the first one is overwritten and the second one is actually part of the data. In the manual I see:

[vendclass] en data Add the DHCPv6 Vendor Indetifying Vendor Class with the IANA assigned Enterprise Number en with the data. This option can be set more than once to add more data, but the behaviour, as per RFC 3925 is undefined if the Enterprise Number differs.

However the RFC states:

This option contains information corresponding to one or more Enterprise Numbers. Multiple instances of this option may be present and MUST be concatenated in accordance with [RFC 3396]. An Enterprise Number SHOULD only occur once among all instances of this option. Behavior is undefined if an Enterprise Number occurs multiple times. The information for each Enterprise Number is treated independently, regardless or whether it occurs in an option with other Enterprise Numbers or in a separate option.

Does this not mean that having multiple enterprise numbers that differ should be supported but repeating an already seen enterprise number is undefined?

rsmarples commented 1 month ago

This isn't very well done I have to confess I probably haven't implemented this very well. Currently you cannot specify different EN values, only the first one is used.