]> git.proxmox.com Git - pve-common.git/commitdiff
INotify: fix mtu check && add test
authorAlexandre Derumier <aderumier@odiso.com>
Fri, 7 Feb 2020 11:40:26 +0000 (12:40 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 7 Feb 2020 11:56:24 +0000 (12:56 +0100)
reverse the parent-child. (bridge-port is the parent)

src/PVE/INotify.pm
test/etc_network_interfaces/t.create_network.pl

index 9bfd6fbe5429e299d7587724ccebcc460e225782..6e7a78c4323c06ba1b6803ee508024e5731ae7f1 100644 (file)
@@ -1565,7 +1565,7 @@ sub __write_etc_network_interfaces {
                    if ($n->{method} eq 'static' && $n->{address} ne '0.0.0.0') ||
                       ($n->{method6} eq 'static' && $n->{address} ne '::');
 
                    if ($n->{method} eq 'static' && $n->{address} ne '0.0.0.0') ||
                       ($n->{method6} eq 'static' && $n->{address} ne '::');
 
-               &$check_mtu($ifaces, $iface, $p);
+               &$check_mtu($ifaces, $p, $iface);
                $bridgeports->{$p} = $iface;
            }
            $bridges->{$iface} = $d;
                $bridgeports->{$p} = $iface;
            }
            $bridges->{$iface} = $d;
index bf5b4b6edcf6887a9000fe7da24f008862ecdfa5..d6418f42aacb43d3ae14c91f61ce5ade085c4259 100644 (file)
@@ -325,6 +325,17 @@ $config->{ifaces}->{'eth1.100'} = {
     autostart => 1
 };
 
     autostart => 1
 };
 
+$config->{ifaces}->{'vmbr4'} = {
+    mtu => 1200,
+    type => 'bridge',
+    method => 'manual',
+    families => ['inet'],
+    bridge_stp => 'off',
+    bridge_fd => 0,
+    bridge_ports => 'bond0.100',
+    autostart => 1
+};
+
 expect load('loopback') . <<"CHECK";
 source-directory interfaces.d
 
 expect load('loopback') . <<"CHECK";
 source-directory interfaces.d
 
@@ -355,6 +366,13 @@ $vmbr0_part
 
 $vmbr123_part
 
 
 $vmbr123_part
 
+auto vmbr4
+iface vmbr4 inet manual
+       bridge-ports bond0.100
+       bridge-stp off
+       bridge-fd 0
+       mtu 1200
+
 auto vmbr1.100
 iface vmbr1.100 inet manual
        mtu 1300
 auto vmbr1.100
 iface vmbr1.100 inet manual
        mtu 1300