[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJ6aodRDPYRw9hYP6gVai5TAV_J2WU1yzAsPCU-56-Bwg@mail.gmail.com>
Date: Mon, 8 Sep 2025 00:51:12 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Ido Schimmel <idosch@...dia.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com, horms@...nel.org, paul@...l-moore.com, dsahern@...nel.org,
petrm@...dia.com, linux-security-module@...r.kernel.org
Subject: Re: [PATCH net-next v2 1/8] ipv4: cipso: Simplify IP options handling
in cipso_v4_error()
On Mon, Sep 8, 2025 at 12:35 AM Ido Schimmel <idosch@...dia.com> wrote:
>
> When __ip_options_compile() is called with an skb, the IP options are
> parsed from the skb data into the provided IP option argument. This is
> in contrast to the case where the skb argument is NULL and the options
> are parsed from opt->__data.
>
> Given that cipso_v4_error() always passes an skb to
> __ip_options_compile(), there is no need to allocate an extra 40 bytes
> (maximum IP options size).
>
> Therefore, simplify the function by removing these extra bytes and make
> the function similar to ipv4_send_dest_unreach() which also calls both
> __ip_options_compile() and __icmp_send().
>
> This is a preparation for changing the arguments being passed to
> __icmp_send().
>
> No functional changes intended.
>
> Reviewed-by: Petr Machata <petrm@...dia.com>
> Reviewed-by: David Ahern <dsahern@...nel.org>
> Acked-by: Paul Moore <paul@...l-moore.com>
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists