Commit Graph

3 Commits

Author SHA1 Message Date
Toke Høiland-Jørgensen
dabfe929ae xdp/parsing_helpers: Check IP protocol version when parsing
Add a check that the protocol version field matches the expected value when
parsing IPv4 and IPv6 headers. This makes it possible to parse an IP header
that we don't know the version of (such as on interfaces that don't use an
Ethernet header).

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2021-06-18 00:56:08 +02:00
Toke Høiland-Jørgensen
a10dc23e4a parsing_helpers: Fix sizeof checks
As reported in the xdp-tutorial (where this code is from), there were a
couple of sizeof checks in parsing_helpers.h that was using the pointer
size instead of the size of the struct being pointed to.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2021-03-09 23:09:13 +01:00
Jesper Dangaard Brouer
5cf96508df Move parsing_helpers.h into new include directory
Adjust makefile construct to use the new include direcory.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-02-09 17:03:55 +01:00