linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Ido Schimmel <idosch@nvidia.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, horms@kernel.org, paul@paul-moore.com,
	petrm@nvidia.com, linux-security-module@vger.kernel.org
Subject: Re: [PATCH net-next 2/8] ipv4: icmp: Pass IPv4 control block structure as an argument to __icmp_send()
Date: Mon, 1 Sep 2025 20:36:55 -0600	[thread overview]
Message-ID: <22a53212-23a4-47d5-ab11-038e58b5e5a0@kernel.org> (raw)
In-Reply-To: <20250901083027.183468-3-idosch@nvidia.com>

On 9/1/25 2:30 AM, Ido Schimmel wrote:
> __icmp_send() is used to generate ICMP error messages in response to
> various situations such as MTU errors (i.e., "Fragmentation Required")
> and too many hops (i.e., "Time Exceeded").
> 
> The skb that generated the error does not necessarily come from the IPv4
> layer and does not always have a valid IPv4 control block in skb->cb.
> 
> Therefore, commit 9ef6b42ad6fd ("net: Add __icmp_send helper.") changed
> the function to take the IP options structure as argument instead of
> deriving it from the skb's control block. Some callers of this function
> such as icmp_send() pass the IP options structure from the skb's control
> block as in these call paths the control block is known to be valid, but
> other callers simply pass a zeroed structure.
> 
> A subsequent patch will need __icmp_send() to access more information
> from the IPv4 control block (specifically, the ifindex of the input
> interface). As a preparation for this change, change the function to
> take the IPv4 control block structure as an argument instead of the IP
> options structure. This makes the function similar to its IPv6
> counterpart that already takes the IPv6 control block structure as an
> argument.
> 
> No functional changes intended.
> 
> Reviewed-by: Petr Machata <petrm@nvidia.com>
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> ---
>  include/net/icmp.h    | 10 ++++++----
>  net/ipv4/cipso_ipv4.c | 12 ++++++------
>  net/ipv4/icmp.c       | 12 +++++++-----
>  net/ipv4/route.c      | 10 +++++-----
>  4 files changed, 24 insertions(+), 20 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>



  reply	other threads:[~2025-09-02  2:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-01  8:30 [PATCH net-next 0/8] ipv4: icmp: Fix source IP derivation in presence of VRFs Ido Schimmel
2025-09-01  8:30 ` [PATCH net-next 1/8] ipv4: cipso: Simplify IP options handling in cipso_v4_error() Ido Schimmel
2025-09-02  2:36   ` David Ahern
2025-09-04 21:46   ` Paul Moore
2025-09-01  8:30 ` [PATCH net-next 2/8] ipv4: icmp: Pass IPv4 control block structure as an argument to __icmp_send() Ido Schimmel
2025-09-02  2:36   ` David Ahern [this message]
2025-09-01  8:30 ` [PATCH net-next 3/8] ipv4: icmp: Fix source IP derivation in presence of VRFs Ido Schimmel
2025-09-02  2:37   ` David Ahern
2025-09-01  8:30 ` [PATCH net-next 4/8] selftests: traceroute: Return correct value on failure Ido Schimmel
2025-09-02  2:37   ` David Ahern
2025-09-01  8:30 ` [PATCH net-next 5/8] selftests: traceroute: Use require_command() Ido Schimmel
2025-09-02  2:38   ` David Ahern
2025-09-01  8:30 ` [PATCH net-next 6/8] selftests: traceroute: Reword comment Ido Schimmel
2025-09-01  8:30 ` [PATCH net-next 7/8] selftests: traceroute: Test traceroute with different source IPs Ido Schimmel
2025-09-02  2:39   ` David Ahern
2025-09-01  8:30 ` [PATCH net-next 8/8] selftests: traceroute: Add VRF tests Ido Schimmel
2025-09-02  2:40   ` David Ahern
2025-09-01  8:40 ` [PATCH net-next 0/8] ipv4: icmp: Fix source IP derivation in presence of VRFs Ido Schimmel
2025-09-01 18:43   ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22a53212-23a4-47d5-ab11-038e58b5e5a0@kernel.org \
    --to=dsahern@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=petrm@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).