]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP: Don't send force renew none or reconf accept if not asked for
authorRoy Marples <roy@marples.name>
Thu, 19 Sep 2019 19:48:12 +0000 (20:48 +0100)
committerRoy Marples <roy@marples.name>
Thu, 19 Sep 2019 19:48:12 +0000 (20:48 +0100)
src/dhcp.c
src/dhcp6.c

index fc21904b3707b51bacc66050dc4ec6c3366e9119..1763411907548a9561de9cd61cb129195accc7f9 100644 (file)
@@ -988,7 +988,8 @@ make_message(struct bootp **bootpm, const struct interface *ifp, uint8_t type)
 
 #ifdef AUTH
                if ((ifo->auth.options & DHCPCD_AUTH_SENDREQUIRE) !=
-                   DHCPCD_AUTH_SENDREQUIRE)
+                   DHCPCD_AUTH_SENDREQUIRE &&
+                   !has_option_mask(ifo->nomask, DHO_FORCERENEW_NONCE))
                {
                        /* We support HMAC-MD5 */
                        AREA_CHECK(1);
index 08183370f8c9e204212cdff208980bba68678359..99531af03a7e278221a84291e0378a2f66d6db79 100644 (file)
@@ -1031,7 +1031,8 @@ dhcp6_makemessage(struct interface *ifp)
 
 #ifdef AUTH
                if ((ifo->auth.options & DHCPCD_AUTH_SENDREQUIRE) !=
-                   DHCPCD_AUTH_SENDREQUIRE)
+                   DHCPCD_AUTH_SENDREQUIRE &&
+                   !has_option_mask(ifo->nomask6, D6_OPTION_RECONF_ACCEPT))
                        COPYIN1(D6_OPTION_RECONF_ACCEPT, 0);
 #endif