summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip6_neighbor.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-05-16 08:46:45 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2017-05-17 12:02:04 +0000
commit1985c93bd728db22c946e05691f21a2f9774e458 (patch)
tree036b987e37ae4d4b0e1c447befe43124bcc1e4c9 /src/vnet/ip/ip6_neighbor.c
parent1da79ed89942dd27ea1d7c74311b91d02624722d (diff)
ARP learning fixes (VPP-843)
learn ARP peers if, 1) it's a reply to a local address, 2) we are sending a response to a request. send proxy ARP responses only in the interface the request was sent. Change-Id: I22b949c65122824233076492b7dd537daca07bc2 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit d5b6aa139856a1447f7bc5377058202110eaa4cf)
Diffstat (limited to 'src/vnet/ip/ip6_neighbor.c')
-rw-r--r--src/vnet/ip/ip6_neighbor.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vnet/ip/ip6_neighbor.c b/src/vnet/ip/ip6_neighbor.c
index 92708f14d5b..edc670af3b0 100644
--- a/src/vnet/ip/ip6_neighbor.c
+++ b/src/vnet/ip/ip6_neighbor.c
@@ -273,7 +273,8 @@ ip6_neighbor_sw_interface_up_down (vnet_main_t * vnm,
{
n = pool_elt_at_index (nm->neighbor_pool, to_delete[i]);
mhash_unset (&nm->neighbor_index_by_key, &n->key, 0);
- fib_table_entry_delete_index (n->fib_entry_index, FIB_SOURCE_ADJ);
+ if (FIB_NODE_INDEX_INVALID != n->fib_entry_index)
+ fib_table_entry_delete_index (n->fib_entry_index, FIB_SOURCE_ADJ);
pool_put (nm->neighbor_pool, n);
}
@@ -609,6 +610,7 @@ vnet_set_ip6_ethernet_neighbor (vlib_main_t * vm,
mhash_set (&nm->neighbor_index_by_key, &k, n - nm->neighbor_pool,
/* old value */ 0);
n->key = k;
+ n->fib_entry_index = FIB_NODE_INDEX_INVALID;
clib_memcpy (n->link_layer_address,
link_layer_address, n_bytes_link_layer_address);
@@ -746,7 +748,9 @@ vnet_unset_ip6_ethernet_neighbor (vlib_main_t * vm,
adj_nbr_walk_nh6 (sw_if_index,
&n->key.ip6_address, ip6_nd_mk_incomplete_walk, NULL);
- fib_table_entry_delete_index (n->fib_entry_index, FIB_SOURCE_ADJ);
+
+ if (FIB_NODE_INDEX_INVALID != n->fib_entry_index)
+ fib_table_entry_delete_index (n->fib_entry_index, FIB_SOURCE_ADJ);
pool_put (nm->neighbor_pool, n);
out: