aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincenzo Maffione <vmaffione@FreeBSD.org>2023-12-21 14:43:57 +0000
committerVincenzo Maffione <vmaffione@FreeBSD.org>2023-12-21 14:43:57 +0000
commitad874544d9f018bf8eef4053b5ca7b856c4674cb (patch)
treed1c5d9ce06968272410006b5687d1c87d0f468c8
parent64db9a0f82863d212ac0bcd49bc0254ccb9dd1ac (diff)
downloadsrc-ad874544d9f018bf8eef4053b5ca7b856c4674cb.tar.gz
src-ad874544d9f018bf8eef4053b5ca7b856c4674cb.zip
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
-rw-r--r--lib/libnetmap/nmreq.c5
1 files changed, 0 insertions, 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') {