diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2015-02-17 22:28:45 +0500 |
---|---|---|
committer | Vladislav Grishenko <themiron@mail.ru> | 2015-02-17 22:28:45 +0500 |
commit | e20ee553da0b17d2e2569650327fff568a4a222d (patch) | |
tree | cbe4f97fa6e3bdb5388a10cc7f0c3684c78632b3 /src | |
parent | 29b9032cbef27bc60a20c955d607537fedd554af (diff) | |
download | odhcp6c-e20ee553da0b17d2e2569650327fff568a4a222d.tar.gz |
Fix handling of DHCPv6 replies containing unrequested IA_NA/IA_PD options
Diffstat (limited to 'src')
-rw-r--r-- | src/dhcpv6.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 1786688..6ae6f7a 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -947,6 +947,10 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc, && olen > -4 + sizeof(struct dhcpv6_ia_hdr)) { struct dhcpv6_ia_hdr *ia_hdr = (void*)(&odata[-4]); + if ((na_mode == IA_MODE_NONE && otype == DHCPV6_OPT_IA_NA) || + (pd_mode == IA_MODE_NONE && otype == DHCPV6_OPT_IA_PD)) + continue; + // Test ID if (ia_hdr->iaid != htonl(1) && otype == DHCPV6_OPT_IA_NA) continue; |