[Dnsmasq-discuss] [PATCH] fix the source address of dhcpv6 relay-forward packets
Luis Thomas
Luis.Thomas at silabs.com
Fri Sep 2 13:03:08 UTC 2022
Hi everyone,
We are using both dnsmasq and isc dhcrelay as dhcp-relays for dhcpv6
only.
we launch dnsmasq like this:
dnsmasq -d \
--conf-file=/dev/null \
--dhcp-relay fd12:3456::b6e3:f9ff:fea5:fa5b,2020:abcd::1 \
--except-interface=lo \
--interface=tun0,eno2 \
--port 0
and isc dhcrelay like this:
dhcrelay -d -6 -l tun0 -u 2020:abcd::1%eno2 --no-pid
tun0 address is fd12:3456::b6e3:f9ff:fea5:fa5b.
eno2 address is 2020:abcd::2.
With dnsmasq the source address of the relay-forward packets is the
address of tun0.
With dhcrelay the source address of the relay-forward packets is the
address of eno2.
We don't really understand why it so on dnsmasq (or dhcrelay for that
matter), could someone explain it to us ? RFC 3315 section 20. Relay
Agent Behavior says nothing about the source address.
In our use case it makes more sense that the source address of the
relay-forward packet is the address of eno2 since it's the outbound
interface (and the one that will receive the replies).
Nevertheless the attached patch fixes this issue as it sets the source
address of relay-forward packets to be the address of the "upper"
interface.
We've also attached two filtered pcap files of a wireshark capture
showing the difference before and after the patch on the machine
hosting the dhcp server and the machine hosting the dhcp_relay.
Regards,
--
Luis Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-the-source-address-of-dhcpv6-relay-forward-packe.patch
Type: text/x-patch
Size: 839 bytes
Desc: 0001-fix-the-source-address-of-dhcpv6-relay-forward-packe.patch
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20220902/bf58763b/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dhcp_relay_filter_icmpv6_or_dhcpv6.pcapng
Type: application/x-pcapng
Size: 20496 bytes
Desc: dhcp_relay_filter_icmpv6_or_dhcpv6.pcapng
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20220902/bf58763b/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dhcp_server_filter_icmpv6_or_dhcpv6.pcap
Type: application/vnd.tcpdump.pcap
Size: 9844 bytes
Desc: dhcp_server_filter_icmpv6_or_dhcpv6.pcap
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20220902/bf58763b/attachment-0001.pcap>
More information about the Dnsmasq-discuss
mailing list