aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSUZUKI, Shinsuke <suz@kame.net>2007-03-22 05:52:38 +0000
committerBjørn Mork <bjorn@mork.no>2010-08-06 15:37:36 +0200
commit9a651a9b0f3937b1483c563852a63b93723daab8 (patch)
treeae689b287fac183e91e72661644fb83ec86a22b2
parentfe3d6ca944917ec34247e029218f8ca11975cc30 (diff)
fixed a Solicitation message validation as stated in RFC3315 15.2.
-rw-r--r--CHANGES1
-rw-r--r--dhcp6s.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 430f31b..257a2b9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
* dhcp6s.c, config.h, if.c: implemented DHCPv6 Confirm message processing
on DHCPv6 server.
* dhcp6s.c, lease.c: implemented DHCPv6 Decline message processing on DHCPv6 server.
+ * dhcp6s.c: fixed a Solicitation message validation as stated in RFC3315 15.2.
2007-03-20 SUZUKI, Shinsuke <suz@kame.net>
* common.c: fixed a bug that IA-PD/IA-NA cannot coexist in one DHCP message
diff --git a/dhcp6s.c b/dhcp6s.c
index 77d6328..cd0f479 100644
--- a/dhcp6s.c
+++ b/dhcp6s.c
@@ -1240,6 +1240,16 @@ react_solicit(ifp, dh6, len, optinfo, from, fromlen, relayinfohead)
duidstr(&optinfo->clientID));
}
+ /*
+ * Servers MUST discard any Solicit messages that do include a
+ * Server Identifier option.
+ * [RFC3315 Section 15.2]
+ */
+ if (optinfo->serverID.duid_len == 0) {
+ dprintf(LOG_INFO, FNAME, "server ID option found");
+ return (-1);
+ }
+
/* get per-host configuration for the client, if any. */
if ((client_conf = find_hostconf(&optinfo->clientID))) {
dprintf(LOG_DEBUG, FNAME, "found a host configuration for %s",