Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Phil Sutter
Thu, 15 Oct 2026 18:51
Re: [PATCH net-next v2 6/7] net: add ip4_parse()
Author: Phil Sutter
Date: Thu, 15 Oct 2026 18:51
Date: Thu, 15 Oct 2026 18:51
21 lines
7390 bytes
7390 bytes
Hi Michael, On Thu, Oct 15, 2026 at 08:41:45AM -0400, Michael S. Tsirkin wrote: > Multiple places in the net stack open-code the same minimal IPv4 header > validation: pull the fixed header, check version 4 and IHL >= 5 (where 5 > is the fixed header size in 32-bit units) - and locate the transport > header at IHL * 4 past the network header. > > Add a helper for doing that: it returns the validated header and > the transport header offset, or NULL if truncated or malformed. > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com> > Assisted-by: LLM Reviewed-by: Phil Sutter <phil@nwl.cc> Did you consider nft_inner_parse_l2l3 in net/netfilter/nft_inner.c and ip_mc_check_iphdr in net/ipv4/igmp.c as well? Cheers, Phil
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads