Closed we1ru1 closed 9 months ago
Based on these lines:
invalid access to packet, off=34 size=1, R6(id=0,off=34,r=34)
R6 offset is outside of the packet
I would imagine that the verifier is objecting that you haven't checked that the packet is long enough for the ICMP header that you're trying to access. This is mentioned in chapter 8 of the book in the section "XDP Packet Parsing"
I am doing the first exercise in chapter8, modifying hello.bpf.c to print different content depending on the ping request message or response message. Here is my source program:
Then I executed the
sudo make
command, then:I want to know what went wrong and how to correct it. thanks