From 0463b0571af90fbab2bfc75d3338d6bf503dc0fb Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Wed, 22 Mar 2017 14:14:26 +0100 Subject: [PATCH] dhcpv6: rebind capability support in reconfigure message (rfc6644) Allow rebind message type to appear in reconfigure message option of a reconfigure message as desccribed in rfc6644 Signed-off-by: Hans Dedecker --- src/dhcpv6.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 6dc227f..58050dc 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -778,7 +778,7 @@ static bool dhcpv6_response_is_valid(const void *buf, ssize_t len, return false; if (rep->msg_type == DHCPV6_MSG_RECONF) { - if ((rcmsg != DHCPV6_MSG_RENEW && rcmsg != DHCPV6_MSG_INFO_REQ) || + if ((rcmsg != DHCPV6_MSG_RENEW && rcmsg != DHCPV6_MSG_REBIND && rcmsg != DHCPV6_MSG_INFO_REQ) || (rcmsg == DHCPV6_MSG_INFO_REQ && ia_present) || !rcauth_ok || IN6_IS_ADDR_MULTICAST(daddr)) return false; @@ -807,6 +807,10 @@ static int dhcpv6_handle_reconfigure(enum dhcpv6_msg orig, const int rc, dhcpv6_for_each_option(opt, end, otype, olen, odata) { if (otype == DHCPV6_OPT_RECONF_MESSAGE && olen == 1) { switch (odata[0]) { + case DHCPV6_MSG_REBIND: + if (t2 != UINT32_MAX) + t2 = 0; + // Fall through case DHCPV6_MSG_RENEW: if (t1 != UINT32_MAX) t1 = 0; -- 2.30.2