[Dnsmasq-discuss] [PATCH] Fix DHCPv6 "NotOnlink" response which previously failed to set the message type correctly
Simon Kelley
simon at thekelleys.org.uk
Wed Oct 11 21:40:31 UTC 2023
Thanks for finding that.
https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=3868066085f4f73055d303ad2af59ad66245cf27
is basically the same fix, but does logging right.
Cheers,
Simon.
On 10/10/2023 11:23, renmingshuai via Dnsmasq-discuss wrote:
> 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
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
More information about the Dnsmasq-discuss
mailing list