aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-gpe
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/lisp-gpe')
-rw-r--r--src/vnet/lisp-gpe/lisp_gpe_adjacency.c4
-rw-r--r--src/vnet/lisp-gpe/lisp_gpe_sub_interface.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/vnet/lisp-gpe/lisp_gpe_adjacency.c b/src/vnet/lisp-gpe/lisp_gpe_adjacency.c
index 8efb97248aa..cd0b33857f5 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_adjacency.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_adjacency.c
@@ -46,8 +46,8 @@ BVT (clib_bihash)
#define LISP_ADJ_SET_KEY(_key, _itf, _nh) \
{ \
- _key.key[0] = (_nh)->ip.v6.as_u64[0]; \
- _key.key[1] = (_nh)->ip.v6.as_u64[1]; \
+ _key.key[0] = ip_addr_v6((_nh)).as_u64[0]; \
+ _key.key[1] = ip_addr_v6((_nh)).as_u64[1]; \
_key.key[2] = (_itf); \
}
diff --git a/src/vnet/lisp-gpe/lisp_gpe_sub_interface.h b/src/vnet/lisp-gpe/lisp_gpe_sub_interface.h
index 457db93e910..7375bf00ccc 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_sub_interface.h
+++ b/src/vnet/lisp-gpe/lisp_gpe_sub_interface.h
@@ -110,9 +110,9 @@ lisp_gpe_sub_interface_find_ip6 (const ip6_address_t * addr, u32 vni)
lisp_gpe_sub_interface_key_t key;
const uword *p;
- key.local_rloc.ip.v6.as_u64[0] = addr->as_u64[0];
- key.local_rloc.ip.v6.as_u64[1] = addr->as_u64[1];
- key.local_rloc.version = AF_IP6;
+ ip_addr_v6 (&key.local_rloc).as_u64[0] = addr->as_u64[0];
+ ip_addr_v6 (&key.local_rloc).as_u64[1] = addr->as_u64[1];
+ ip_addr_version (&key.local_rloc) = AF_IP6;
key.vni = vni;
p = hash_get_mem (&lisp_gpe_sub_interfaces_sw_if_index, &key);
@@ -134,7 +134,7 @@ lisp_gpe_sub_interface_find_ip4 (const ip4_address_t * addr, u32 vni)
lisp_gpe_sub_interface_key_t key;
const uword *p;
- key.local_rloc.ip.v4.as_u32 = addr->as_u32;
+ ip_addr_v4 (&key.local_rloc).as_u32 = addr->as_u32;
key.local_rloc.version = AF_IP4;
key.vni = vni;