Netdev List
 help / color / mirror / Atom feed
From: Hangbin Liu <hangbin.liu@linux.dev>
To: Wenbo Sun <sunwenbo@cmss.chinamobile.com>
Cc: David Ahern <dsahern@kernel.org>,
	Ido Schimmel <idosch@nvidia.com>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Hangbin Liu <liuhangbin@kylinos.cn>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	1342116488@qq.com
Subject: Re: [PATCH net-next v2 0/2] ipv6: fix rt6_fill_node() multicast route query handling
Date: Fri, 13 Nov 2026 10:29:05 +0800	[thread overview]
Message-ID: <avZ18UxLG0q9rh_i@fedora> (raw)
In-Reply-To: <20261112094630.197244-1-sunwenbo@cmss.chinamobile.com>

On Thu, Nov 12, 2026 at 05:46:28PM +0800, Wenbo Sun wrote:
> When querying an IPv6 multicast route with an input interface via
> "ip -6 route get <mcast_addr> from <src_addr> iif <dev>", rt6_fill_node()
> currently calls ip6mr_get_route() unconditionally and masks any negative
> error returned by ip6mr_get_route() with -EMSGSIZE at nla_put_failure.
> 
> Patch 1 checks mc_forwarding before calling ip6mr_get_route(), matching
> IPv4 rt_fill_info() so queries succeed with RTA_IIF when multicast
> routing is disabled. Patch 2 preserves the negative error returned by
> ip6mr_get_route() instead of overwriting it with -EMSGSIZE when
> multicast forwarding is enabled.
> 
> Thanks to Hangbin Liu for reviewing v1 and pointing out the error
> masking issue in rt6_fill_node().
> 
> Changes in v2:
> - Reword patch 1 commit message for clearer tone and carry
>   Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>.
> - Add patch 2 to preserve negative errors returned by ip6mr_get_route()
>   instead of returning -EMSGSIZE from nla_put_failure, with
>   Suggested-by: Hangbin Liu <liuhangbin@kylinos.cn>.
> - Verify both mc_forwarding=0 and mc_forwarding=1 (MRT6_INIT) cases in
>   a UML kernel alongside W=1 builds on UML, x86_64 allmodconfig, and
>   x86_64 allyesconfig.
> 
> Link: https://lore.kernel.org/netdev/20261111094528.425826-1-sunwenbo@cmss.chinamobile.com/ [v1]
> 
> Wenbo Sun (2):
>   ipv6: check mc_forwarding before calling ip6mr_get_route()
>   ipv6: preserve ip6mr_get_route() error in rt6_fill_node()
> 
>  net/ipv6/route.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> -- 
> 2.33.0
> 
> 
> 

Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>

      parent reply	other threads:[~2026-11-13  2:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12  9:46 [PATCH net-next v2 0/2] ipv6: fix rt6_fill_node() multicast route query handling Wenbo Sun
2026-11-12  9:46 ` [PATCH net-next v2 1/2] ipv6: check mc_forwarding before calling ip6mr_get_route() Wenbo Sun
2026-11-12  9:46 ` [PATCH net-next v2 2/2] ipv6: preserve ip6mr_get_route() error in rt6_fill_node() Wenbo Sun
2026-11-13  2:29 ` Hangbin Liu [this message]

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=avZ18UxLG0q9rh_i@fedora \
    --to=hangbin.liu@linux.dev \
    --cc=1342116488@qq.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuhangbin@kylinos.cn \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sunwenbo@cmss.chinamobile.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