diff --git a/src/packet/ipv4_helpers.h b/src/packet/ipv4_helpers.h index c0d440d..e8e5671 100644 --- a/src/packet/ipv4_helpers.h +++ b/src/packet/ipv4_helpers.h @@ -76,7 +76,7 @@ static inline bool ipv4_hdr_has_flag_mf(const struct ip *hdr) static inline uint16_t ipv4_hdr_get_frag_offset(const struct ip *hdr) { - return ntohs(hdr->ip_off) & IP_OFFMASK; + return (ntohs(hdr->ip_off) & IP_OFFMASK) << 3; } static inline uint8_t ipv4_hdr_get_ttl(const struct ip *hdr)