aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/clientpacket.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-11-28 19:23:12 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-11-28 19:23:12 +0000
commit35ff74676b54b1cae5a6324d2517568393fedbc8 (patch)
treeb913eda3005954aec3543cc07d3f86baeeb6429a /networking/udhcp/clientpacket.c
parent41f5add965163607b5921aa224b9ba6fa3debc05 (diff)
downloadbusybox-35ff74676b54b1cae5a6324d2517568393fedbc8.tar.gz
dhcpc: let server know we don't like oversized packets.
add TODO comment
Diffstat (limited to 'networking/udhcp/clientpacket.c')
-rw-r--r--networking/udhcp/clientpacket.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/networking/udhcp/clientpacket.c b/networking/udhcp/clientpacket.c
index 4a5c627f4..406fe340a 100644
--- a/networking/udhcp/clientpacket.c
+++ b/networking/udhcp/clientpacket.c
@@ -96,6 +96,9 @@ int send_discover(uint32_t xid, uint32_t requested)
if (requested)
add_simple_option(packet.options, DHCP_REQUESTED_IP, requested);
+ /* Explicitly saying that we want RFC-compliant packets helps
+ * some buggy DHCP servers to NOT send bigger packets */
+ add_simple_option(packet.options, DHCP_MAX_SIZE, htons(576));
add_requests(&packet);
bb_info_msg("Sending discover...");
return udhcp_raw_packet(&packet, INADDR_ANY, CLIENT_PORT, INADDR_BROADCAST,