summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@gmail.com>2021-01-15 17:49:16 +0100
committerSusant Sahani <ssahani@vmware.com>2021-01-16 23:04:07 +0100
commitfd9d7de176d6b990610397c0df15bdbcd6b6714f (patch)
tree57e15b7b66248125c0d377e65748fe8c9e24e5d9 /src/network
parent0132453c40177bb79d7ddedfd356d1ccbc5e1c55 (diff)
downloadsystemd-fd9d7de176d6b990610397c0df15bdbcd6b6714f.tar.gz
network: route - add a zero verification for tcp window
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-route.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 52de09245b..e0d589818d 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -2193,6 +2193,11 @@ int config_parse_tcp_window(
"Specified TCP %s \"%s\" is too large, ignoring assignment: %m", lvalue, rvalue);
return 0;
}
+ if (k == 0) {
+ log_syntax(unit, LOG_WARNING, filename, line, 0,
+ "Invalid TCP %s \"%s\", ignoring assignment: %m", lvalue, rvalue);
+ return 0;
+ }
if (streq(lvalue, "InitialCongestionWindow"))
n->initcwnd = k;