udhcpc6 missing source address

David Laight David.Laight at ACULAB.COM
Wed Dec 14 10:29:34 UTC 2022


From: Denys Vlasenko
> Sent: 14 December 2022 10:04
> 
> On Wed, Dec 14, 2022 at 10:52 AM David Laight <David.Laight at aculab.com> wrote:
...
> If it's the code from the above, then no, kernel will not fill in
> any IPv6 source addresses, as it does not even know it's
> an IPv6/UDP packet - we use raw sockets here,
> and we format UDP packet "by hand":

Not enough coffee this morning to quickly interpret the strace output :-(

I'm pretty sure there is a way of sending UDP multicast packets
and that dhcpc6 could use it.
(It is harder for IPv4 because there isn't a valid source IP.)

We've got some code that sends UDP from RAWIP sockets.
That allows the sender to change the source port for
every message.
For IPv6 the kernel can calculate the UDP checksum after
doing the packet routing - so we don't have to build the
IPv6 header.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


More information about the busybox mailing list