The attached patch fixes a typo in udhcp_send_raw_packet() renaming the
enum values IP_UPD_DHCP_SIZE and UPD_DHCP_SIZE to IP_UDP_DHCP_SIZE and
UDP_DHCP_SIZE
Best regards
--- busybox-1.10.2.org/networking/udhcp/packet.c 2008-04-19 05:50:26.000000000 +0200
+++ busybox-1.10.2/networking/udhcp/packet.c 2008-06-16 12:36:28.000000000 +0200
@@ -127,8 +127,8 @@
const char *msg;
enum {
- IP_UPD_DHCP_SIZE = sizeof(struct udp_dhcp_packet) - CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS,
- UPD_DHCP_SIZE = IP_UPD_DHCP_SIZE - offsetof(struct udp_dhcp_packet, udp),
+ IP_UDP_DHCP_SIZE = sizeof(struct udp_dhcp_packet) - CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS,
+ UDP_DHCP_SIZE = IP_UDP_DHCP_SIZE - offsetof(struct udp_dhcp_packet, udp),
};
fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
@@ -157,12 +157,12 @@
packet.udp.source = htons(source_port);
packet.udp.dest = htons(dest_port);
/* size, excluding IP header: */
- packet.udp.len = htons(UPD_DHCP_SIZE);
+ packet.udp.len = htons(UDP_DHCP_SIZE);
/* for UDP checksumming, ip.len is set to UDP packet len */
packet.ip.tot_len = packet.udp.len;
- packet.udp.check = udhcp_checksum(&packet, IP_UPD_DHCP_SIZE);
+ packet.udp.check = udhcp_checksum(&packet, IP_UDP_DHCP_SIZE);
/* but for sending, it is set to IP packet len */
- packet.ip.tot_len = htons(IP_UPD_DHCP_SIZE);
+ packet.ip.tot_len = htons(IP_UDP_DHCP_SIZE);
packet.ip.ihl = sizeof(packet.ip) >> 2;
packet.ip.version = IPVERSION;
packet.ip.ttl = IPDEFTTL;
@@ -172,7 +172,7 @@
* If you need to change this: last byte of the packet is
* packet.data.options[end_option(packet.data.options)]
*/
- result = sendto(fd, &packet, IP_UPD_DHCP_SIZE, 0,
+ result = sendto(fd, &packet, IP_UDP_DHCP_SIZE, 0,
(struct sockaddr *) &dest, sizeof(dest));
msg = "sendto";
ret_close:
begin:vcard
fn:Matthias Kaehlcke
n:Kaehlcke;Matthias
org:Electronic Engineering Solutions;Dept. de Software
adr:;;C/ Sant Ferran, 10-16 bajos;Barcelona;;08031;Spain
email;internet:[EMAIL PROTECTED]
title:Ingeniero de Firmware
tel;work:93 407 30 80
tel;fax:93 433 56 71
url:http://www.e2s.net
version:2.1
end:vcard
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox