small typo inline
On 10/30/25 16:51, Stefan Hanreich wrote:
'-compressvlans' is used by default, because PVE configures VLAN
1-4094 by default on all ports on a VLAN-aware bridge and having one
entry per VLAN in this case is quite excessive.
Signed-off-by: Stefan Hanreich <[email protected]>
---
src/PVE/IPRoute2.pm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/PVE/IPRoute2.pm b/src/PVE/IPRoute2.pm
index 4e31376..fcacabf 100644
--- a/src/PVE/IPRoute2.pm
+++ b/src/PVE/IPRoute2.pm
@@ -55,4 +55,22 @@ sub altname_mapping($ip_links) {
return $altnames;
}
+sub get_vlan_information() {
+ my $bridge_output = '';
+
+ run_command(
+ [
+ 'bridge', '-compressvlan', '-json', 'vlan', 'show',
's' missing, so '-compressvlans', checked the man page, your commit msg
is correct
+ ],
+ outfunc => sub {
+ $bridge_output .= shift;
+ },
+ );
+
+ my $data = decode_json($bridge_output);
+ my %vlan_information = map { $_->{ifname} => $_ } $data->@*;
+
+ return \%vlan_information;
+}
+
1;
_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel