diff --git a/sys/dev/netmap/netmap_mem2.c b/sys/dev/netmap/netmap_mem2.c index 03a52b60dbfb..077ced81acb2 100644 --- a/sys/dev/netmap/netmap_mem2.c +++ b/sys/dev/netmap/netmap_mem2.c @@ -278,7 +278,7 @@ netmap_obj_offset(struct netmap_obj_pool *p, const void *vaddr) const char *base = p->lut[i].vaddr; ssize_t relofs = (const char *) vaddr - base; - if (relofs < 0 || relofs > p->_clustsize) + if (relofs < 0 || relofs >= p->_clustsize) continue; ofs = ofs + relofs;