Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fix vector index range checks
[vpp.git]
/
src
/
vnet
/
ip
/
ip6_neighbor.c
diff --git
a/src/vnet/ip/ip6_neighbor.c
b/src/vnet/ip/ip6_neighbor.c
index
87bda43
..
6227ed6
100644
(file)
--- a/
src/vnet/ip/ip6_neighbor.c
+++ b/
src/vnet/ip/ip6_neighbor.c
@@
-662,6
+662,14
@@
ip6_ethernet_update_adjacency (vnet_main_t * vnm, u32 sw_if_index, u32 ai)
ip6_nbr_probe (adj);
}
break;
ip6_nbr_probe (adj);
}
break;
+ case IP_LOOKUP_NEXT_BCAST:
+ adj_nbr_update_rewrite (ai,
+ ADJ_NBR_REWRITE_FLAG_COMPLETE,
+ ethernet_build_rewrite (vnm,
+ sw_if_index,
+ VNET_LINK_IP6,
+ VNET_REWRITE_FOR_SW_INTERFACE_ADDRESS_BROADCAST));
+ break;
case IP_LOOKUP_NEXT_MCAST:
{
/*
case IP_LOOKUP_NEXT_MCAST:
{
/*
@@
-794,7
+802,13
@@
vnet_set_ip6_ethernet_neighbor (vlib_main_t * vm,
n = pool_elt_at_index (nm->neighbor_pool, p[0]);
/* Refuse to over-write static neighbor entry. */
if (!is_static && (n->flags & IP6_NEIGHBOR_FLAG_STATIC))
n = pool_elt_at_index (nm->neighbor_pool, p[0]);
/* Refuse to over-write static neighbor entry. */
if (!is_static && (n->flags & IP6_NEIGHBOR_FLAG_STATIC))
- return -2;
+ {
+ /* if MAC address match, still check to send event */
+ if (0 == memcmp (n->link_layer_address,
+ link_layer_address, n_bytes_link_layer_address))
+ goto check_customers;
+ return -2;
+ }
make_new_nd_cache_entry = 0;
}
make_new_nd_cache_entry = 0;
}
@@
-4233,7
+4247,7
@@
ip6_get_ll_address (u32 sw_if_index, ip6_address_t * addr)
ip6_radv_t *radv_info;
u32 ri;
ip6_radv_t *radv_info;
u32 ri;
- if (vec_len (nm->if_radv_pool_index_by_sw_if_index) < sw_if_index)
+ if (vec_len (nm->if_radv_pool_index_by_sw_if_index) <
=
sw_if_index)
return 0;
ri = nm->if_radv_pool_index_by_sw_if_index[sw_if_index];
return 0;
ri = nm->if_radv_pool_index_by_sw_if_index[sw_if_index];