dhcpv6-ia: don't always send reconf accept option (FS#1377)
authorHans Dedecker <dedeckeh@gmail.com>
Tue, 20 Feb 2018 10:23:25 +0000 (11:23 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 22 Feb 2018 20:49:00 +0000 (21:49 +0100)
Send reconfigure accept and reconfigure key authentication protocol options
only if the client indicates it supports reconfigure accept as descibed
in RFC3315 paragraph 21.5.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
src/dhcpv6-ia.c

index 8236457b1d589525462b9a4cbda04d77f6777088..9c73abe377a42c7c6dbda7fa3102a5d566777fb1 100644 (file)
@@ -1170,7 +1170,8 @@ ssize_t dhcpv6_handle_ia(uint8_t *buf, size_t buflen, struct interface *iface,
                        if (!assigned || iface->ia_addr_len == 0)
                                /* Set error status */
                                status = (is_pd) ? DHCPV6_STATUS_NOPREFIXAVAIL : DHCPV6_STATUS_NOADDRSAVAIL;
-                       else if (assigned && !first && hdr->msg_type != DHCPV6_MSG_REBIND) {
+                       else if (accept_reconf && assigned && !first &&
+                                       hdr->msg_type != DHCPV6_MSG_REBIND) {
                                size_t handshake_len = 4;
                                buf[0] = 0;
                                buf[1] = DHCPV6_OPT_RECONF_ACCEPT;