Re: [PATCH net 1/2] ipv6: honor rule suppression in raw FIB lookups

From: Paolo Abeni

Date: Tue Nov 17 2026 - 07:54:13 EST


On 11/14/26 23:54, netdev-bot+sashiko@xxxxxxxxxx wrote:
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

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

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] For raw lookups, fib6_rule_suppress() (net/ipv6/fib6_rules.c)
evaluates suppress_ifgroup against a different nexthop than the dst-…

--

ipv6: honor rule suppression in raw FIB lookups

This patch makes fib6_rule_suppress() apply suppress_prefixlength and
suppress_ifgroup to raw fib6_table_lookup() results. For those results it
takes the prefix length from res->f6i and the device from res->nh. Raw
results marked RTF_REJECT are never suppressed, so a later rule cannot
bypass the rejection.

Link: https://github.com/firewalld/firewalld/issues/1600

diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index 0ffd7b47a0460..e8a44b540291d 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -283,19 +283,29 @@ INDIRECT_CALLABLE_SCOPE bool fib6_rule_suppress(struct fib_rule *rule,
struct fib_lookup_arg *arg)
{
struct fib6_result *res = arg->result;
- struct rt6_info *rt = res->rt6;
+ struct rt6_info *rt = NULL;
struct net_device *dev = NULL;
-
- if (!rt)
- return false;
-
- if (rt->rt6i_idev)
- dev = rt->rt6i_idev->dev;
+ int plen;
+
+ if (arg->lookup_ptr == fib6_table_lookup) {
+ /* Raw lookups report reject routes without an error. */
+ if (res->fib6_flags & RTF_REJECT)
+ return false;
+ plen = res->f6i->fib6_dst.plen;
+ dev = res->nh->fib_nh_dev;

[Severity: Medium]
For multipath routes, is this the same nexthop that the dst-based path
checks?
The AI comment Looks relevant.

I think this is net-next material: I would not push behavior
change to net.

Can this be solved within nft? The wording in the commit message
sounds like it's using the wrong API.

/P