From nobody Sun Sep 1 17:55:49 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wxfgn3cQjz5MhKJ; Sun, 01 Sep 2024 17:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wxfgn34tZz4rnH; Sun, 1 Sep 2024 17:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725213349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H6l1wwf0bI6bHxH7gs+Zwm/KO8QpUk/wJ1f/hNX+AmA=; b=hvqVzM1BC9xkn1U7tIkRbWsmUOdN4sRV9o09Zrz+VHCmfdHOLbgJKtMC4SGmPM0vxm9ll+ DMlfFUakm+OkaahIbvvd6e/LNlmkjqtJKsqRRX0SHvUhxxgP1dzUDnuUsj3EZtIjCP0uMx kL9QJ9bAXOaCcjb7AbtOBwe+Tdnk/l1WoAV1MlM3MqHZdPzGdgwjvVyxDl63jSCp0ADcne BMxkKOuGNCf/621/Gt3oygsuOku2OBygZrj3qCBTAOlrkpM+Lw6rtjIcS5/J4aqbWnw/Pe 5Aw3IYcLJu1AslgwVyEBd3QBSZKd4oh3zhx1PlIrgtahkHcjBLEh0Q4VB6M7nQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725213349; a=rsa-sha256; cv=none; b=SZfa55J3s0acJDsqp9DJ6b+Vt6FvgLY9rqkWGUjfZQ5FD/zeW91clZWFEZ+8vAZsMvJKSB VCvejKVRuC9jnvkkTkv3RX+AUTP2RENREbV6S0Xt9Du7sbQ+GE5KRpxsnS9HVCCCBhb6Ya ViU/R+kZIXbxEXN1SHUwXuFq4Pz9xzN+KPRBiccMUN5g7uNu63v9Mx5WdwGeenQI+OGnF0 FLb/pxsZXE/l9vq1+3wsrWYZVN7CUk1fw+hk1ASZdi2/sxuudlHQMF1ijVC+gUSM7s8BhU 6EOC1leiTs6Wyt5zXbxQv9DIxf4IA7yDDmdz+Nvipkn4yVDjxyvL2iK0u1vi9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725213349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H6l1wwf0bI6bHxH7gs+Zwm/KO8QpUk/wJ1f/hNX+AmA=; b=L3kbkkLpYJJhIgXyPX80QIi/0uryJshV5D2C1sCgfScL8rIPoyvsm84/6nDjJ0uzzcsEOa sCETPcM2ghY1m02kEzD1uAAC7c0B+j8z+66z5eH1zM/Rr4A+Ywa1NeARxHUs3P794/xvBv Hz1N8HXhOhz2kZNfQUtl3Bc2Ojif1tI2rEsjhhms2OXGc/zpf2jjzeEkSDbo/y28aBzkbG IxiG/jQswViypfAedQCmuLS8BLTU9AFMRDBamfYGsIusRC8pdpfFBefgcc2KdPYCLgabNM fhv3kRLXj8hol1cY9Sd2dLaI/FqZPf8ygcCkcDu82kIaFq7GXi3lh/aY4Nocuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Wxfgn2hFWzdh7; Sun, 1 Sep 2024 17:55:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 481Htn3E091423; Sun, 1 Sep 2024 17:55:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 481Htn7k091420; Sun, 1 Sep 2024 17:55:49 GMT (envelope-from git) Date: Sun, 1 Sep 2024 17:55:49 GMT Message-Id: <202409011755.481Htn7k091420@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vincenzo Maffione Subject: git: 574f00950dd0 - stable/13 - libnetmap: remove interface name validation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vmaffione X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 574f00950dd00137f4218d01ed9a2d7d4b733772 Auto-Submitted: auto-generated The branch stable/13 has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=574f00950dd00137f4218d01ed9a2d7d4b733772 commit 574f00950dd00137f4218d01ed9a2d7d4b733772 Author: Vincenzo Maffione AuthorDate: 2023-12-21 14:43:57 +0000 Commit: Vincenzo Maffione CommitDate: 2024-09-01 17:54:48 +0000 libnetmap: remove interface name validation When trying to use a VLAN device (e.g. "em0.123") with a dot the library fails to parse the interface correctly. The former pattern is much too restrictive given that almost all characters can be coerced into a device name via ifconfig. Remove the particularly restrictive validation. Some characters still cannot be used as an interface name as they are used as delimiters in the syntax, but this allows to be able to use most of them without an issue. Submitted by: franco@opnsense.org Differential Revision: https://reviews.freebsd.org/D42485 Reviewed by: vmaffione (cherry picked from commit ad874544d9f018bf8eef4053b5ca7b856c4674cb) --- lib/libnetmap/nmreq.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/libnetmap/nmreq.c b/lib/libnetmap/nmreq.c index fd6a9d47039a..56fbe3ad40b2 100644 --- a/lib/libnetmap/nmreq.c +++ b/lib/libnetmap/nmreq.c @@ -156,11 +156,6 @@ nmreq_header_decode(const char **pifname, struct nmreq_header *h, struct nmctx * for (pipesep = vpname; pipesep != scan && !index("{}", *pipesep); pipesep++) ; - if (!nm_is_identifier(vpname, pipesep)) { - nmctx_ferror(ctx, "%s: invalid port name '%.*s'", *pifname, - pipesep - vpname, vpname); - goto fail; - } if (pipesep != scan) { pipesep++; if (*pipesep == '\0') {