From 40fae2b3414d25ded1f42b33737bcba0812d80ba Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 30 Dec 2013 08:20:52 +0100 Subject: [PATCH] support bond_xmit_hash_policy --- data/PVE/INotify.pm | 8 ++++++++ 1 file changed, 8 insertions(+) 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"; -- 2.39.2