aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpd.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-04-04 22:36:34 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-04-04 22:36:34 +0200
commitf8fcc184b6e05cbf5f88aa4f4e716e137a69f97e (patch)
tree8f517ad2d12554d48858f24f595ddb1d9786318a /networking/udhcp/dhcpd.c
parent290346948d3c0808770241eaf54fe0631b31fb9f (diff)
downloadbusybox-w32-f8fcc184b6e05cbf5f88aa4f4e716e137a69f97e.tar.gz
busybox-w32-f8fcc184b6e05cbf5f88aa4f4e716e137a69f97e.tar.bz2
busybox-w32-f8fcc184b6e05cbf5f88aa4f4e716e137a69f97e.zip
udhcpd: note missing sanity checks on INFORM message handling
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/dhcpd.c')
-rw-r--r--networking/udhcp/dhcpd.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index 2d1d5deba..e48473389 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -247,11 +247,23 @@ static void send_inform(struct dhcp_packet *oldpacket)
247{ 247{
248 struct dhcp_packet packet; 248 struct dhcp_packet packet;
249 249
250 /* "The server responds to a DHCPINFORM message by sending a DHCPACK 250 /* "If a client has obtained a network address through some other means
251 * (e.g., manual configuration), it may use a DHCPINFORM request message
252 * to obtain other local configuration parameters. Servers receiving a
253 * DHCPINFORM message construct a DHCPACK message with any local
254 * configuration parameters appropriate for the client without:
255 * allocating a new address, checking for an existing binding, filling
256 * in 'yiaddr' or including lease time parameters. The servers SHOULD
257 * unicast the DHCPACK reply to the address given in the 'ciaddr' field
258 * of the DHCPINFORM message.
259 * ...
260 * The server responds to a DHCPINFORM message by sending a DHCPACK
251 * message directly to the address given in the 'ciaddr' field 261 * message directly to the address given in the 'ciaddr' field
252 * of the DHCPINFORM message. The server MUST NOT send a lease 262 * of the DHCPINFORM message. The server MUST NOT send a lease
253 * expiration time to the client and SHOULD NOT fill in 'yiaddr'." 263 * expiration time to the client and SHOULD NOT fill in 'yiaddr'."
254 */ 264 */
265//TODO: do a few sanity checks: is ciaddr set?
266//Better yet: is ciaddr == IP source addr?
255 init_packet(&packet, oldpacket, DHCPACK); 267 init_packet(&packet, oldpacket, DHCPACK);
256 add_server_options(&packet); 268 add_server_options(&packet);
257 269