mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] ipv6: fix rt6_fill_node() multicast route query handling
@ 2026-11-12  9:46 Wenbo Sun
  2026-11-12  9:46 ` [PATCH net-next v2 1/2] ipv6: check mc_forwarding before calling ip6mr_get_route() Wenbo Sun
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wenbo Sun @ 2026-11-12  9:46 UTC (permalink / raw)
  To: David Ahern, Ido Schimmel, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Hangbin Liu, Hangbin Liu, netdev, linux-kernel,
	sunwenbo, 1342116488

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




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH net-next v2 1/2] ipv6: check mc_forwarding before calling ip6mr_get_route()
  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 ` Wenbo Sun
  2026-11-16 13:54   ` netdev-bot+sashiko
  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 ` [PATCH net-next v2 0/2] ipv6: fix rt6_fill_node() multicast route query handling Hangbin Liu
  2 siblings, 1 reply; 6+ messages in thread
From: Wenbo Sun @ 2026-11-12  9:46 UTC (permalink / raw)
  To: David Ahern, Ido Schimmel, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Hangbin Liu, Hangbin Liu, netdev, linux-kernel,
	sunwenbo, 1342116488

When CONFIG_IPV6_MROUTE is enabled, rt6_fill_node() calls
ip6mr_get_route() whenever an input interface is specified and the
destination address is multicast.

However, when multicast routing is not enabled in the network namespace
(i.e. mc_forwarding is 0), there is typically no matching (S,G)
multicast routing cache entry, and skb->dev is NULL in the query skb
allocated by inet6_rtm_getroute(). As a result, ip6mr_get_route()
returns -ENODEV, which causes rt6_fill_node() to jump to
nla_put_failure and report -EMSGSIZE ("RTNETLINK answers: Message too
long") to userspace.

In contrast, the IPv4 counterpart rt_fill_info() checks
IPV4_DEVCONF_ALL_RO(net, MC_FORWARDING) before calling ipmr_get_route(),
so queries with mc_forwarding disabled fall back to emitting RTA_IIF and
normal route attributes.

This discrepancy was identified with the assistance of an LLM-based code
review comparing IPv4 and IPv6 multicast route get handling, confirmed on
a UML kernel where "ip -6 route get <mcast_addr> from <src_addr> iif
<dev>" returned -EMSGSIZE on an unpatched kernel, and verified after the
change that multicast route get with iif succeeds while unicast and
non-iif multicast queries continue to work as expected.

Check atomic_read(&net->ipv6.devconf_all->mc_forwarding) before calling
ip6mr_get_route() in rt6_fill_node() so that queries with multicast
forwarding disabled report RTA_IIF and normal route attributes, matching
IPv4 behavior.

Built with W=1 on UML, x86_64 allmodconfig, and x86_64 allyesconfig with
zero new warnings or errors.

Signed-off-by: Wenbo Sun <sunwenbo@cmss.chinamobile.com>
Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
---
 net/ipv6/route.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 2eb884558c24..6dd4a70f6490 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -5862,7 +5862,8 @@ static int rt6_fill_node(struct net *net, struct sk_buff *skb,
 #endif
 	if (iif) {
 #ifdef CONFIG_IPV6_MROUTE
-		if (ipv6_addr_is_multicast(&rt6_dst->addr)) {
+		if (ipv6_addr_is_multicast(&rt6_dst->addr) &&
+		    atomic_read(&net->ipv6.devconf_all->mc_forwarding)) {
 			int err = ip6mr_get_route(net, skb, rtm, portid);
 
 			if (err == 0)
-- 
2.33.0




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH net-next v2 2/2] ipv6: preserve ip6mr_get_route() error in rt6_fill_node()
  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 ` Wenbo Sun
  2026-11-16 13:54   ` netdev-bot+sashiko
  2026-11-13  2:29 ` [PATCH net-next v2 0/2] ipv6: fix rt6_fill_node() multicast route query handling Hangbin Liu
  2 siblings, 1 reply; 6+ messages in thread
From: Wenbo Sun @ 2026-11-12  9:46 UTC (permalink / raw)
  To: David Ahern, Ido Schimmel, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Hangbin Liu, Hangbin Liu, netdev, linux-kernel,
	sunwenbo, 1342116488

In rt6_fill_node(), when ip6mr_get_route() fails with a negative error
(for example -ENODEV, -ENOENT, -ENOMEM, or -ENOBUFS), the error path
currently jumps to nla_put_failure and unconditionally returns -EMSGSIZE
("RTNETLINK answers: Message too long").

Among all callers of rt6_fill_node(), only inet6_rtm_getroute() passes
a non-zero iif and propagates negative errors back to userspace. Keeping
-EMSGSIZE as the default return value for attribute put failures while
preserving the negative error returned by ip6mr_get_route() lets
userspace see the actual failure reason when multicast forwarding is
enabled.

This issue was pointed out during code review of rt6_fill_node() by
Hangbin Liu, confirmed on a UML kernel with MRT6_INIT enabled (where
"ip -6 route get ff0e::1 from 2001:db8::3 iif d0" reported "Message too
long" despite the failure in ip6mr_get_route() being -ENODEV), and
verified after the patch that it returns -ENODEV ("No such device")
instead while other rt6_fill_node() paths behave unchanged.

Built with W=1 on UML, x86_64 allmodconfig, and x86_64 allyesconfig with
zero new warnings or errors.

Suggested-by: Hangbin Liu <liuhangbin@kylinos.cn>
Signed-off-by: Wenbo Sun <sunwenbo@cmss.chinamobile.com>
---
 net/ipv6/route.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 6dd4a70f6490..11ce0db66484 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -5808,6 +5808,7 @@ static int rt6_fill_node(struct net *net, struct sk_buff *skb,
 	struct nlmsghdr *nlh;
 	struct rtmsg *rtm;
 	long expires = 0;
+	int err = -EMSGSIZE;
 
 	nlh = nlmsg_put(skb, portid, seq, type, sizeof(*rtm), flags);
 	if (!nlh)
@@ -5864,12 +5865,14 @@ static int rt6_fill_node(struct net *net, struct sk_buff *skb,
 #ifdef CONFIG_IPV6_MROUTE
 		if (ipv6_addr_is_multicast(&rt6_dst->addr) &&
 		    atomic_read(&net->ipv6.devconf_all->mc_forwarding)) {
-			int err = ip6mr_get_route(net, skb, rtm, portid);
+			int ret = ip6mr_get_route(net, skb, rtm, portid);
 
-			if (err == 0)
+			if (ret == 0)
 				return 0;
-			if (err < 0)
+			if (ret < 0) {
+				err = ret;
 				goto nla_put_failure;
+			}
 		} else
 #endif
 			if (nla_put_u32(skb, RTA_IIF, iif))
@@ -5992,7 +5995,7 @@ static int rt6_fill_node(struct net *net, struct sk_buff *skb,
 
 nla_put_failure:
 	nlmsg_cancel(skb, nlh);
-	return -EMSGSIZE;
+	return err;
 }
 
 static int fib6_info_nh_uses_dev(struct fib6_nh *nh, void *arg)
-- 
2.33.0




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next v2 0/2] ipv6: fix rt6_fill_node() multicast route query handling
  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
  2 siblings, 0 replies; 6+ messages in thread
From: Hangbin Liu @ 2026-11-13  2:29 UTC (permalink / raw)
  To: Wenbo Sun
  Cc: David Ahern, Ido Schimmel, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, Hangbin Liu, netdev,
	linux-kernel, 1342116488

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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next v2 1/2] ipv6: check mc_forwarding before calling ip6mr_get_route()
  2026-11-12  9:46 ` [PATCH net-next v2 1/2] ipv6: check mc_forwarding before calling ip6mr_get_route() Wenbo Sun
@ 2026-11-16 13:54   ` netdev-bot+sashiko
  0 siblings, 0 replies; 6+ messages in thread
From: netdev-bot+sashiko @ 2026-11-16 13:54 UTC (permalink / raw)
  To: sunwenbo
  Cc: dsahern, idosch, davem, edumazet, kuba, pabeni, horms,
	hangbin.liu, liuhangbin, netdev, linux-kernel, 1342116488

Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 1

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] The fix only works when multicast forwarding is off.
- [Low] The commit fixes a reproducible, user-visible failure: on
  CONFIG_IPV6_MROUTE kernels with mc_forwarding at 0, `ip -6 route get…

--

ipv6: check mc_forwarding before calling ip6mr_get_route()

This commit makes the ip6mr_get_route() call in rt6_fill_node() depend
on devconf_all->mc_forwarding. With multicast forwarding disabled,
multicast route get queries with an iif then emit RTA_IIF and the normal
route attributes. The goal is to match IPv4 rt_fill_info() behavior.

> Signed-off-by: Wenbo Sun <sunwenbo@cmss.chinamobile.com>
> Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>

[Severity: Low]
This fixes a user-visible "RTNETLINK answers: Message too long" from
ip -6 route get, but the commit has no Fixes: tag.

git blame traces the multicast ip6mr_get_route() branch in
rt6_fill_node(), which had no mc_forwarding check, back to:

commit 7bc570c8b4f7 ("[IPV6] MROUTE: Support multicast forwarding.")

Later commits changed that branch: fd61c6ba313d ("net: ipv6: remove
nowait arg to rt6_fill_node") reworked the error handling, and
22d0bd82cc7c ("ipv6: use rt6_info members when dst is set in
rt6_fill_node") changed the condition.

Could a Fixes: tag be added so stable backporters can tell which
releases need this?

> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index 04098cf32eabe..cb8cfd8b5c8b7 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -5862,7 +5862,8 @@ static int rt6_fill_node(struct net *net, struct sk_buff *skb,
>  #endif
>  	if (iif) {
>  #ifdef CONFIG_IPV6_MROUTE
> -		if (ipv6_addr_is_multicast(&rt6_dst->addr)) {
> +		if (ipv6_addr_is_multicast(&rt6_dst->addr) &&
> +		    atomic_read(&net->ipv6.devconf_all->mc_forwarding)) {
>  			int err = ip6mr_get_route(net, skb, rtm, portid);
>  
>  			if (err == 0)

[Severity: Medium]
Does this cover only the forwarding-disabled case? The commit message
says the -ENODEV comes from skb->dev being NULL in the reply skb that
inet6_rtm_getroute() allocates. After this patch, skb->dev is still
never set.

In the iif branch of inet6_rtm_getroute(), dev is resolved and passed
to the lookup, but the reply skb only gets a dst:

net/ipv6/route.c:inet6_rtm_getroute() {
    ...
		dst = ip6_route_input_lookup(net, dev, &fl6, NULL, flags);
    ...
	skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
    ...
	skb_dst_set(skb, &rt->dst);
    ...
}

When a multicast routing daemon opens an mroute socket, ip6mr_sk_init()
does:

		atomic_inc(&net->ipv6.devconf_all->mc_forwarding);

After that the new check passes, and ip6mr_get_route() is still called
with a NULL skb->dev. On a cache miss, the (*,G) lookup guarded by
"if (!cache && skb->dev)" is skipped, and then:

net/ipv6/ip6mr.c:ip6mr_get_route() {
    ...
		dev = skb->dev;
		if (!dev || (vif = ip6mr_find_vif(mrt, dev)) < 0) {
			rcu_read_unlock();
			return -ENODEV;
		}
    ...
}

This happens even when the iif is a configured MIF.

In that setup, would "ip -6 route get <mcast> from <src> iif <dev>"
still return -EMSGSIZE? With the follow-up "ipv6: preserve
ip6mr_get_route() error in rt6_fill_node()" applied, it would return
-ENODEV instead, but the query would still fail.

For comparison, IPv4's inet_rtm_getroute() sets the device on the reply
skb:

		fl4.flowi4_iif = iif; /* for rt_fill_info */
		skb->dev	= dev;

This lets ipmr_get_route() find the VIF, then either queue an
unresolved entry or return the mroute data.

Should inet6_rtm_getroute() also set skb->dev = dev in its iif branch,
so that the "matching IPv4 behavior" claim also holds with
mc_forwarding enabled?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112094630.197244-1-sunwenbo%40cmss.chinamobile.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next v2 2/2] ipv6: preserve ip6mr_get_route() error in rt6_fill_node()
  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-16 13:54   ` netdev-bot+sashiko
  0 siblings, 0 replies; 6+ messages in thread
From: netdev-bot+sashiko @ 2026-11-16 13:54 UTC (permalink / raw)
  To: sunwenbo
  Cc: dsahern, idosch, davem, edumazet, kuba, pabeni, horms,
	hangbin.liu, liuhangbin, netdev, linux-kernel, 1342116488

Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 1

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] The patch does not deliver the 'actual failure reason' its
  commit message promises.
- [Low] The patch fixes a user-visible wrong errno (RTM_GETROUTE returns
  EMSGSIZE, 'Message too long', instead of the underlying…

--

ipv6: preserve ip6mr_get_route() error in rt6_fill_node()

With this patch, rt6_fill_node() returns the negative error from
ip6mr_get_route() to the caller. Before, it always returned -EMSGSIZE.
Attribute put failures still return -EMSGSIZE.

> Suggested-by: Hangbin Liu <liuhangbin@kylinos.cn>
> Signed-off-by: Wenbo Sun <sunwenbo@cmss.chinamobile.com>

[Severity: Low]
This fixes an errno that userspace can see, but there is no Fixes: tag.
It also isn't clear whether the patch is aimed at net or net-next.

The -EMSGSIZE that hides ip6mr_get_route() failures goes back to
commit 7bc570c8b4f75d ("[IPV6] MROUTE: Support multicast forwarding.").
Commit fd61c6ba313de6 ("net: ipv6: remove nowait arg to rt6_fill_node")
simplified that branch and kept it.

If this is meant for net, should it carry a Fixes: tag? If it is meant
as a net-next change to an errno visible to userspace, could the commit
message say so?

> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index cb8cfd8b5c8b7..fc4f4c1cda583 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c

[ ... ]

> @@ -5864,12 +5865,14 @@ static int rt6_fill_node(struct net *net, struct sk_buff *skb,
>  #ifdef CONFIG_IPV6_MROUTE
>  		if (ipv6_addr_is_multicast(&rt6_dst->addr) &&
>  		    atomic_read(&net->ipv6.devconf_all->mc_forwarding)) {
> -			int err = ip6mr_get_route(net, skb, rtm, portid);
> +			int ret = ip6mr_get_route(net, skb, rtm, portid);
>  
> -			if (err == 0)
> +			if (ret == 0)
>  				return 0;
> -			if (err < 0)
> +			if (ret < 0) {
> +				err = ret;
>  				goto nla_put_failure;
> +			}

[Severity: Medium]
Does this actually give userspace the real failure reason?

inet6_rtm_getroute() is the only caller that passes a non-zero iif. It
builds the reply skb without ever setting skb->dev:

net/ipv6/route.c:inet6_rtm_getroute() {
    ...
	skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
    ...
	skb_dst_set(skb, &rt->dst);
    ...
}

With skb->dev NULL, ip6mr_get_route() skips the (*,G) lookup. It then
returns -ENODEV every time there is no (S,G) cache entry:

net/ipv6/ip6mr.c:ip6mr_get_route() {
    ...
	cache = ip6mr_cache_find(mrt, &rt->rt6i_src.addr, &rt->rt6i_dst.addr);
	if (!cache && skb->dev) {
    ...
	if (!cache) {
    ...
		dev = skb->dev;
		if (!dev || (vif = ip6mr_find_vif(mrt, dev)) < 0) {
			rcu_read_unlock();
			return -ENODEV;
		}
    ...
}

So when mc_forwarding is enabled, RTM_GETROUTE for any multicast (S,G)
with no MFC entry now fails with "No such device". This happens whether
or not the iif is a registered MIF. It also happens even though
inet6_rtm_getroute() has just found the device with
dev_get_by_index_rcu().

The "ip -6 route get ff0e::1 from 2001:db8::3 iif d0" test in the
commit message seems to show this case: the device d0 exists, but the
reply is still "No such device".

inet6_rtm_getroute() already returns the same errno when the iif
ifindex doesn't exist:

	dev = dev_get_by_index_rcu(net, iif);
	if (!dev) {
		rcu_read_unlock();
		err = -ENODEV;
		goto errout;
	}

Because of that, userspace can't tell a missing interface from a
missing multicast cache entry.

The commit message says:

  "(for example -ENODEV, -ENOENT, -ENOMEM, or -ENOBUFS)"

-ENOMEM and -ENOBUFS only come from the alloc_skb() and
ip6mr_cache_unresolved() branch, and that branch needs a non-NULL
skb->dev. Can any caller reach them?

In practice the values that can occur look like:

  -ENODEV
  -ENOENT (no table, or mr_fill_mroute() on an unresolved entry)
  -EMSGSIZE
  -EINVAL (from the mr_fill_mroute() stub)

For comparison, inet_rtm_getroute() in net/ipv4/route.c does set the
device:

		skb->dev	= dev;

That lets ipmr_get_route() handle the (*,G) lookup and the unresolved
queue.

Should inet6_rtm_getroute() set skb->dev the same way? That would also
mean handling the async unresolved-queue path. Otherwise, should the
commit message be corrected, possibly with an extack message added?

>  		} else
>  #endif
>  			if (nla_put_u32(skb, RTA_IIF, iif))

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112094630.197244-1-sunwenbo%40cmss.chinamobile.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-16 13:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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-16 13:54   ` netdev-bot+sashiko
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-16 13:54   ` netdev-bot+sashiko
2026-11-13  2:29 ` [PATCH net-next v2 0/2] ipv6: fix rt6_fill_node() multicast route query handling Hangbin Liu

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®