[pve-devel] [PATCH pve-common 3/3] Inotify : write network config : add bridge-vids

Alexandre Derumier aderumier at odiso.com
Tue Jun 19 13:57:28 CEST 2018


default is 2-4094 if user don't have specified.

mandatory for ifupdown2 and compatible with
current promox ifupdown bridgevlanport script
---
 src/PVE/INotify.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
index 5d8a773..94712d5 100644
--- a/src/PVE/INotify.pm
+++ b/src/PVE/INotify.pm
@@ -813,7 +813,8 @@ sub __read_etc_network_interfaces {
 	'bridge-vlan-aware' => 'bridge_vlan_aware',
 	'bridge-fd' => 'bridge_fd',
 	'bridge-stp' => 'bridge_stp',
-	'bridge-ports' => 'bridge_ports'
+	'bridge-ports' => 'bridge_ports',
+	'bridge-vids' => 'bridge_vids'
     };
 
     my $line;
@@ -1091,6 +1092,8 @@ sub __interface_to_string {
 
 	if( defined($d->{bridge_vlan_aware})) {
 	    $raw .= "\tbridge-vlan-aware yes\n";
+	    $v = defined($d->{bridge_vids}) ? $d->{bridge_vids} : "2-4094";
+	    $raw .= "\tbridge-vids $v\n";
 	}
 	$done->{bridge_vlan_aware} = 1;
     
-- 
2.11.0




More information about the pve-devel mailing list