aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ippool.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ippool.c')
-rw-r--r--lib/ippool.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ippool.c b/lib/ippool.c
index 683d2d8..1729ec7 100644
--- a/lib/ippool.c
+++ b/lib/ippool.c
@@ -210,8 +210,8 @@ int ippool_new(struct ippool_t **this, const char *dyn, const char *stat,
}
/* we want to work with /64 prefixes, i.e. allocate /64 prefixes rather
* than /128 (single IPv6 addresses) */
- if (addr->len == sizeof(in6_addr))
- addr->len = 64/8;
+ if (addr.len == sizeof(struct in6_addr))
+ addr.len = 64/8;
/* Set IPPOOL_NONETWORK if IPPOOL_NOGATEWAY is set */
if (flags & IPPOOL_NOGATEWAY) {
@@ -453,7 +453,7 @@ int ippool_newip(struct ippool_t *this, struct ippoolm_t **member,
return -GTPCAUSE_SYS_FAIL; /* Allready in use / Should not happen */
}
- if (p2->addr.len != addr->len) {
+ if (p2->addr.len != addr->len && !(addr->len == 16 && p2->addr.len == 8)) {
SYS_ERR(DIP, LOGL_ERROR, 0, "MS requested unsupported PDP context type");
return -GTPCAUSE_UNKNOWN_PDP;
}