<varlistentry>
<term><varname>InitialCongestionWindow=</varname></term>
<listitem>
- <para>The TCP initial congestion window or <literal>InitialCongestionWindow</literal> is used during the start
- of a TCP connection. During the start of a TCP session, when a client requests for a resource, the server's initial congestion window
- determines how many data packets will be sent during the initial burst of data. Takes a number between between 1 and 4294967295 (2^32 - 1).
- Defaults to unset.
+ <para>The TCP initial congestion window is used during the start of a TCP connection. During the start of a TCP
+ session, when a client requests a resource, the server's initial congestion window determines how many data bytes
+ will be sent during the initial burst of data. Takes a size in bytes between 1 and 4294967295 (2^32 - 1). The usual
+ suffixes K, M, G are supported and are understood to the base of 1024. Defaults to unset.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>InitialAdvertisedReceiveWindow=</varname></term>
<listitem>
- <para>The TCP receive window size or <literal>InitialAdvertisedReceiveWindow</literal> is the amount of receive data (in bytes)
- that can be buffered at one time on a connection. The sending host can send only that amount of data before waiting for
- an acknowledgment and window update from the receiving host. Takes a number between 1 and 4294967295 (2^32 - 1). Defaults to unset.
+ <para>The TCP initial advertised receive window is the amount of receive data (in bytes) that can initally be buffered at one time
+ on a connection. The sending host can send only that amount of data before waiting for an acknowledgment and window update
+ from the receiving host. Takes a size in bytes between 1 and 4294967295 (2^32 - 1). The usual suffixes K, M, G are supported
+ and are understood to the base of 1024. Defaults to unset.
</para>
</listitem>
</varlistentry>
return log_error_errno(r, "Could not append RTAX_MTU attribute: %m");
}
- if (route->initcwnd) {
+ if (route->initcwnd > 0) {
r = sd_netlink_message_append_u32(req, RTAX_INITCWND, route->initcwnd);
if (r < 0)
return log_error_errno(r, "Could not append RTAX_INITCWND attribute: %m");
}
- if (route->initrwnd) {
+ if (route->initrwnd > 0) {
r = sd_netlink_message_append_u32(req, RTAX_INITRWND, route->initrwnd);
if (r < 0)
return log_error_errno(r, "Could not append RTAX_INITRWND attribute: %m");
const char *rvalue,
void *data,
void *userdata) {
- Network *network = userdata;
_cleanup_route_free_ Route *n = NULL;
- uint32_t k;
+ Network *network = userdata;
+ uint64_t k;
int r;
assert(filename);
if (r < 0)
return r;
- r = safe_atou32(rvalue, &k);
- if (r < 0) {
+ r = parse_size(rvalue, 1024, &k);
+ if (r < 0 || k > UINT32_MAX) {
log_syntax(unit, LOG_ERR, filename, line, r,
- "Could not parse TCP %s \"%s\", ignoring assignment: %m", rvalue, lvalue);
+ "Could not parse TCP %s \"%s\" bytes, ignoring assignment: %m", rvalue, lvalue);
return 0;
}