[SOLVED] WebUI doesn't accept perfectly valid and extant interface names

Xaekai

Member
Jul 16, 2021
2
0
6
42
Hello, the web interface doesn't accept my perfectly valid interface as a bridge port

1626459900381.png

I am auditioning Proxmox as a potential replacement for OVZ for my little org, and I'd like to keep the bespoke NIC naming we already use (through udev rules), as it's unambiguous to the physical reality of the server, and server rooms are loud. I'm guessing this is just some check done by the web ui with a regex that does not include dash.

The nic exists.

Code:
root@tantabus:~# ip link | grep -P "^\d"
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
2: broadcom10g-p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
3: eno1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
4: broadcom10g-p2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
5: eno2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
6: eno3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
7: eno4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
8: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
24: veth12003i0@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr12003i0 state UP mode DEFAULT group default qlen 1000
25: fwbr12003i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
26: fwpr12003p0@fwln12003i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP mode DEFAULT group default qlen 1000
27: fwln12003i0@fwpr12003p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr12003i0 state UP mode DEFAULT group default qlen 1000
 
Last edited:
Create a bug report here https://bugzilla.proxmox.com/

In general it would be best to simply check if the interface exists.

It's in /usr/share/perl5/PVE/JSONSchema.pm:537

Code:
register_format('pve-iface', \&pve_verify_iface);
sub pve_verify_iface {
    my ($id, $noerr) = @_;

    if ($id !~ m/^[a-z][a-z0-9_]{1,20}([:\.]\d+)?$/i) {
        return undef if $noerr;
        die "invalid network interface name '$id'\n";
    }
    return $id;
}
 
Thank you for linking the guilty snippet. I see that underscore is accepted. I will use that in the meantime.