]> git.decadent.org.uk Git - odhcp6c.git/commitdiff
Sanitize RA values less
authorSteven Barth <steven@midlink.org>
Fri, 10 Apr 2015 11:31:56 +0000 (13:31 +0200)
committerSteven Barth <steven@midlink.org>
Fri, 10 Apr 2015 11:31:56 +0000 (13:31 +0200)
src/ra.c

index 04764c7386ddea8327c65fa5ce7c36c12c6963cc..122f99eea4a1701f814a0d7c62e229777a94075e 100644 (file)
--- a/src/ra.c
+++ b/src/ra.c
@@ -239,7 +239,7 @@ static bool ra_icmpv6_valid(struct sockaddr_in6 *source, int hlim, uint8_t *data
 int ra_conf_hoplimit(int newvalue)
 {
        static int value = 0;
-       if (newvalue > value)
+       if (newvalue > 0)
                value = newvalue;
        return value;
 }