diff options
author | michele papalini <micpapal@cisco.com> | 2019-12-10 13:40:16 +0100 |
---|---|---|
committer | michele papalini <micpapal@cisco.com> | 2020-01-21 10:26:25 +0100 |
commit | 43980f3096655df2b2ecec50e700dd6989b0e0d6 (patch) | |
tree | 1a8e23e6fe645d8d1951b84f14e4123f17d4efe9 /lib | |
parent | de13ed1c3155f699cb1e322dcd4d64a06ae00bb9 (diff) |
[HICN-442] new forwarding strategy
Signed-off-by: michele papalini <micpapal@cisco.com>
Change-Id: I62c03bddedc83e523fc60f4b50d2c69e38b50318
Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com>
Signed-off-by: michele papalini <micpapal@cisco.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/src/name.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/src/name.c b/lib/src/name.c index a623341fe..6c7945a18 100644 --- a/lib/src/name.c +++ b/lib/src/name.c @@ -83,17 +83,18 @@ hicn_name_create_from_ip_prefix (const ip_prefix_t * prefix, u32 id, name->type = HNT_CONTIGUOUS_V4; memcpy (name->buffer, prefix->address.v4.buffer, ip_address_len(prefix->family)); + name->len = IPV4_ADDR_LEN; break; case AF_INET6: name->type = HNT_CONTIGUOUS_V6; memcpy (name->buffer, prefix->address.v6.buffer, ip_address_len(prefix->family)); + name->len = IPV6_ADDR_LEN; break; default: return HICN_LIB_ERROR_INVALID_IP_ADDRESS; } - name->len = (u8) (prefix->len); *(u32 *) (name->buffer + name->len) = id; return HICN_LIB_ERROR_NONE; |