summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/fib/fib_entry_src.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/vnet/fib/fib_entry_src.c b/src/vnet/fib/fib_entry_src.c
index b3b40bf2229..bc1ff2e068c 100644
--- a/src/vnet/fib/fib_entry_src.c
+++ b/src/vnet/fib/fib_entry_src.c
@@ -1547,12 +1547,19 @@ fib_entry_src_action_path_add (fib_entry_t *fib_entry,
esrc = fib_entry_src_find(fib_entry, source);
if (NULL == esrc)
{
+ const dpo_id_t *dpo;
+
+ if (flags == FIB_ENTRY_FLAG_EXCLUSIVE) {
+ dpo = &rpath->dpo;
+ } else {
+ dpo = drop_dpo_get(fib_entry_get_dpo_proto(fib_entry));
+ }
+
fib_entry =
fib_entry_src_action_add(fib_entry,
source,
flags,
- drop_dpo_get(
- fib_entry_get_dpo_proto(fib_entry)));
+ dpo);
esrc = fib_entry_src_find(fib_entry, source);
}
@@ -1608,11 +1615,18 @@ fib_entry_src_action_path_swap (fib_entry_t *fib_entry,
if (NULL == esrc)
{
+ const dpo_id_t *dpo;
+
+ if (flags == FIB_ENTRY_FLAG_EXCLUSIVE) {
+ dpo = &rpaths->dpo;
+ } else {
+ dpo = drop_dpo_get(fib_entry_get_dpo_proto(fib_entry));
+ }
+
fib_entry = fib_entry_src_action_add(fib_entry,
source,
flags,
- drop_dpo_get(
- fib_entry_get_dpo_proto(fib_entry)));
+ dpo);
esrc = fib_entry_src_find(fib_entry, source);
}
else