From nobody Sun Sep 1 17:57:23 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 4Wxfjb1sB1z5MhQY; Sun, 01 Sep 2024 17:57:23 +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 4Wxfjb1LQWz4sW8; Sun, 1 Sep 2024 17:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725213443; 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=39hwvT0ozqiva19QKxOcY784Fjfh4CtOfmD9U9OlRlQ=; b=DD9b4yH2DOtmrjlXE0KdICLyMPvoMmb+bZUunY4+OSb/2aLPLcsqqc7ME/A5bi3wbvEKKt hJafj+P0+L8mRNpXCvSC/s+VKnYqp+r3V7kK7aY3KRi5DM7yW5zAKpDIFCsRtBvj9Flkdk 1HHM16veLfaDPYz2zu+j9O72BiUKXAE61/f13mfMijp9MnMxIa15kiDXCSJsD8tSC5+oTl qxLADjuuHc0NInQGGmoJqMzwUtXuoPvbKDdfwEIsw7TM5XG7/Ogoj1CsNBTsKEEYANlyf0 D5YFVkw3l0UEqoXYBX027GoWuxnQiZzkyWC3CX/BNI8RJmdzsOdFDpggwqncmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725213443; a=rsa-sha256; cv=none; b=iDG2klyz7jY43lfA0kDhhofC6EQ6k+eqDP16u+XwL3X1zhpxrt5htvRUk8MYxgxshxmTm7 HmCwbmt4bcJY5dx4MEztLOjHVia1kPygyVGimsCqJ82rMJaXW+AssrKmQTI8cVOEwdYnvT k1Hmf3KdUyDHIKNRHxrCsHmsFpjIfBPslv+Xihz8h+iLtOpElOAoy0n9ChON8bvXl1LsR5 bfZ/N5WPz8VET/CZCtiZzgQ1Zq43/pf50ZKJPjCnSPa5u8jfQgWkND3GWb8qtFd1nRn/Ck dVDDDboeCu2DsDoMxNuKE3MmDZv+aJ5WQCxvxwKb1jDKj6t8bk/giVn7kxqG2g== 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=1725213443; 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=39hwvT0ozqiva19QKxOcY784Fjfh4CtOfmD9U9OlRlQ=; b=HQ72ngUMSRVxcCyPK1lg24hnz9xWxZCUn/KQ0GIeTUSiJuwqb61B/WLTpI/85L5Ux/odmT t/I5RX+ZHigmyC0YvAiuRxYIvOGV01a1wyckXQ2cKCAKB1fkvPR46zK6ZkLdgNmRXVR9QW 7Q9lPTHlRufJWT2k1E/RZlFm5SOL+T3ItZ3DUgJx2rZnzYP3HD1ylV224Q76svjpspEm0l nitTQIPD7p2NzOucyjZx3pd84hK4TFg7Upk3Yj68TJueIaW4LNW0/SV6eCju0Hgh2KDZwS klZabhseN+bGA0gviVPlGYvAgwb75mDsqheOrBVbXSC3i5C2zwpOHwP2sEfzRQ== 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 4Wxfjb0x1vzdh8; Sun, 1 Sep 2024 17:57:23 +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 481HvNCL091786; Sun, 1 Sep 2024 17:57:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 481HvNRB091783; Sun, 1 Sep 2024 17:57:23 GMT (envelope-from git) Date: Sun, 1 Sep 2024 17:57:23 GMT Message-Id: <202409011757.481HvNRB091783@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: 20a2a59f3990 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 20a2a59f3990778a82bccf0e69ce8f9d7f6a904a Auto-Submitted: auto-generated The branch stable/14 has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=20a2a59f3990778a82bccf0e69ce8f9d7f6a904a commit 20a2a59f3990778a82bccf0e69ce8f9d7f6a904a Author: Vincenzo Maffione AuthorDate: 2023-12-21 14:43:57 +0000 Commit: Vincenzo Maffione CommitDate: 2024-09-01 17:56:17 +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') {