fa84285
--- wide-dhcpv6-20080615/prefixconf.c.orig	2013-05-14 22:26:46.433767395 +1000
fa84285
+++ wide-dhcpv6-20080615/prefixconf.c	2013-05-14 23:17:49.229676947 +1000
fa84285
@@ -451,6 +451,17 @@
fa84285
 	ifpfx->paddr.sin6_len = sizeof(struct sockaddr_in6);
fa84285
 #endif
fa84285
 	ifpfx->paddr.sin6_addr = prefix->addr;
fa84285
+
fa84285
+	/* 
fa84285
+         * dave (bevhost) thinks this should fix it rather than 
fa84285
+         * generare the error below "invalid prefix length" 
fa84285
+         * this way the sla-len can be left out of the config file 
fa84285
+         * and calculated when the prefix is received
fa84285
+         */
fa84285
+	if (prefix->plen + pconf->ifid_len + pconf->sla_len > 128) {
fa84285
+		pconf->sla_len = 128 - pconf->ifid_len - prefix->plen;
fa84285
+	}
fa84285
+
fa84285
 	ifpfx->plen = prefix->plen + pconf->sla_len;
fa84285
 	/*
fa84285
 	 * XXX: our current implementation assumes ifid len is a multiple of 8