projects
/
oweals
/
odhcp6c.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b5c2085
)
Fix including PD in request
author
Steven Barth
<steven@midlink.org>
Thu, 1 Aug 2013 07:28:27 +0000
(09:28 +0200)
committer
Steven Barth
<steven@midlink.org>
Thu, 1 Aug 2013 07:28:27 +0000
(09:28 +0200)
src/dhcpv6.c
patch
|
blob
|
history
diff --git
a/src/dhcpv6.c
b/src/dhcpv6.c
index 9742c39dd4316cf1c750246d19ef43319d6ec2b1..3f5bc83094d6589ce2dc509d77f0989ab0ac73c2 100644
(file)
--- a/
src/dhcpv6.c
+++ b/
src/dhcpv6.c
@@
-567,6
+567,13
@@
static int dhcpv6_handle_advert(enum dhcpv6_msg orig,
struct dhcpv6_server_cand cand = {false, false, 0, 0, {0}, NULL, NULL, 0, 0};
dhcpv6_for_each_option(opt, end, otype, olen, odata) {
struct dhcpv6_server_cand cand = {false, false, 0, 0, {0}, NULL, NULL, 0, 0};
dhcpv6_for_each_option(opt, end, otype, olen, odata) {
+ if (orig == DHCPV6_MSG_SOLICIT &&
+ (otype == DHCPV6_OPT_IA_PD || otype == DHCPV6_OPT_IA_NA) &&
+ olen > sizeof(struct dhcpv6_ia_hdr)) {
+ struct dhcpv6_ia_hdr *ia_hdr = (void*)(&odata[-4]);
+ dhcpv6_parse_ia(&ia_hdr[1], odata + olen);
+ }
+
if (otype == DHCPV6_OPT_SERVERID && olen <= 130) {
memcpy(cand.duid, odata, olen);
cand.duid_len = olen;
if (otype == DHCPV6_OPT_SERVERID && olen <= 130) {
memcpy(cand.duid, odata, olen);
cand.duid_len = olen;
@@
-598,13
+605,6
@@
static int dhcpv6_handle_advert(enum dhcpv6_msg orig,
cand.preference -= 2000;
}
}
cand.preference -= 2000;
}
}
-
- if (orig == DHCPV6_MSG_SOLICIT &&
- (otype == DHCPV6_OPT_IA_PD || otype == DHCPV6_OPT_IA_NA) &&
- olen > sizeof(struct dhcpv6_ia_hdr)) {
- struct dhcpv6_ia_hdr *ia_hdr = (void*)(&odata[-4]);
- dhcpv6_parse_ia(&ia_hdr[1], odata + olen);
- }
}
if (cand.duid_len > 0) {
}
if (cand.duid_len > 0) {