summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2014-04-16 16:39:05 +0200
committerHans Dedecker <dedeckeh@gmail.com>2014-04-23 10:09:45 +0200
commit749997650804f107ebb2f5ed6c91ed95b620b4dd (patch)
treebd9d0532ea6ae7b8defb5e84ef34963e8e5a1d92 /src
parent405b2e82dfeb95e3b90d35f8970efad85388949c (diff)
Add status code ok option in reply to a decline message
RFC3315 Section 18.2.7 states a status code OK needs to be returned by the server : After all the addresses have been processed, the server generates a Reply message and includes a Status Code option with the value Success, a Server Identifier option with the server's DUID, and a Client Identifier option with the client's DUID.
Diffstat (limited to 'src')
-rw-r--r--src/dhcpv6-ia.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c
index 5e34b5c..c655d93 100644
--- a/src/dhcpv6-ia.c
+++ b/src/dhcpv6-ia.c
@@ -1191,7 +1191,8 @@ ssize_t dhcpv6_handle_ia(uint8_t *buf, size_t buflen, struct interface *iface,
response_len += ia_response_len;
}
- if (hdr->msg_type == DHCPV6_MSG_RELEASE && response_len + 6 < buflen) {
+ if ((hdr->msg_type == DHCPV6_MSG_RELEASE || hdr->msg_type == DHCPV6_MSG_DECLINE) &&
+ response_len + 6 < buflen) {
buf[0] = 0;
buf[1] = DHCPV6_OPT_STATUS;
buf[2] = 0;