aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/config.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-08-08 13:53:00 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-08-08 14:05:37 +0200
commit822ae991d808c394932237ecd121e5b8d75e31db (patch)
tree8a11a3c8557fe3ae49c13e42bc2f960c76f62a5e /src/config.c
parentwg: use correct headers in ipc (diff)
downloadwireguard-tools-822ae991d808c394932237ecd121e5b8d75e31db.tar.xz
wireguard-tools-822ae991d808c394932237ecd121e5b8d75e31db.zip
persistent-keepalive: change range to [1,65535]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c
index 55a8ab5..d307007 100644
--- a/src/config.c
+++ b/src/config.c
@@ -193,8 +193,8 @@ static inline bool parse_persistent_keepalive(__u16 *interval, const char *value
}
ret = strtoul(value, &end, 10);
- if (!*value || *value == '-' || *end || (ret && (ret < 10 || ret > 3600))) {
- fprintf(stderr, "The persistent keepalive interval must be 0/off or 10-3600. Found: `%s`\n", value);
+ if (!*value || *value == '-' || *end || ret > 65535) {
+ fprintf(stderr, "The persistent keepalive interval must be 0/off or 1-65535. Found: `%s`\n", value);
return false;
}