From: Stephen Hemminger <stephen@networkplumber.org>
To: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 1/1] lib: Align naming rules with the kernel
Date: Fri, 12 Dec 2025 13:55:23 +0900 [thread overview]
Message-ID: <20251212135523.432c07a9@stephen-xps.local> (raw)
In-Reply-To: <20251212042611.786603-2-mail@christoph.anton.mitterer.name>
On Fri, 12 Dec 2025 05:18:13 +0100
Christoph Anton Mitterer <mail@christoph.anton.mitterer.name> wrote:
> This aligns the naming rules with those of the kernel as set in the
> `dev_valid_name()`-function in `net/core/dev.c`.
>
> It also affects the validity of altnames.
>
> Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
> ---
> lib/utils.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lib/utils.c b/lib/utils.c
> index 0719281a..e4e5f337 100644
> --- a/lib/utils.c
> +++ b/lib/utils.c
> @@ -851,8 +851,10 @@ static int __check_ifname(const char *name)
> {
> if (*name == '\0')
> return -1;
> + if (!strcmp(name, ".") || !strcmp(name, ".."))
> + return -1;
> while (*name) {
> - if (*name == '/' || isspace(*name))
> + if (*name == '/' || *name == ':' || isspace(*name))
Do you check that this didn't break the legacy ifalias stuff?
next prev parent reply other threads:[~2025-12-12 4:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-12 4:18 [PATCH 0/1] lib: Align naming rules with the kernel Christoph Anton Mitterer
2025-12-12 4:18 ` [PATCH 1/1] " Christoph Anton Mitterer
2025-12-12 4:55 ` Stephen Hemminger [this message]
2025-12-12 5:32 ` Christoph Anton Mitterer
2025-12-12 5:03 ` [PATCH 0/1] " Stephen Hemminger
[not found] ` <28a0486bd08d59f8f2e758f73a39bd442547197f.camel@christoph.anton.mitterer.name>
[not found] ` <20251213092004.079f9cbe@stephen-xps.local>
2025-12-13 1:48 ` Christoph Anton Mitterer
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=20251212135523.432c07a9@stephen-xps.local \
--to=stephen@networkplumber.org \
--cc=mail@christoph.anton.mitterer.name \
--cc=netdev@vger.kernel.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