diff options
Diffstat (limited to 'src/libcharon/plugins/ha/ha_attribute.c')
-rw-r--r-- | src/libcharon/plugins/ha/ha_attribute.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcharon/plugins/ha/ha_attribute.c b/src/libcharon/plugins/ha/ha_attribute.c index 2b271a8e7..b20ef876a 100644 --- a/src/libcharon/plugins/ha/ha_attribute.c +++ b/src/libcharon/plugins/ha/ha_attribute.c @@ -83,7 +83,7 @@ static host_t* offset2host(pool_t *pool, int offset) { chunk_t addr; host_t *host; - u_int32_t *pos; + uint32_t *pos; if (offset > pool->size) { @@ -93,11 +93,11 @@ static host_t* offset2host(pool_t *pool, int offset) addr = chunk_clone(pool->base->get_address(pool->base)); if (pool->base->get_family(pool->base) == AF_INET6) { - pos = (u_int32_t*)(addr.ptr + 12); + pos = (uint32_t*)(addr.ptr + 12); } else { - pos = (u_int32_t*)addr.ptr; + pos = (uint32_t*)addr.ptr; } *pos = htonl(offset + ntohl(*pos)); host = host_create_from_chunk(pool->base->get_family(pool->base), addr, 0); @@ -111,7 +111,7 @@ static host_t* offset2host(pool_t *pool, int offset) static int host2offset(pool_t *pool, host_t *addr) { chunk_t host, base; - u_int32_t hosti, basei; + uint32_t hosti, basei; if (addr->get_family(addr) != pool->base->get_family(pool->base)) { @@ -129,8 +129,8 @@ static int host2offset(pool_t *pool, host_t *addr) host = chunk_skip(host, 12); base = chunk_skip(base, 12); } - hosti = ntohl(*(u_int32_t*)(host.ptr)); - basei = ntohl(*(u_int32_t*)(base.ptr)); + hosti = ntohl(*(uint32_t*)(host.ptr)); + basei = ntohl(*(uint32_t*)(base.ptr)); if (hosti > basei + pool->size) { return -1; |