udhcpc[6]: initialize entire sockaddr_ll
No binary (build failed)
—
(log yok)
| @@ -881,9 +881,14 @@ static int d6_raw_socket(int ifindex) | |
| fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IPV6)); | |
| log2("got raw socket fd %d", fd); | |
| + | memset(&sock, 0, sizeof(sock)); /* let's be deterministic */ |
| sock.sll_family = AF_PACKET; | |
| sock.sll_protocol = htons(ETH_P_IPV6); | |
| sock.sll_ifindex = ifindex; | |
| + | /*sock.sll_hatype = ARPHRD_???;*/ |
| + | /*sock.sll_pkttype = PACKET_???;*/ |
| + | /*sock.sll_halen = ???;*/ |
| + | /*sock.sll_addr[8] = ???;*/ |
| xbind(fd, (struct sockaddr *) &sock, sizeof(sock)); | |
| #if 0 | |
| @@ -75,6 +75,8 @@ int FAST_FUNC d6_send_raw_packet( | |
| dest_sll.sll_family = AF_PACKET; | |
| dest_sll.sll_protocol = htons(ETH_P_IPV6); | |
| dest_sll.sll_ifindex = ifindex; | |
| + | /*dest_sll.sll_hatype = ARPHRD_???;*/ |
| + | /*dest_sll.sll_pkttype = PACKET_???;*/ |
| dest_sll.sll_halen = 6; | |
| memcpy(dest_sll.sll_addr, dest_arp, 6); | |
| @@ -1010,9 +1010,14 @@ static int udhcp_raw_socket(int ifindex) | |
| */ | |
| log2("got raw socket fd"); | |
| + | memset(&sock, 0, sizeof(sock)); /* let's be deterministic */ |
| sock.sll_family = AF_PACKET; | |
| sock.sll_protocol = htons(ETH_P_IP); | |
| sock.sll_ifindex = ifindex; | |
| + | /*sock.sll_hatype = ARPHRD_???;*/ |
| + | /*sock.sll_pkttype = PACKET_???;*/ |
| + | /*sock.sll_halen = ???;*/ |
| + | /*sock.sll_addr[8] = ???;*/ |
| xbind(fd, (struct sockaddr *) &sock, sizeof(sock)); | |
| #if 0 /* Several users reported breakage when BPF filter is used */ | |
| @@ -129,6 +129,8 @@ int FAST_FUNC udhcp_send_raw_packet(struct dhcp_packet *dhcp_pkt, | |
| dest_sll.sll_family = AF_PACKET; | |
| dest_sll.sll_protocol = htons(ETH_P_IP); | |
| dest_sll.sll_ifindex = ifindex; | |
| + | /*dest_sll.sll_hatype = ARPHRD_???;*/ |
| + | /*dest_sll.sll_pkttype = PACKET_???;*/ |
| dest_sll.sll_halen = 6; | |
| memcpy(dest_sll.sll_addr, dest_arp, 6); | |