On 12/02/2023 16:19, Harald Jensas wrote:
On 2/11/23 23:39, Simon Kelley wrote:
Is dnsmasq acting as the relay or as the DHCP server in that pcap?

Simon.


dnsmasq is acting as the DHCP server in the attached pcap.

I'm confused.

The code in dnsmasq to handle a dhcpv6 packet which has been relayed is at line 233 in src/rfc3315.c

For each option in the relayed message:

If it's an encapsulated DHCPv6 request, is gets replaced with an encapsulated DHCPv6 reply.

Any other option gets copied from the request to the reply EXCEPT option 79, which is not copied at all.

I can't see where the zero-length option 79 is coming from in that code, it shouldn't be copied at all.


Looking at git blame, this code was fixed in 2019, around version 2.81. Are you using really old code?

Cheers,

Simon.





--
Harald


On 10/02/2023 17:01, Harald Jensas wrote:
Hi,

The router is dropping relay replies from dnsmasq because it sees the Option 79 with lenght of 0 as invalie, i.e less that minimum length.

I have attached a pcap file showing that the reply from dnsmasq does include Option 79 with len == 0.

RFC6939 - 6.  DHCPv6 Server Behavior

"""
There is no requirement that a server return this option and its data
in a downstream DHCP message.
"""

I think we want to either copy all of the option data from the Relay-forward message, or simply drop the entire option in the reply?


--
Harald Jensås

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to