summaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2016-12-10 21:59:14 +0000
committerDave Barach <openvpp@barachs.net>2016-12-11 14:10:05 +0000
commitfa0fb5821a4b766a9cbb352b86df274b99cf331c (patch)
tree948a5a18d37ac90c499a473a7b1c553b2b3f3f86 /vnet
parent4a72c8e0d9f8a3a45584efff1b6320d16eb0bcfa (diff)
VRF imported FIB entry should inherit the flags from the export entry.
Change-Id: Ie2c3d62a468315390ef2c4314a73cff0f6d3cdaf Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/fib/fib_attached_export.c3
-rw-r--r--vnet/vnet/fib/fib_test.c15
2 files changed, 11 insertions, 7 deletions
diff --git a/vnet/vnet/fib/fib_attached_export.c b/vnet/vnet/fib/fib_attached_export.c
index 07bce5548cc..c389ea43feb 100644
--- a/vnet/vnet/fib/fib_attached_export.c
+++ b/vnet/vnet/fib/fib_attached_export.c
@@ -189,7 +189,8 @@ fib_entry_import_add (fib_ae_import_t *import,
fib_table_entry_special_dpo_add(import->faei_import_fib,
&prefix,
FIB_SOURCE_AE,
- FIB_ENTRY_FLAG_EXCLUSIVE,
+ (fib_entry_get_flags(entry_index) |
+ FIB_ENTRY_FLAG_EXCLUSIVE),
load_balance_get_bucket(dpo->dpoi_index, 0));
fib_entry_lock(entry_index);
diff --git a/vnet/vnet/fib/fib_test.c b/vnet/vnet/fib/fib_test.c
index 1572f81edf3..5083db26872 100644
--- a/vnet/vnet/fib/fib_test.c
+++ b/vnet/vnet/fib/fib_test.c
@@ -1001,7 +1001,7 @@ fib_test_v4 (void)
fib_table_entry_update_one_path(fib_index,
&pfx_10_10_10_2_s_32,
FIB_SOURCE_ADJ,
- FIB_ENTRY_FLAG_NONE,
+ FIB_ENTRY_FLAG_ATTACHED,
FIB_PROTOCOL_IP4,
&pfx_10_10_10_2_s_32.fp_addr,
tm->hw[0]->sw_if_index,
@@ -3949,7 +3949,7 @@ fib_test_v6 (void)
fib_table_entry_update_one_path(fib_index,
&pfx_2001_1_2_s_128,
FIB_SOURCE_ADJ,
- FIB_ENTRY_FLAG_NONE,
+ FIB_ENTRY_FLAG_ATTACHED,
FIB_PROTOCOL_IP6,
&pfx_2001_1_2_s_128.fp_addr,
tm->hw[0]->sw_if_index,
@@ -3988,7 +3988,7 @@ fib_test_v6 (void)
fib_table_entry_update_one_path(fib_index,
&pfx_2001_1_3_s_128,
FIB_SOURCE_ADJ,
- FIB_ENTRY_FLAG_NONE,
+ FIB_ENTRY_FLAG_ATTACHED,
FIB_PROTOCOL_IP6,
&pfx_2001_1_3_s_128.fp_addr,
tm->hw[0]->sw_if_index,
@@ -4623,7 +4623,7 @@ fib_test_ae (void)
fib_table_entry_update_one_path(fib_index,
&pfx_10_10_10_1_s_32,
FIB_SOURCE_ADJ,
- FIB_ENTRY_FLAG_NONE,
+ FIB_ENTRY_FLAG_ATTACHED,
FIB_PROTOCOL_IP4,
&pfx_10_10_10_1_s_32.fp_addr,
tm->hw[0]->sw_if_index,
@@ -4692,7 +4692,7 @@ fib_test_ae (void)
fib_table_entry_update_one_path(fib_index,
&pfx_10_10_10_2_s_32,
FIB_SOURCE_ADJ,
- FIB_ENTRY_FLAG_NONE,
+ FIB_ENTRY_FLAG_ATTACHED,
FIB_PROTOCOL_IP4,
&pfx_10_10_10_2_s_32.fp_addr,
tm->hw[0]->sw_if_index,
@@ -4708,6 +4708,9 @@ fib_test_ae (void)
FIB_TEST((FIB_NODE_INDEX_INVALID != fei), "ADJ-fib2 imported");
FIB_TEST((ai == fib_entry_get_adj(fei)),
"Import uses same adj as export");
+ FIB_TEST((FIB_ENTRY_FLAG_ATTACHED & fib_entry_get_flags(fei)),
+ "ADJ-fib2 imported flags %d",
+ fib_entry_get_flags(fei));
/*
* create a 2nd FIB table into which routes will be imported
@@ -4760,7 +4763,7 @@ fib_test_ae (void)
fib_table_entry_update_one_path(fib_index,
&pfx_10_10_10_3_s_32,
FIB_SOURCE_ADJ,
- FIB_ENTRY_FLAG_NONE,
+ FIB_ENTRY_FLAG_ATTACHED,
FIB_PROTOCOL_IP4,
&pfx_10_10_10_3_s_32.fp_addr,
tm->hw[0]->sw_if_index,