As the length could be zero and is RFC compliant.
Fixes #527.
# bits 4 and 5 are route preference
embed bitflags=00011 prf
embed uint32 lifetime
-embed truncated ip6address prefix
+embed optional truncated ip6address prefix
# ND6 options, RFC6101
definend 25 index embed rdnss
# bits 4 and 5 are route preference
embed bitflags=00011 prf
embed uint32 lifetime
-embed truncated ip6address prefix
+embed optional truncated ip6address prefix
# ND6 options, RFC6101
definend 25 index embed rdnss
t |= OT_RESERVED;
}
}
- if (t & OT_TRUNCATED && t != (OT_ADDRIPV6 | OT_TRUNCATED)) {
+ if (t & OT_TRUNCATED && !(t & OT_ADDRIPV6)) {
logerrx("truncated only works for ip6address");
return -1;
}