From 5ba2514b9e581314e5051289bb38773adf56979e Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 19 Sep 2019 20:48:12 +0100 Subject: [PATCH] DHCP: Don't send force renew none or reconf accept if not asked for --- src/dhcp.c | 3 ++- src/dhcp6.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dhcp.c b/src/dhcp.c index fc21904b..17634119 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -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); diff --git a/src/dhcp6.c b/src/dhcp6.c index 08183370..99531af0 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -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 -- 2.47.3