On 2024-12-03 22:26, Simon Kelley wrote:
You know when something keeps nagging in the back of your mind......
https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff;h=5a1f2c577db58ea47727f1b6900c0be25e6db205
Unfortunately it took more time than expected to do the same check/fix
for DHCPv6 relay:
--- src/rfc3315.c.orig 2024-02-13 14:49:15.000000000 +0100
+++ src/rfc3315.c 2024-12-08 17:07:30.140725000 +0100
@@ -2210,6 +2210,9 @@
to.sa.sa_family = AF_INET6;
to.in6.sin6_addr = relay->server.addr6;
+#ifdef HAVE_SOCKADDR_SA_LEN
+ to.in6.sin6_len = sizeof(struct sockaddr_in6);
+#endif
to.in6.sin6_port = htons(relay->port);
to.in6.sin6_flowinfo = 0;
to.in6.sin6_scope_id = 0;
Can you please review?
Without that patch symptoms are as described for DHCPv4 relay and I see
a similar
sendto(7,"\f\0\M-}\^W\0\n\^P\^R\M-R\M-"\0"...,86,0,0x82092dc04,8) ERR#22
'Invalid argument'
trace error.
With that patch applied, I can get a DHCPv6 lease utilizing KAME dhcp6c:
Dec/08/2024 17:02:22: send solicit to ff02::1:2%epair1b
Dec/08/2024 17:02:22: reset a timer on epair1b, state=SOLICIT, timeo=0,
retrans=1091
Dec/08/2024 17:02:23: receive advertise from
fe80::ec8c:eaff:feaa:1b41%epair1b on epair1b
Dec/08/2024 17:02:23: get DHCP option identity association, len 40
Dec/08/2024 17:02:23: IA_NA: ID=0, T1=0, T2=0
Dec/08/2024 17:02:23: get DHCP option IA address, len 24
Dec/08/2024 17:02:23: IA_NA address: fd17:a:1012:d2a2::1:89e2
pltime=187 vltime=300
Dec/08/2024 17:02:23: get DHCP option client ID, len 14
Dec/08/2024 17:02:23: DUID: 00:01:00:01:2e:e8:20:fc:58:9c:fc:10:ff:d7
Dec/08/2024 17:02:23: get DHCP option server ID, len 14
Dec/08/2024 17:02:23: DUID: 00:01:00:01:2e:e7:3a:cc:5c:ed:8c:ea:aa:1c
Dec/08/2024 17:02:23: server ID:
00:01:00:01:2e:e7:3a:cc:5c:ed:8c:ea:aa:1c, pref=-1
Dec/08/2024 17:02:23: unexpected advertise
Dec/08/2024 17:02:23: reset timer for epair1b to 0.464543
Dec/08/2024 17:02:23: picked a server (ID:
00:01:00:01:2e:e7:3a:cc:5c:ed:8c:ea:aa:1c)
Dec/08/2024 17:02:23: Sending Request
Dec/08/2024 17:02:23: a new XID (c513b6) is generated
Dec/08/2024 17:02:23: set client ID (len 14)
Dec/08/2024 17:02:23: set server ID (len 14)
Dec/08/2024 17:02:23: set IA address
Dec/08/2024 17:02:23: set identity association
Dec/08/2024 17:02:23: set elapsed time (len 2)
Dec/08/2024 17:02:23: send request to ff02::1:2%epair1b
Dec/08/2024 17:02:23: reset a timer on epair1b, state=REQUEST, timeo=0,
retrans=909
Dec/08/2024 17:02:24: receive reply from
fe80::ec8c:eaff:feaa:1b41%epair1b on epair1b
Dec/08/2024 17:02:24: get DHCP option identity association, len 40
Dec/08/2024 17:02:24: IA_NA: ID=0, T1=0, T2=0
Dec/08/2024 17:02:24: get DHCP option IA address, len 24
Dec/08/2024 17:02:24: IA_NA address: fd17:a:1012:d2a2::1:89e2
pltime=187 vltime=300
Dec/08/2024 17:02:24: get DHCP option client ID, len 14
Dec/08/2024 17:02:24: DUID: 00:01:00:01:2e:e8:20:fc:58:9c:fc:10:ff:d7
Dec/08/2024 17:02:24: get DHCP option server ID, len 14
Dec/08/2024 17:02:24: DUID: 00:01:00:01:2e:e7:3a:cc:5c:ed:8c:ea:aa:1c
Dec/08/2024 17:02:24: dhcp6c Received REQUEST
Dec/08/2024 17:02:24: make an IA: NA-0
Dec/08/2024 17:02:24: create an address fd17:a:1012:d2a2::1:89e2
pltime=187, vltime=27749783699756
Dec/08/2024 17:02:24: add an address fd17:a:1012:d2a2::1:89e2/128 on epair1b
Dec/08/2024 17:02:24: T1(93) and/or T2(149) is locally determined
Dec/08/2024 17:02:24: removing an event on epair1b, state=REQUEST
Dec/08/2024 17:02:24: removing server (ID:
00:01:00:01:2e:e7:3a:cc:5c:ed:8c:ea:aa:1c)
Dec/08/2024 17:02:24: got an expected reply, sleeping.
Best reagrds,
-harry
_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss