IPv6 - DHCPv6

Martin Lewis martin.lewis.x84 at gmail.com
Tue Jun 2 12:21:47 UTC 2020


Hello,
I have a few notes.

First of all, you should send the diff as a git patch. Not only will it
make the code much easier to read, but will also make it possible to commit
into the git repository.
Also you mentioned that the server still doesn't respond as expected,
perhaps you could address that too?

Martin

On Tue, 5 May 2020 at 12:29, Uwe Glaeser <uwe.glaeser at dormakaba.com> wrote:

> Hi all,
>
>
>
> I try to get a IPv6 address via DHCP from a “Windows 2012 R2 Server with
> DHCPv6 Server”.
>
> With actual busybox 1.31.1 and enabled IPv6 and udhcpc6 feature I try to
> make contact to the server.
>
> My deivce is an embedded Linux 2.6
>
> What is working perfectly well is busybox ping6 and I get an IPv6 address
> when connecting my PC(Win 10) to the server.
>
> I watched the network with Wireshark and found out, that the ping6 and the
> dhcp-solicit from the PC are transmitted as ipv6-multicast.
>
> But the udhcpc6 solicit message is sent as IPv4 broadcast (with
> FF:FF:FF:FF:FF:FF as destination in the EthernetII frame) which is not
> correct I think.
>
> I have made some changes in the sources that way:
>
>
>
> I defined the field in common.h/.c for the IPv6 multicast to a DHCPv6
> (general address is FF02::1:2)
>
>
>
> const uint8_t MAC_DHCPBCAST_ADDR[6] ALIGN2= {
>
>                 0x33, 0x33, 0x00, 0x01, 0x00, 0x02
>
> };
>
>
>
> and used it in d6_dhcp.c  in the call of:
>
>
>
> static int d6_mcast_from_client_data_ifindex(struct d6_packet *packet,
> uint8_t *end)
>
> {
>
>                 /* FF02::1:2 is "All_DHCP_Relay_Agents_and_Servers"
> address */
>
>                 static const uint8_t FF02__1_2[16] = {
>
>                                0xFF, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
> 0x00,
>
>                                0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
> 0x02,
>
>                 };
>
>
>
>                 return d6_send_raw_packet(  packet, (end - (uint8_t*)
> packet),
>
>
>                                                                /*src*/
> &client6_data.ll_ip6, CLIENT_PORT6,
>
>
> /*dst*/ (struct in6_addr*)FF02__1_2, SERVER_PORT6, MAC_DHCPBCAST_ADDR,
>
>
> client_data.ifindex
>
>                 );
>
> }
>
>
>
> That works better now and I can see nearly the same contents in Wireshark
> as in the PC-dhcpv6 request. Ther Server still does not answer but that may
> have other reasons…
>
> I’m not sure if there are other parts where it would make sense to change
> the header…Please have a look!
>
>
>
> Best regards!
>
>
>
> Uwe Glaeser
> dormakaba EAD GmbH
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20200602/7aeda4b2/attachment.html>


More information about the busybox mailing list