]> git.proxmox.com Git - pve-common.git/commitdiff
support bond_xmit_hash_policy
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 30 Dec 2013 07:20:52 +0000 (08:20 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 30 Dec 2013 07:20:52 +0000 (08:20 +0100)
data/PVE/INotify.pm

index 30290ca38b7b158c9e8d2fe234aa439ab2667381..69248959725777edba455cca1fc8b7afb978135e 100644 (file)
@@ -821,6 +821,8 @@ sub read_etc_network_interfaces {
                        $d->{$id} = $value;
                    } elsif ($id eq 'bond_miimon') {
                        $d->{$id} = $value;
+                   } elsif ($id eq 'bond_xmit_hash_policy') {
+                       $d->{$id} = $value;
                    } elsif ($id eq 'bond_mode') {
                        # always use names
                        foreach my $bm (keys %$bond_modes) {
@@ -976,6 +978,12 @@ sub __interface_to_string {
        $raw .= "\tbond_mode $v\n";
        $done->{'bond_mode'} = 1;
 
+       if ($d->{'bond_mode'} && $d->{'bond_xmit_hash_policy'} &&
+           ($d->{'bond_mode'} eq 'balance-xor' || $d->{'bond_mode'} eq '802.3ad')) {
+           $raw .= "\tbond_xmit_hash_policy $d->{'bond_xmit_hash_policy'}\n";
+       }
+       $done->{'bond_xmit_hash_policy'} = 1;
+
     } elsif ($d->{type} eq 'OVSBridge') {
 
        $raw .= "\tovs_type $d->{type}\n";