summaryrefslogtreecommitdiffstats
path: root/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2013-09-07 11:13:05 +0000
committerRoy Marples <roy@marples.name>2013-09-07 11:13:05 +0000
commiteea72a8a972b0dc017205a1af8b5a9e061a3f47f (patch)
treee8e6c02b09e6618a1268db53fafc38c80b5aa20f /ipv6.c
parentc75310464a51c9bd430718c9bdee51f50096083a (diff)
downloaddhcpcd-eea72a8a972b0dc017205a1af8b5a9e061a3f47f.tar.xz
Don't bother managing a /128 prefix.
Diffstat (limited to 'ipv6.c')
-rw-r--r--ipv6.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ipv6.c b/ipv6.c
index e384e9af..a47c4fc5 100644
--- 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);