summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/fib/fib_path.c13
-rw-r--r--src/vnet/fib/fib_types.h5
2 files changed, 16 insertions, 2 deletions
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index 88dddbcaeea..4c93f732b72 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -1323,6 +1323,11 @@ fib_path_create (fib_node_index_t pl_index,
path->fp_type = FIB_PATH_TYPE_DVR;
path->dvr.fp_interface = rpath->frp_sw_if_index;
}
+ else if (rpath->frp_flags & FIB_ROUTE_PATH_EXCLUSIVE)
+ {
+ path->fp_type = FIB_PATH_TYPE_EXCLUSIVE;
+ dpo_copy(&path->exclusive.fp_ex_dpo, &rpath->dpo);
+ }
else if (~0 != rpath->frp_sw_if_index)
{
if (ip46_address_is_zero(&rpath->frp_addr))
@@ -1574,9 +1579,11 @@ fib_path_cmp_i (const fib_path_t *path1,
case FIB_PATH_TYPE_DVR:
res = (path1->dvr.fp_interface - path2->dvr.fp_interface);
break;
+ case FIB_PATH_TYPE_EXCLUSIVE:
+ res = dpo_cmp(&path1->exclusive.fp_ex_dpo, &path2->exclusive.fp_ex_dpo);
+ break;
case FIB_PATH_TYPE_SPECIAL:
case FIB_PATH_TYPE_RECEIVE:
- case FIB_PATH_TYPE_EXCLUSIVE:
res = 0;
break;
}
@@ -1711,9 +1718,11 @@ fib_path_cmp_w_route_path (fib_node_index_t path_index,
case FIB_PATH_TYPE_DVR:
res = (path->dvr.fp_interface - rpath->frp_sw_if_index);
break;
+ case FIB_PATH_TYPE_EXCLUSIVE:
+ res = dpo_cmp(&path->exclusive.fp_ex_dpo, &rpath->dpo);
+ break;
case FIB_PATH_TYPE_SPECIAL:
case FIB_PATH_TYPE_RECEIVE:
- case FIB_PATH_TYPE_EXCLUSIVE:
res = 0;
break;
}
diff --git a/src/vnet/fib/fib_types.h b/src/vnet/fib/fib_types.h
index cd6ef7efac8..714a1d9e9a8 100644
--- a/src/vnet/fib/fib_types.h
+++ b/src/vnet/fib/fib_types.h
@@ -523,6 +523,11 @@ typedef struct fib_route_path_t_ {
* The outgoing MPLS label Stack. NULL implies no label.
*/
fib_mpls_label_t *frp_label_stack;
+
+ /**
+ * Exclusive DPO
+ */
+ dpo_id_t dpo;
};
/**
* A path that resolves via a BIER Table.