summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-netdev-bond.c30
-rw-r--r--src/network/networkd-netdev-bond.h4
-rw-r--r--src/network/networkd-netdev-gperf.gperf3
3 files changed, 37 insertions, 0 deletions
diff --git a/src/network/networkd-netdev-bond.c b/src/network/networkd-netdev-bond.c
index e3f3333560..1f57083626 100644
--- a/src/network/networkd-netdev-bond.c
+++ b/src/network/networkd-netdev-bond.c
@@ -145,6 +145,36 @@ static int netdev_bond_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m
}
}
+ if (b->miimon != 0) {
+ r = sd_rtnl_message_append_u32(m, IFLA_BOND_MIIMON, b->miimon / 1000);
+ if (r < 0) {
+ log_error_netdev(netdev,
+ "Could not append IFLA_BOND_BOND_MIIMON attribute: %s",
+ strerror(-r));
+ return r;
+ }
+ }
+
+ if (b->downdelay != 0) {
+ r = sd_rtnl_message_append_u32(m, IFLA_BOND_DOWNDELAY, b->downdelay / 1000);
+ if (r < 0) {
+ log_error_netdev(netdev,
+ "Could not append IFLA_BOND_DOWNDELAY attribute: %s",
+ strerror(-r));
+ return r;
+ }
+ }
+
+ if (b->updelay != 0) {
+ r = sd_rtnl_message_append_u32(m, IFLA_BOND_UPDELAY, b->updelay / 1000);
+ if (r < 0) {
+ log_error_netdev(netdev,
+ "Could not append IFLA_BOND_UPDELAY attribute: %s",
+ strerror(-r));
+ return r;
+ }
+ }
+
return 0;
}
diff --git a/src/network/networkd-netdev-bond.h b/src/network/networkd-netdev-bond.h
index fea076817a..c09af5fa52 100644
--- a/src/network/networkd-netdev-bond.h
+++ b/src/network/networkd-netdev-bond.h
@@ -61,6 +61,10 @@ struct Bond {
BondMode mode;
BondXmitHashPolicy xmit_hash_policy;
BondLacpRate lacp_rate;
+
+ usec_t miimon;
+ usec_t updelay;
+ usec_t downdelay;
};
extern const NetDevVTable bond_vtable;
diff --git a/src/network/networkd-netdev-gperf.gperf b/src/network/networkd-netdev-gperf.gperf
index 40fae75c42..c524ee5798 100644
--- a/src/network/networkd-netdev-gperf.gperf
+++ b/src/network/networkd-netdev-gperf.gperf
@@ -54,3 +54,6 @@ Tap.Group, config_parse_string, 0,
Bond.Mode, config_parse_bond_mode, 0, offsetof(Bond, mode)
Bond.TransmitHashPolicy, config_parse_bond_xmit_hash_policy, 0, offsetof(Bond, xmit_hash_policy)
Bond.LACPTransmitRate, config_parse_bond_lacp_rate, 0, offsetof(Bond, lacp_rate)
+Bond.MIIMonitorSec, config_parse_sec, 0, offsetof(Bond, miimon)
+Bond.UpDelaySec, config_parse_sec, 0, offsetof(Bond, updelay)
+Bond.DownDelaySec, config_parse_sec, 0, offsetof(Bond, downdelay)