Fix LISP locator pair selection
Make sure when selecting the local and remote locator pair for a data-plane tunnel that the local locator has a route, in the FIB, to the remote one. Change-Id: Idbc8a28a8ede786c11ef98cb18eba4a78c4a228e Signed-off-by: Florin Coras <fcoras@cisco.com>
This commit is contained in:
Florin Coras
committed by
Keith Burns
parent
c86f3e5d2d
commit
c2c9008444
File diff suppressed because it is too large
Load Diff
@ -427,6 +427,13 @@ ip_address_copy_addr (void * dst , ip_address_t * src)
|
||||
clib_memcpy (dst, src, ip_address_size(src));
|
||||
}
|
||||
|
||||
void
|
||||
ip_address_set(ip_address_t * dst, void * src, u8 version)
|
||||
{
|
||||
clib_memcpy(dst, src, ip_version_to_size(version));
|
||||
ip_addr_version(dst) = version;
|
||||
}
|
||||
|
||||
void *
|
||||
ip_prefix_cast (gid_address_t * a)
|
||||
{
|
||||
|
@ -35,9 +35,15 @@ typedef CLIB_PACKED(struct ip_address
|
||||
u8 version;
|
||||
}) ip_address_t;
|
||||
|
||||
#define ip_addr_addr(_a) (_a)->ip
|
||||
#define ip_addr_v4(_a) (_a)->ip.v4
|
||||
#define ip_addr_v6(_a) (_a)->ip.v6
|
||||
#define ip_addr_version(_a) (_a)->version
|
||||
|
||||
int ip_address_cmp (ip_address_t * ip1, ip_address_t * ip2);
|
||||
void ip_address_copy (ip_address_t * dst , ip_address_t * src);
|
||||
void ip_address_copy_addr (void * dst , ip_address_t * src);
|
||||
void ip_address_set(ip_address_t * dst, void * src, u8 version);
|
||||
|
||||
typedef CLIB_PACKED(struct ip_prefix
|
||||
{
|
||||
@ -45,11 +51,6 @@ typedef CLIB_PACKED(struct ip_prefix
|
||||
u8 len;
|
||||
}) ip_prefix_t;
|
||||
|
||||
#define ip_addr_addr(_a) (_a)->ip
|
||||
#define ip_addr_v4(_a) (_a)->ip.v4
|
||||
#define ip_addr_v6(_a) (_a)->ip.v6
|
||||
#define ip_addr_version(_a) (_a)->version
|
||||
|
||||
#define ip_prefix_addr(_a) (_a)->addr
|
||||
#define ip_prefix_version(_a) ip_addr_version(&ip_prefix_addr(_a))
|
||||
#define ip_prefix_len(_a) (_a)->len
|
||||
@ -162,6 +163,7 @@ u32 gid_address_parse (u8 * offset, gid_address_t *a);
|
||||
#define gid_address_ippref(_a) (_a)->ippref
|
||||
#define gid_address_ippref_len(_a) (_a)->ippref.len
|
||||
#define gid_address_ip(_a) ip_prefix_addr(&gid_address_ippref(_a))
|
||||
#define gid_address_ip_version(_a) ip_addr_version(&gid_address_ip(_a))
|
||||
#define gid_address_lcaf(_a) (_a)->lcaf
|
||||
#define gid_address_vni(_a) ( (GID_ADDR_LCAF == gid_address_type(_a)) ? \
|
||||
lcaf_vni(&gid_address_lcaf(_a)) : 0)
|
||||
|
Reference in New Issue
Block a user