projects
/
project
/
odhcp6c.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
29b9032
)
Merge pull request #30 from themiron/master
author
Steven Barth
<steven@midlink.org>
Tue, 17 Feb 2015 17:43:35 +0000
(18:43 +0100)
committer
Steven Barth
<steven@midlink.org>
Tue, 17 Feb 2015 17:43:35 +0000
(18:43 +0100)
Fix handling of DHCPv6 replies containing unrequested IA_NA/IA_PD options
src/dhcpv6.c
patch
|
blob
|
history
diff --git
a/src/dhcpv6.c
b/src/dhcpv6.c
index 17866889e6f06f327c6c48bb81a030e7314e5106..6ae6f7a02fd8d9040fc8b676cd81a73d361d21c6 100644
(file)
--- 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;