1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #3928 from authmillenon/gnrc_sixlowpan_nd/fix/opt-check

gnrc_sixlowpan_nd: fix 6ctx option check
This commit is contained in:
Oleg Hahm 2015-09-23 01:47:43 +02:00
commit 830bf36061

View File

@ -372,8 +372,8 @@ uint8_t gnrc_sixlowpan_nd_opt_ar_handle(kernel_pid_t iface, ipv6_hdr_t *ipv6,
bool gnrc_sixlowpan_nd_opt_6ctx_handle(uint8_t icmpv6_type, sixlowpan_nd_opt_6ctx_t *ctx_opt)
{
if (((ctx_opt->ctx_len < 64) && (ctx_opt->len != 2)) ||
((ctx_opt->ctx_len >= 64) && (ctx_opt->len != 3))) {
if (((ctx_opt->ctx_len <= 64) && (ctx_opt->len != 2)) ||
((ctx_opt->ctx_len > 64) && (ctx_opt->len != 3))) {
DEBUG("6lo nd: invalid 6LoWPAN context option received\n");
return false;
}