dhcpv6: fix regression
authorHans Dedecker <dedeckeh@gmail.com>
Mon, 7 Dec 2020 20:26:47 +0000 (21:26 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 7 Dec 2020 20:42:55 +0000 (21:42 +0100)
Fixes regression introduced in commit faed29a.
The DHCPv6 message type need to be returned by dhcpv6_handle_reconfigure
via dhcpv6_request when different from -1 so the correct message type
is passed to dhcpv6_request

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

index 56992968055bfed12d6625c388a5a93e6132619b..e81918935756b08fd0801f3f2778008cb57710a6 100644 (file)
@@ -869,7 +869,7 @@ static int dhcpv6_handle_reconfigure(enum dhcpv6_msg orig, const int rc,
        if (msg != DHCPV6_MSG_UNKNOWN)
                dhcpv6_handle_reply(orig, rc, NULL, NULL, NULL);
 
-       return (msg == DHCPV6_MSG_UNKNOWN? -1: 1);
+       return (msg == DHCPV6_MSG_UNKNOWN? -1: (int)msg);
 }
 
 // Collect all advertised servers