]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't bother managing a /128 prefix.
authorRoy Marples <roy@marples.name>
Sat, 7 Sep 2013 11:13:05 +0000 (11:13 +0000)
committerRoy Marples <roy@marples.name>
Sat, 7 Sep 2013 11:13:05 +0000 (11:13 +0000)
ipv6.c

diff --git a/ipv6.c b/ipv6.c
index e384e9afc13884ece0486f6bc2bb08af78e519fd..a47c4fc53e6150232c4958ff955c417182544aed 100644 (file)
--- a/ipv6.c
+++ b/ipv6.c
@@ -815,7 +815,13 @@ make_prefix(const struct interface * ifp, const struct ra *rap,
 {
        struct rt6 *r;
 
-       if (addr == NULL || addr->prefix_len > 128)
+       if (addr == NULL || addr->prefix_len > 128) {
+               errno = EINVAL;
+               return NULL;
+       }
+
+       /* There is no point in trying to manage a /128 prefix. */
+       if (addr->prefix_len == 128)
                return NULL;
 
        r = make_route(ifp, rap);