From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: jorgeanton@gmail.com Received: from krantz.zx2c4.com (localhost [127.0.0.1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 3c9720be for ; Sat, 25 Aug 2018 15:37:37 +0000 (UTC) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 48e8b017 for ; Sat, 25 Aug 2018 15:37:37 +0000 (UTC) Received: by mail-it0-x243.google.com with SMTP id j81-v6so5948120ite.0 for ; Sat, 25 Aug 2018 08:50:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jorge AC Date: Sat, 25 Aug 2018 17:50:42 +0200 Message-ID: Subject: Re: [PATCH 1012/1012] Support for unicode interface names: only '%', ':' and '/' must be avoided To: Jason@zx2c4.com Content-Type: text/plain; charset="UTF-8" Cc: wireguard@lists.zx2c4.com List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Thank you for checking my regex with the kernel code lines :-) Definetly is insanity what drives me, I enjoy naming interfaces with unicodes like =E2=98=A2. 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 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 =3D=3D '\0') > return false; > if (strnlen(name, IFNAMSIZ) =3D=3D IFNAMSIZ) > return false; > if (!strcmp(name, ".") || !strcmp(name, "..")) > return false; > > while (*name) { > if (*name =3D=3D '/' || *name =3D=3D ':' || 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?