Skip to content

Commit

Permalink
Add policy support to bonding connections
Browse files Browse the repository at this point in the history
  • Loading branch information
joukewitteveen committed Jan 12, 2015
1 parent 9a1ca23 commit d2cf9ae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/examples/bonding
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Connection=bond
BindsToInterfaces=(eth0 eth2)
IP=static
Address="10.0.0.1/8"
#Mode=balance-rr
8 changes: 6 additions & 2 deletions docs/netctl.profile.5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,12 @@ of the `wireless' type:
OPTIONS FOR `bond' CONNECTIONS
------------------------------
The interfaces of 'BindsToInterfaces' are bound together in the
interface named by 'Interface'. All *ip options* are understood for
connections of the `bond' type.
interface named by 'Interface'. Next to the *ip options*, the following
is understood for connections of the `bond' type:

'Mode='::
The bonding policy. See the kernel documentation on bonding for
details.


OPTIONS FOR `bridge' CONNECTIONS
Expand Down
5 changes: 2 additions & 3 deletions src/lib/connections/bond
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ bond_up() {
if is_interface "$Interface"; then
report_error "Interface '$Interface' already exists"
return 1
else
interface_add bond "$Interface"
fi
bring_interface_up "$Interface"

interface_add bond "$Interface" "" ${Mode:+mode "$Mode"}
bring_interface_up "$Interface"
for slave in "${BindsToInterfaces[@]}"; do
ip link set dev "$slave" master "$Interface"
done
Expand Down

0 comments on commit d2cf9ae

Please sign in to comment.