Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packet01-parsing/xdp_prog_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static __always_inline int parse_ethhdr(struct hdr_cursor *nh,
/* Byte-count bounds check; check if current pointer + size of header
* is after data_end.
*/
if (nh->pos + 1 > data_end)
if (nh->pos + hdrsize > data_end)
return -1;

nh->pos += hdrsize;
Expand Down