From: David Ahern <dsahern@kernel.org>
To: Zhixing Chen <running910@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2-next] iprule: warn about host bits in IPv4 rule prefixes
Date: Mon, 14 Sep 2026 08:06:08 -0600 [thread overview]
Message-ID: <c50249fa-ceaf-4c53-a69f-603adb482326@kernel.org> (raw)
In-Reply-To: <CAMyuFdWdeDna+FMmOkJwQOCN4GO6=Zu4m5DyX7XbeT=Zqr6PKQ@mail.gmail.com>
On 9/14/26 2:45 AM, Zhixing Chen wrote:
> Hi David,
>
>> detects more than just host entries in the mask, no? 10.1.0.0/8 would
>> also throw a warning mesage, but that is not a host address
>
> Thanks, that is a fair point.
>
> What I meant to check is non-zero bits outside the prefix length, not
> "host addresses" specifically. I agree the wording is misleading.
>
> Do you think a warning explaining the actual match would be useful, e.g.
>
> Warning: from 10.1.0.0/8 matches 10.0.0.0/8; bits outside the prefix
> are ignored
>
> or would you prefer not to warn about this in iproute2?
>
> I am not strongly attached to the patch. I noticed this after I was
> initially surprised by rules such as 192.168.0.147/24 matching the whole
> 192.168.0.0/24 prefix.
>
I do not believe it is a big deal and that code has existed for a very
long time.
prev parent reply other threads:[~2026-09-14 14:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 3:31 [PATCH iproute2-next] iprule: warn about host bits in IPv4 rule prefixes Zhixing Chen
2026-09-12 20:56 ` David Ahern
2026-09-14 7:45 ` Zhixing Chen
2026-09-14 14:06 ` David Ahern [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=c50249fa-ceaf-4c53-a69f-603adb482326@kernel.org \
--to=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=running910@gmail.com \
--cc=stephen@networkplumber.org \
/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