diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-06-11 17:42:46 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-06-11 17:42:46 +0200 |
commit | c067b4acef6715050a9fe92d5e16293d06ec69ee (patch) | |
tree | e3a7a3f945e08ef636c0fc1b79ffb64f2fe1e80f /src/network | |
parent | 6f6fdcb5906ff9259443b97daca429ed1de2559c (diff) | |
parent | 76f0a56790d6d926fcd293c2c60b9b779566ad2d (diff) |
Merge pull request #143 from teg/networkd-packets-per-slave-mode
networkd: bond - only set packets_per_slave on balance-rr mode
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-netdev-bond.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/networkd-netdev-bond.c b/src/network/networkd-netdev-bond.c index 9919955f51..d7f9bb4f8e 100644 --- a/src/network/networkd-netdev-bond.c +++ b/src/network/networkd-netdev-bond.c @@ -242,7 +242,7 @@ static int netdev_bond_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m } if (b->ad_select != _NETDEV_BOND_AD_SELECT_INVALID && - b->mode == BOND_MODE_8023AD) { + b->mode == NETDEV_BOND_MODE_802_3AD) { r = sd_rtnl_message_append_u8(m, IFLA_BOND_AD_SELECT, b->ad_select); if (r < 0) return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_AD_SELECT attribute: %m"); @@ -279,7 +279,8 @@ static int netdev_bond_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_RESEND_IGMP attribute: %m"); } - if (b->packets_per_slave <= PACKETS_PER_SLAVE_MAX) { + if (b->packets_per_slave <= PACKETS_PER_SLAVE_MAX && + b->mode == NETDEV_BOND_MODE_BALANCE_RR) { r = sd_rtnl_message_append_u32(m, IFLA_BOND_PACKETS_PER_SLAVE, b->packets_per_slave); if (r < 0) return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_PACKETS_PER_SLAVE attribute: %m"); |