Skip to content

Commit 52e58d4

Browse files
committed
fix IPv4 header length compulate errors
Signed-off-by: Menglong Dong <imagedong@tencent.com>
1 parent 75bc199 commit 52e58d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

shared/bpf/skb_parse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ typedef struct {
152152

153153
static try_inline u8 get_ip_header_len(u8 h)
154154
{
155-
u8 len = (h & 0xF0) * 4;
155+
u8 len = (h & 0x0F) * 4;
156156
return len > IP_H_LEN ? len: IP_H_LEN;
157157
}
158158

0 commit comments

Comments
 (0)