mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
network: tc/cake: do not pass 0 if OverheadBytes= is not specified
This commit is contained in:
parent
025cd94e1c
commit
3a86a31e0c
@ -49,9 +49,11 @@ static int cake_fill_message(Link *link, QDisc *qdisc, sd_netlink_message *req)
|
||||
return log_link_error_errno(link, r, "Could not append TCA_CAKE_AUTORATE attribute: %m");
|
||||
}
|
||||
|
||||
if (c->overhead_set) {
|
||||
r = sd_netlink_message_append_s32(req, TCA_CAKE_OVERHEAD, c->overhead);
|
||||
if (r < 0)
|
||||
return log_link_error_errno(link, r, "Could not append TCA_CAKE_OVERHEAD attribute: %m");
|
||||
}
|
||||
|
||||
r = sd_netlink_message_close_container(req);
|
||||
if (r < 0)
|
||||
@ -150,7 +152,7 @@ int config_parse_cake_overhead(
|
||||
c = CAKE(qdisc);
|
||||
|
||||
if (isempty(rvalue)) {
|
||||
c->overhead = 0;
|
||||
c->overhead_set = false;
|
||||
TAKE_PTR(qdisc);
|
||||
return 0;
|
||||
}
|
||||
@ -170,6 +172,7 @@ int config_parse_cake_overhead(
|
||||
}
|
||||
|
||||
c->overhead = v;
|
||||
c->overhead_set = true;
|
||||
TAKE_PTR(qdisc);
|
||||
return 0;
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ typedef struct CommonApplicationsKeptEnhanced {
|
||||
uint64_t bandwidth;
|
||||
|
||||
/* Overhead compensation parameters */
|
||||
bool overhead_set;
|
||||
int overhead;
|
||||
|
||||
} CommonApplicationsKeptEnhanced;
|
||||
|
Loading…
Reference in New Issue
Block a user