diff options
author | David S. Madole <david@omd3.com> | 2009-09-27 15:27:54 -0400 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2009-10-31 13:07:04 -0700 |
commit | db1b44563e05c1eb1f5d8bd475c3ed1250307aeb (patch) | |
tree | 596a153503aabafc41082b5c9447b4c9562b9f77 /lib | |
parent | c512c8f72c759e80a3943468ad43903559fcf7f7 (diff) | |
download | vyatta-cfg-db1b44563e05c1eb1f5d8bd475c3ed1250307aeb.tar.gz vyatta-cfg-db1b44563e05c1eb1f5d8bd475c3ed1250307aeb.zip |
Add VRRP capability to bonding interfaces and vifs of bonding interfaces.
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/Keepalived.pm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/Vyatta/Keepalived.pm b/lib/Vyatta/Keepalived.pm index 96d4fe9..c34d277 100755 --- a/lib/Vyatta/Keepalived.pm +++ b/lib/Vyatta/Keepalived.pm @@ -153,10 +153,18 @@ sub vrrp_get_config { my $path; my $config = new Vyatta::Config; - if ($intf =~ m/(eth\d+)\.(\d+)/) { - $path = "interfaces ethernet $1 vif $2"; + if ($intf =~ m/bond/) { + if ($intf =~ m/(bond\d+)\.(\d+)/) { + $path = "interfaces bonding $1 vif $2"; + } else { + $path = "interfaces bonding $intf"; + } } else { - $path = "interfaces ethernet $intf"; + if ($intf =~ m/(eth\d+)\.(\d+)/) { + $path = "interfaces ethernet $1 vif $2"; + } else { + $path = "interfaces ethernet $intf"; + } } $config->setLevel($path); |