From: Dietmar Maurer Date: Mon, 30 Dec 2013 07:20:52 +0000 (+0100) Subject: support bond_xmit_hash_policy X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=40fae2b3414d25ded1f42b33737bcba0812d80ba support bond_xmit_hash_policy --- diff --git a/data/PVE/INotify.pm b/data/PVE/INotify.pm index 30290ca..6924895 100644 --- a/data/PVE/INotify.pm +++ b/data/PVE/INotify.pm @@ -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";