diff options
author | 2016-06-14 18:44:02 +0100 | |
---|---|---|
committer | 2016-06-15 09:18:26 +0000 | |
commit | 2a34b9e1a64f65d9f91c027de0d975701f6dceb6 (patch) | |
tree | a226d6872cb1f86fcc67c8d45ea655f516fd569f | |
parent | 820e363a8d60ec05f1cf18c0c3bf7a200f5a896d (diff) |
VPP-137: VPP sends ARP with wrong requested IP
Change-Id: I01802f3dab04c940e65236ba6e680f1e504a0a5f
Signed-off-by: Neale <nranns@cisco.com>
-rw-r--r-- | vpp/api/api.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/vpp/api/api.c b/vpp/api/api.c index f398e4f9..77635a9d 100644 --- a/vpp/api/api.c +++ b/vpp/api/api.c @@ -974,7 +974,18 @@ static int ip4_add_del_route_t_handler (vl_api_ip_add_del_route_t *mp) } nh_adj = ip_get_adjacency (lm, ai); - vec_add1 (add_adj, nh_adj[0]); + if (nh_adj->lookup_next_index == IP_LOOKUP_NEXT_ARP && + nh_adj->arp.next_hop.ip4.as_u32 == 0) { + /* the next-hop resovles via a glean adj. create and use + * a ARP adj for the next-hop */ + a.adj_index = vnet_arp_glean_add(fib_index, &next_hop_address); + a.add_adj = NULL; + a.n_add_adj = 0; + ip4_add_del_route (im, &a); + + goto done; + } + vec_add1 (add_adj, nh_adj[0]); if (mp->lookup_in_vrf) { p = hash_get (im->fib_index_by_table_id, ntohl(mp->lookup_in_vrf)); if (p) @@ -1016,6 +1027,7 @@ do_add_del: vec_free (add_adj); +done: dsunlock (sm); return 0; } |