summaryrefslogtreecommitdiffstats
path: root/src/vnet/nhrp/nhrp_api.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-12-17 20:15:03 +0000
committerJohn Lo <loj@cisco.com>2019-12-19 15:17:40 +0000
commit4c16d80067b35973ebc5a86d685db52fea2fd052 (patch)
treecaf9604e08d907fda6f5c152675e6305b9f173f3 /src/vnet/nhrp/nhrp_api.c
parentcfffeae1e333c45e8417c9252432efbff28e371a (diff)
gre: multipoint ingress lookup fix
Type: fix Change-Id: I170edd62220a63cb19efea3032e173fb87730b1b Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/nhrp/nhrp_api.c')
-rw-r--r--src/vnet/nhrp/nhrp_api.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/vnet/nhrp/nhrp_api.c b/src/vnet/nhrp/nhrp_api.c
index 6f07eb700e4..d36adf99e14 100644
--- a/src/vnet/nhrp/nhrp_api.c
+++ b/src/vnet/nhrp/nhrp_api.c
@@ -70,6 +70,7 @@ vl_api_nhrp_send_one (index_t nei, void *arg)
vl_api_nhrp_details_t *mp;
vl_api_nhrp_send_t *ctx = arg;
const nhrp_entry_t *ne;
+ const fib_prefix_t *pfx;
mp = vl_msg_api_alloc (sizeof (*mp));
clib_memset (mp, 0, sizeof (*mp));
@@ -77,12 +78,15 @@ vl_api_nhrp_send_one (index_t nei, void *arg)
mp->context = ctx->context;
ne = nhrp_entry_get (nei);
+ pfx = nhrp_entry_get_nh (ne);
- ip_address_encode (&ne->ne_key->nk_peer, IP46_TYPE_ANY, &mp->entry.peer);
- ip_address_encode (&ne->ne_nh.fp_addr, IP46_TYPE_ANY, &mp->entry.nh);
+ ip_address_encode (nhrp_entry_get_peer (ne), IP46_TYPE_ANY,
+ &mp->entry.peer);
+ ip_address_encode (&pfx->fp_addr, IP46_TYPE_ANY, &mp->entry.nh);
mp->entry.nh_table_id =
- htonl (fib_table_get_table_id (ne->ne_fib_index, ne->ne_nh.fp_proto));
- mp->entry.sw_if_index = htonl (ne->ne_key->nk_sw_if_index);
+ htonl (fib_table_get_table_id
+ (nhrp_entry_get_fib_index (ne), pfx->fp_proto));
+ mp->entry.sw_if_index = htonl (nhrp_entry_get_sw_if_index (ne));
vl_api_send_msg (ctx->reg, (u8 *) mp);