diff options
author | Tom Gundersen <teg@jklm.no> | 2015-06-10 17:05:04 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-06-10 19:39:02 +0200 |
commit | 76f0a56790d6d926fcd293c2c60b9b779566ad2d (patch) | |
tree | d53343833017389bb56a8a47c94f1b41d5a67291 | |
parent | cd32b977facd20145f570efbfdf541ffc2780c4e (diff) |
networkd: bond - only set packets_per_slave on balance-rr mode
Otherwise the creation of the bond fails.
-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"); |