]> git.ipfire.org Git - thirdparty/wireguard-tools.git/commitdiff
persistent-keepalive: change range to [1,65535]
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 8 Aug 2016 11:53:00 +0000 (13:53 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 8 Aug 2016 12:05:37 +0000 (14:05 +0200)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/config.c
src/wg.8

index 55a8ab5b245f98e81c4637734d00ee6ae6851b17..d3070072b9e70dfea5a310df830931546f855060 100644 (file)
@@ -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;
        }
 
index 0795fdf6471a93818bb83ef87d14ef38b35cf184..4e7e4c26dccdbc782d29b1d403decd8a0f9bd17f 100644 (file)
--- a/src/wg.8
+++ b/src/wg.8
@@ -68,7 +68,7 @@ public-key cryptography, for post-quantum resistance. If \fIallowed-ips\fP
 is specified, but the value is the empty string, all allowed ips are removed
 from the peer. The use of \fIpersistent-keepalive\fP is optional and is by
 default off; setting it to 0 or "off", disables it. Otherwise it represents,
-in seconds, between 10 and 3600 inclusive, how often to send an authenticated
+in seconds, between 1 and 65535 inclusive, how often to send an authenticated
 empty packet to the peer, for the purpose of keeping a stateful firewall or NAT
 mapping valid persistently. For example, if the interface very rarely sends
 traffic, but it might at anytime receive traffic from a peer, and it is behind
@@ -142,7 +142,7 @@ port number. This endpoint will be updated automatically to the most recent
 source IP address and port of correctly authenticated packets from the peer.
 Optional.
 .IP \(bu
-PersistentKeepalive \(em a seconds interval, between 10 and 3600 inclusive, of
+PersistentKeepalive \(em a seconds interval, between 1 and 65535 inclusive, of
 how often to send an authenticated empty packet to the peer for the purpose of keeping a
 stateful firewall or NAT mapping valid persistently. For example, if the interface
 very rarely sends traffic, but it might at anytime receive traffic from a peer,