Messages in this thread Patch in this message | | | Date | Sun, 16 Jan 2000 13:23:07 +0100 | From | Torsten Landschoff <> | Subject | Bug in BSD packet filter code |
| |
Hi Alan,
While reworking the tcpdump code specific for Linux I found a bug in net/core/filter.c. I think I don't need any explanation because the mistake is so evident.
Here is the patch
Torsten
-- Torsten Landschoff Bluehorn@IRC <torsten@debian.org> Debian Developer and Quality Assurance Committee Member --- filter.c.orig Sun Jan 16 13:20:40 2000 +++ filter.c Sun Jan 16 13:20:50 2000 @@ -49,7 +49,7 @@ else if (k>=SKF_LL_OFF) ptr = skb->mac.raw + k - SKF_LL_OFF; - if (ptr<skb->head && ptr < skb->tail) + if (ptr >= skb->head && ptr < skb->tail) return ptr; return NULL; } | |