diff --git a/src/netif/lowpan6.c b/src/netif/lowpan6.c index 582d8b8e..15d10278 100644 --- a/src/netif/lowpan6.c +++ b/src/netif/lowpan6.c @@ -564,7 +564,7 @@ lowpan6_frag(struct netif *netif, struct pbuf *p, const struct ieee_802154_addr err_t lowpan6_set_context(u8_t idx, const ip6_addr_t * context) { - if (idx > LWIP_6LOWPAN_NUM_CONTEXTS) { + if (idx >= LWIP_6LOWPAN_NUM_CONTEXTS) { return ERR_ARG; }