mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <razor@blackwall.org>
To: Danielle Ratson <danieller@nvidia.com>, netdev@vger.kernel.org
Cc: dsahern@kernel.org, idosch@nvidia.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, ja@ssi.bg, petrm@nvidia.com, fw@strlen.de,
	kuniyu@google.com, bridge@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/5] ipv6: ndisc: Add ndisc_check_ns_na() validation helper
Date: Mon, 20 Jul 2026 12:13:38 +0300	[thread overview]
Message-ID: <2b923c1c-8c00-4375-9ec2-0fa9b073fa91@blackwall.org> (raw)
In-Reply-To: <c7f894446494462bd72f717021aa4b6373f31131.1784463131.git.danieller@nvidia.com>

On 19/07/2026 16:34, Danielle Ratson wrote:
> Add ndisc_check_ns_na(), a standalone NS/NA packet validator modeled
> after ipv6_mc_check_mld(). It performs the RFC 4861 section 7.1.1
> (Neighbor Solicitation) and 7.1.2 (Neighbor Advertisement) mandatory
> checks that are relevant for software operating at the bridge level,
> where packets bypass the normal IPv6 stack path:
> 
>   - Hop Limit must be 255 (packet was not forwarded by a router)
>   - ICMPv6 checksum is valid
>   - ICMP Code is 0
>   - ICMP length is at least 24 octets (sizeof(struct nd_msg))
>   - Target Address must not be a multicast address
>   - All included options have a length that is greater than zero
>   - NS/DAD: destination must be a solicited-node multicast address
>   - NS/DAD: no Source Link-Layer Address option when source is unspecified
>   - NA: Solicited flag must be 0 when IP Destination is multicast
> 
> On success the function sets the skb transport header and returns 0,
> matching the convention of ipv6_mc_check_mld().
> 
> Reviewed-by: Petr Machata <petrm@nvidia.com>
> Signed-off-by: Danielle Ratson <danieller@nvidia.com>
> ---
>   include/net/ndisc.h    |   2 +
>   net/ipv6/Makefile      |   2 +-
>   net/ipv6/ndisc_snoop.c | 190 +++++++++++++++++++++++++++++++++++++++++
>   3 files changed, 193 insertions(+), 1 deletion(-)
>   create mode 100644 net/ipv6/ndisc_snoop.c
> 

Acked-by: Nikolay Aleksandrov <razor@blackwall.org>



  reply	other threads:[~2026-07-20  9:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-19 13:34 [PATCH net-next 0/5] bridge: Validate and clean up IPv6 neighbour suppression Danielle Ratson
2026-07-19 13:34 ` [PATCH net-next 1/5] bridge: Use direct pointer in br_is_nd_neigh_msg() Danielle Ratson
2026-07-20  8:58   ` Nikolay Aleksandrov
2026-07-19 13:34 ` [PATCH net-next 2/5] ipv6: ndisc: Add ndisc_check_ns_na() validation helper Danielle Ratson
2026-07-20  9:13   ` Nikolay Aleksandrov [this message]
2026-07-19 13:34 ` [PATCH net-next 3/5] bridge: Validate NS/NA messages using ndisc_check_ns_na() Danielle Ratson
2026-07-20  9:14   ` Nikolay Aleksandrov
2026-07-19 13:34 ` [PATCH net-next 4/5] bridge: Linearize skb once the ND message type is validated Danielle Ratson
2026-07-20  9:26   ` Nikolay Aleksandrov
2026-07-26 11:03     ` Danielle Ratson
2026-07-27  9:17       ` Nikolay Aleksandrov
2026-07-19 13:34 ` [PATCH net-next 5/5] bridge: Use ndisc_parse_options() to parse ND options in br_nd_send() Danielle Ratson
2026-07-20  9:27   ` Nikolay Aleksandrov
2026-07-20  9:31 ` [PATCH net-next 0/5] bridge: Validate and clean up IPv6 neighbour suppression Nikolay Aleksandrov
2026-07-23  6:40   ` Danielle Ratson
2026-07-23  9:20     ` Nikolay Aleksandrov
2026-07-23  9:49       ` Petr Machata

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=2b923c1c-8c00-4375-9ec2-0fa9b073fa91@blackwall.org \
    --to=razor@blackwall.org \
    --cc=bridge@lists.linux.dev \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=ja@ssi.bg \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®