summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko2010-04-04 22:36:34 +0200
committerDenys Vlasenko2010-04-04 22:36:34 +0200
commitf8fcc184b6e05cbf5f88aa4f4e716e137a69f97e (patch)
tree8f517ad2d12554d48858f24f595ddb1d9786318a /networking
parent290346948d3c0808770241eaf54fe0631b31fb9f (diff)
downloadbusybox-f8fcc184b6e05cbf5f88aa4f4e716e137a69f97e.zip
busybox-f8fcc184b6e05cbf5f88aa4f4e716e137a69f97e.tar.gz
udhcpd: note missing sanity checks on INFORM message handling
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-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 2d1d5de..e484733 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -247,11 +247,23 @@ static void send_inform(struct dhcp_packet *oldpacket)
{
struct dhcp_packet packet;
- /* "The server responds to a DHCPINFORM message by sending a DHCPACK
+ /* "If a client has obtained a network address through some other means
+ * (e.g., manual configuration), it may use a DHCPINFORM request message
+ * to obtain other local configuration parameters. Servers receiving a
+ * DHCPINFORM message construct a DHCPACK message with any local
+ * configuration parameters appropriate for the client without:
+ * allocating a new address, checking for an existing binding, filling
+ * in 'yiaddr' or including lease time parameters. The servers SHOULD
+ * unicast the DHCPACK reply to the address given in the 'ciaddr' field
+ * of the DHCPINFORM message.
+ * ...
+ * The server responds to a DHCPINFORM message by sending a DHCPACK
* message directly to the address given in the 'ciaddr' field
* of the DHCPINFORM message. The server MUST NOT send a lease
* expiration time to the client and SHOULD NOT fill in 'yiaddr'."
*/
+//TODO: do a few sanity checks: is ciaddr set?
+//Better yet: is ciaddr == IP source addr?
init_packet(&packet, oldpacket, DHCPACK);
add_server_options(&packet);