aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/d6_dhcpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/d6_dhcpc.c')
-rw-r--r--networking/udhcp/d6_dhcpc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index a0cdded11..95de74f9b 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -623,7 +623,8 @@ static NOINLINE int send_d6_renew(uint32_t xid, struct in6_addr *server_ipv6, st
623 return d6_send_kernel_packet( 623 return d6_send_kernel_packet(
624 &packet, (opt_ptr - (uint8_t*) &packet), 624 &packet, (opt_ptr - (uint8_t*) &packet),
625 our_cur_ipv6, CLIENT_PORT6, 625 our_cur_ipv6, CLIENT_PORT6,
626 server_ipv6, SERVER_PORT6 626 server_ipv6, SERVER_PORT6,
627 client_config.ifindex
627 ); 628 );
628 return d6_mcast_from_client_config_ifindex(&packet, opt_ptr); 629 return d6_mcast_from_client_config_ifindex(&packet, opt_ptr);
629} 630}
@@ -645,15 +646,14 @@ static int send_d6_release(struct in6_addr *server_ipv6, struct in6_addr *our_cu
645 return d6_send_kernel_packet( 646 return d6_send_kernel_packet(
646 &packet, (opt_ptr - (uint8_t*) &packet), 647 &packet, (opt_ptr - (uint8_t*) &packet),
647 our_cur_ipv6, CLIENT_PORT6, 648 our_cur_ipv6, CLIENT_PORT6,
648 server_ipv6, SERVER_PORT6 649 server_ipv6, SERVER_PORT6,
650 client_config.ifindex
649 ); 651 );
650} 652}
651 653
652/* Returns -1 on errors that are fatal for the socket, -2 for those that aren't */ 654/* Returns -1 on errors that are fatal for the socket, -2 for those that aren't */
653/* NOINLINE: limit stack usage in caller */ 655/* NOINLINE: limit stack usage in caller */
654static NOINLINE int d6_recv_raw_packet(struct in6_addr *peer_ipv6 656static NOINLINE int d6_recv_raw_packet(struct in6_addr *peer_ipv6, struct d6_packet *d6_pkt, int fd)
655 UNUSED_PARAM
656 , struct d6_packet *d6_pkt, int fd)
657{ 657{
658 int bytes; 658 int bytes;
659 struct ip6_udp_d6_packet packet; 659 struct ip6_udp_d6_packet packet;
@@ -702,6 +702,9 @@ static NOINLINE int d6_recv_raw_packet(struct in6_addr *peer_ipv6
702// return -2; 702// return -2;
703// } 703// }
704 704
705 if (peer_ipv6)
706 *peer_ipv6 = packet.ip6.ip6_src; /* struct copy */
707
705 log1("received %s", "a packet"); 708 log1("received %s", "a packet");
706 d6_dump_packet(&packet.data); 709 d6_dump_packet(&packet.data);
707 710