[PATCH 1012/1012] Support for unicode interface names: only '%', ':' and '/' must be avoided
Jorge AC
jorgeanton at gmail.com
Sat Aug 25 17:50:42 CEST 2018
Thank you for checking my regex with the kernel code lines :-)
Definetly is insanity what drives me, I enjoy naming interfaces with
unicodes like ☢.
Nevertheless, thinking about a legit use, it could be a nice gesture
for those non-latin1 people who wants to use their language.
On Sat, Aug 25, 2018 at 7:26 AM Jason A. Donenfeld <Jason at zx2c4.com> wrote:
>
> Indeed it looks like we could be slightly more permissive. From net/core/dev.c:
>
> /**
> * dev_valid_name - check if name is okay for network device
> * @name: name string
> *
> * Network device names need to be valid file names to
> * to allow sysfs to work. We also disallow any kind of
> * whitespace.
> */
> bool dev_valid_name(const char *name)
> {
> if (*name == '\0')
> return false;
> if (strnlen(name, IFNAMSIZ) == IFNAMSIZ)
> return false;
> if (!strcmp(name, ".") || !strcmp(name, ".."))
> return false;
>
> while (*name) {
> if (*name == '/' || *name == ':' || isspace(*name))
> return false;
> name++;
> }
> return true;
> }
>
> And earlier in the callstack, %d is checked for, which indeed adds %
> to the blacklist, as your commit indicates.
>
> But should wg-quick enable insane dev names?
More information about the WireGuard
mailing list