aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2019-04-13 19:43:15 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2019-04-13 19:43:15 +0200
commit0d75e8b7973353f1d034b97bebfd4d2c13a9f5d6 (patch)
tree276a76f622a9cb00159d86dec11ed99edbdd5528 /networking/udhcp
parentcc45cbcca41de47590f4aa839eb0f396f18f9896 (diff)
downloadbusybox-w32-0d75e8b7973353f1d034b97bebfd4d2c13a9f5d6.tar.gz
busybox-w32-0d75e8b7973353f1d034b97bebfd4d2c13a9f5d6.tar.bz2
busybox-w32-0d75e8b7973353f1d034b97bebfd4d2c13a9f5d6.zip
udhcpc6: add a few comments, no code changes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp')
-rw-r--r--networking/udhcp/d6_dhcpc.c1
-rw-r--r--networking/udhcp/d6_socket.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index 97985642b..112f12df2 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -531,6 +531,7 @@ static uint8_t *add_d6_client_options(uint8_t *ptr)
531 531
532static int d6_mcast_from_client_config_ifindex(struct d6_packet *packet, uint8_t *end) 532static int d6_mcast_from_client_config_ifindex(struct d6_packet *packet, uint8_t *end)
533{ 533{
534 /* FF02::1:2 is "All_DHCP_Relay_Agents_and_Servers" address */
534 static const uint8_t FF02__1_2[16] = { 535 static const uint8_t FF02__1_2[16] = {
535 0xFF, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 536 0xFF, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
536 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 537 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02,
diff --git a/networking/udhcp/d6_socket.c b/networking/udhcp/d6_socket.c
index 6ad53a9c2..fe46e5f1d 100644
--- a/networking/udhcp/d6_socket.c
+++ b/networking/udhcp/d6_socket.c
@@ -38,6 +38,15 @@ int FAST_FUNC d6_read_interface(const char *interface, int *ifindex, struct in6_
38 log1("IP %s", inet_ntoa(((struct sockaddr_in *)ifa->ifa_addr)->sin_addr)); 38 log1("IP %s", inet_ntoa(((struct sockaddr_in *)ifa->ifa_addr)->sin_addr));
39 } 39 }
40#endif 40#endif
41/* RFC 3315
42 * 16. Client Source Address and Interface Selection
43 *
44 * "When a client sends a DHCP message to the
45 * All_DHCP_Relay_Agents_and_Servers address, ... ... The client
46 * MUST use a link-local address assigned to the interface for which it
47 * is requesting configuration information as the source address in the
48 * header of the IP datagram."
49 */
41 if (ifa->ifa_addr->sa_family == AF_INET6 50 if (ifa->ifa_addr->sa_family == AF_INET6
42 && IN6_IS_ADDR_LINKLOCAL(&sip6->sin6_addr) 51 && IN6_IS_ADDR_LINKLOCAL(&sip6->sin6_addr)
43 ) { 52 ) {