[Dnsmasq-discuss] [PATCH] Fix DHCPv6 "NotOnlink" response which previously failed to set the message type correctly
renmingshuai
renmingshuai at huawei.com
Tue Oct 10 10:23:53 UTC 2023
My dhclient process received a Confirm message from dnsmasq-dhcp, when the dhclient process sent a Confirm message which contains a ip address that is not appropriate for the link to the dnsmasq-dhcp.
# tcpdump -i veth1 port 547
dropped privs to tcpdump
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on veth1, link-type EN10MB (Ethernet), snapshot length 262144 bytes
15:12:51.998726 IP6 fe80::b0bb:d2ff:fea6:138d.dhcpv6-client > ff02::1:2.dhcpv6-server: dhcp6 confirm
15:12:51.998942 IP6 fe80::cb1:2aff:fe23:593f.dhcpv6-server > fe80::b0bb:d2ff:fea6:138d.dhcpv6-client: dhcp6 confirm
The reason is that dnsmasq-dhcp does not set the message type correctly.
---
src/rfc3315.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rfc3315.c b/src/rfc3315.c
index c2e2692..3a52d0e 100644
--- a/src/rfc3315.c
+++ b/src/rfc3315.c
@@ -1101,7 +1101,7 @@ static int dhcp6_no_relay(struct state *state, int msg_type, unsigned char *inbu
put_opt6_string(_("confirm failed"));
end_opt6(o1);
log6_quiet(state, "DHCPREPLY", &req_addr, _("confirm failed"));
- return 1;
+ goto done;
}
good_addr = 1;
--
2.33.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20231010/5bcb4105/attachment-0001.htm>
More information about the Dnsmasq-discuss
mailing list