<div dir="ltr">Hello,<div>I have a few notes.</div><div><br></div><div>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.</div><div>Also you mentioned that the server still doesn't respond as expected, perhaps you could address that too?<br></div><div><br></div><div>Martin</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 5 May 2020 at 12:29, Uwe Glaeser <<a href="mailto:uwe.glaeser@dormakaba.com">uwe.glaeser@dormakaba.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="DE">
<div class="gmail-m_-8765287301928302508WordSection1">
<p class="MsoNormal">Hi all,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-US">I try to get a IPv6 address via DHCP from a “Windows 2012 R2 Server with DHCPv6 Server”.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">With actual busybox 1.31.1 and enabled IPv6 and udhcpc6 feature I try to make contact to the server.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">My deivce is an embedded Linux 2.6<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">What is working perfectly well is busybox ping6 and I get an IPv6 address when connecting my PC(Win 10) to the server.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I watched the network with Wireshark and found out, that the ping6 and the dhcp-solicit from the PC are transmitted as ipv6-multicast.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I have made some changes in the sources that way:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I defined the field in common.h/.c for the IPv6 multicast to a DHCPv6 (general address is FF02::1:2)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">const uint8_t MAC_DHCPBCAST_ADDR[6] ALIGN2= {<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                0x33, 0x33, 0x00, 0x01, 0x00, 0x02<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">};<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">and used it in d6_dhcp.c  in the call of:
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">static int d6_mcast_from_client_data_ifindex(struct d6_packet *packet, uint8_t *end)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">{<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                /* FF02::1:2 is "All_DHCP_Relay_Agents_and_Servers" address */<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                static const uint8_t FF02__1_2[16] = {<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                               0xFF, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                               0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                };<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                return d6_send_raw_packet(  packet, (end - (uint8_t*) packet),
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                                                                                                                              /*src*/ &client6_data.ll_ip6, CLIENT_PORT6,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                                                                                                                              /*dst*/ (struct in6_addr*)FF02__1_2, SERVER_PORT6, MAC_DHCPBCAST_ADDR,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                                                                                                                              client_data.ifindex<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                );<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">}<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">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…<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I’m not sure if there are other parts where it would make sense to change the header…Please have a look!<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:black">Best regards!<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:black">Uwe Glaeser<br>
dormakaba EAD GmbH<u></u><u></u></span></p>
</div>
</div>

_______________________________________________<br>
busybox mailing list<br>
<a href="mailto:busybox@busybox.net" target="_blank">busybox@busybox.net</a><br>
<a href="http://lists.busybox.net/mailman/listinfo/busybox" rel="noreferrer" target="_blank">http://lists.busybox.net/mailman/listinfo/busybox</a><br>
</blockquote></div>