summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshwethab <shwetha.bhandari@gmail.com>2017-03-29 11:36:37 +0000
committerNeale Ranns <nranns@cisco.com>2017-03-29 13:57:13 +0000
commitff077a040194eb3dd80214738d741bc757f4f210 (patch)
treea78a9382d320b57a8c6eda2461fe9d292f98f7b2
parent0679760dc54798a47731943b97b1dc5b2a455e3d (diff)
SR replicate mheap corruption fix VPP-672
Change-Id: If1c68fc63fa71fab198f2bf4f79bdd7a9841c2e8 Signed-off-by: shwethab <shwetha.bhandari@gmail.com> Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
-rw-r--r--src/vnet/fib/fib_entry_src_api.c1
-rw-r--r--src/vnet/fib/fib_entry_src_special.c1
-rwxr-xr-xsrc/vnet/sr/sr_policy_rewrite.c9
-rwxr-xr-xsrc/vnet/sr/sr_steering.c6
4 files changed, 5 insertions, 12 deletions
diff --git a/src/vnet/fib/fib_entry_src_api.c b/src/vnet/fib/fib_entry_src_api.c
index 1277bd65af7..19db8819ede 100644
--- a/src/vnet/fib/fib_entry_src_api.c
+++ b/src/vnet/fib/fib_entry_src_api.c
@@ -117,4 +117,5 @@ fib_entry_src_api_register (void)
fib_entry_src_register(FIB_SOURCE_CLI, &api_src_vft);
fib_entry_src_register(FIB_SOURCE_DHCP, &api_src_vft);
fib_entry_src_register(FIB_SOURCE_IP6_ND_PROXY, &api_src_vft);
+ fib_entry_src_register(FIB_SOURCE_SR, &api_src_vft);
}
diff --git a/src/vnet/fib/fib_entry_src_special.c b/src/vnet/fib/fib_entry_src_special.c
index 52a6134e337..75605d7f5eb 100644
--- a/src/vnet/fib/fib_entry_src_special.c
+++ b/src/vnet/fib/fib_entry_src_special.c
@@ -66,6 +66,5 @@ fib_entry_src_special_register (void)
fib_entry_src_register(FIB_SOURCE_MAP, &special_src_vft);
fib_entry_src_register(FIB_SOURCE_SIXRD, &special_src_vft);
fib_entry_src_register(FIB_SOURCE_CLASSIFY, &special_src_vft);
- fib_entry_src_register(FIB_SOURCE_SR, &special_src_vft);
fib_entry_src_register(FIB_SOURCE_AE, &special_src_vft);
}
diff --git a/src/vnet/sr/sr_policy_rewrite.c b/src/vnet/sr/sr_policy_rewrite.c
index dfdd7950597..45927385cfe 100755
--- a/src/vnet/sr/sr_policy_rewrite.c
+++ b/src/vnet/sr/sr_policy_rewrite.c
@@ -516,11 +516,6 @@ update_replicate (ip6_sr_policy_t * sr_policy)
replicate_multipath_update (&sr_policy->ip6_dpo, ip6_path_vector);
if (sr_policy->is_encap)
replicate_multipath_update (&sr_policy->ip4_dpo, ip4_path_vector);
-
- /* Cleanup */
- vec_free (b_path_vector);
- vec_free (ip6_path_vector);
- vec_free (ip4_path_vector);
}
/******************************* SR rewrite API *******************************/
@@ -607,10 +602,6 @@ sr_policy_add (ip6_address_t * bsid, ip6_address_t * segments,
"SRv6 steering of IP6 prefixes through BSIDs");
sm->fib_table_ip4 = fib_table_create_and_lock (FIB_PROTOCOL_IP6,
"SRv6 steering of IP4 prefixes through BSIDs");
- fib_table_flush (sm->fib_table_ip6, FIB_PROTOCOL_IP6,
- FIB_SOURCE_SPECIAL);
- fib_table_flush (sm->fib_table_ip4, FIB_PROTOCOL_IP6,
- FIB_SOURCE_SPECIAL);
}
/* Create IPv6 FIB for the BindingSID attached to the DPO of the only SL */
diff --git a/src/vnet/sr/sr_steering.c b/src/vnet/sr/sr_steering.c
index 86d6f27cbe1..8d66c5f8ce9 100755
--- a/src/vnet/sr/sr_steering.c
+++ b/src/vnet/sr/sr_steering.c
@@ -306,7 +306,8 @@ update_fib:
(table_id !=
(u32) ~ 0 ?
table_id : 0)),
- &pfx, FIB_SOURCE_CLI, FIB_ENTRY_FLAG_NONE,
+ &pfx, FIB_SOURCE_SR,
+ FIB_ENTRY_FLAG_LOOSE_URPF_EXEMPT,
FIB_PROTOCOL_IP6,
(ip46_address_t *) & sr_policy->bsid, ~0,
sm->fib_table_ip6, 1, NULL,
@@ -322,7 +323,8 @@ update_fib:
(table_id !=
(u32) ~ 0 ?
table_id : 0)),
- &pfx, FIB_SOURCE_CLI, FIB_ENTRY_FLAG_NONE,
+ &pfx, FIB_SOURCE_SR,
+ FIB_ENTRY_FLAG_LOOSE_URPF_EXEMPT,
FIB_PROTOCOL_IP6,
(ip46_address_t *) & sr_policy->bsid, ~0,
sm->fib_table_ip4, 1, NULL,