From nobody Thu Dec 21 14:46:41 2023 X-Original-To: dev-commits-src-main@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 4SwtYF572bz54smH; Thu, 21 Dec 2023 14:46:41 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SwtYF4Tknz4dSt; Thu, 21 Dec 2023 14:46:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703170001; 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=4hL/gB48AWxNvg4FU/1Guj8F95El29hbuaieQCvjohs=; b=K9JT0VvB94xgSjkonXXMX5bdog0UJHIniVLdG4KwVDvCBW1+7vnuYWwsbKdqrkhyUKnvIC m7+YNRwdn6ylVYqTZCLno6lQXTog/RjkYfvIE7ZBArh+Wjgy3RtGQbxpk/JUy9JO/T8ySK GdNlr3AYPYwAnKChzDTjKEXyZAZ0mCzfgQVtJDXMIzErLWrRGf4kE0IkU4k2t4iGFHelFX JFurc4I2S8fMSSMgjs+0P4QP57WrshwISq977IX5pQBNX+F1gZ6YlbDKI1F7x06LcanhKm yQd8+O9OSoAjeFjmavtrhd9BD4cv2oZve6c3FhayPHIqoiF1QJytemRXPfeBqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703170001; a=rsa-sha256; cv=none; b=w3XpyrL7ixqAQeh2jJFQro33klxe+g5CGiyrL86BF51DY2+Br9Gj8vIkNuAwKyzn+2yKIa JuSuj5Mq5g7uZdvSZh6hRC4qNL0udYLhzFwyNfwMd45C2fuyCIrH9PR+05QfUKdxaiKmsj pUO/Wr5+vdt+mr6d+zpZ0dnI+QK9X3R3lyVUItl2tDgP+pMayzZT3vGAlmpuMwz7ttIm31 o2xkJu8l4SijoEob554TbpZHWj3S3e+9JKHjm6cwqwcM2/w7ewOmK+F1Afe2zJ9qzGdqVf yLQg5G4Vr/sT5TgVJyL2iBEkc0tvxQaInuH6r8OZPWQBIwpMnRJB77vhqEpNtg== 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=1703170001; 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=4hL/gB48AWxNvg4FU/1Guj8F95El29hbuaieQCvjohs=; b=xOi2OD58Dd7WcfobWNoWtLhef2onz5aY+B60XOC+DW7RUJPIftYc6jQmpoPnUy7SD5tvar 59JnYH/T3T2F20cpBL+mpjM3cYhoGJkk0AprcCYaSOfvtetDR3D85POQMp57Onc5DGgFK7 BTkTeokD1gvjcdpeNe4/GhhVEGGSx78LP8RvX3sP6fp+zgrUAACd1bDaTgK+O8VL/dM2b/ l4aI86NxHiPQS4EDzBe5bFewuCshW+BBdplNJQQtYBRL3khP2+Ws60oRectIzxWfJ8sFzg dP2ccPx7B698xVMdVJQub5IkJsiHOOPSNSzH9fxzeGtq2tJbEOsjrVdpTIwQvg== 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 4SwtYF3N38zc1V; Thu, 21 Dec 2023 14:46:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BLEkfm1081339; Thu, 21 Dec 2023 14:46:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BLEkfpt081336; Thu, 21 Dec 2023 14:46:41 GMT (envelope-from git) Date: Thu, 21 Dec 2023 14:46:41 GMT Message-Id: <202312211446.3BLEkfpt081336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vincenzo Maffione Subject: git: ad874544d9f0 - main - libnetmap: remove interface name validation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: ad874544d9f018bf8eef4053b5ca7b856c4674cb Auto-Submitted: auto-generated The branch main has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=ad874544d9f018bf8eef4053b5ca7b856c4674cb commit ad874544d9f018bf8eef4053b5ca7b856c4674cb Author: Vincenzo Maffione AuthorDate: 2023-12-21 14:43:57 +0000 Commit: Vincenzo Maffione CommitDate: 2023-12-21 14:43:57 +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 --- lib/libnetmap/nmreq.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/libnetmap/nmreq.c b/lib/libnetmap/nmreq.c index 645f01abc130..2477337d8791 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') {