aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/fib/fib_entry_src.c4
-rw-r--r--src/vnet/fib/fib_path.c5
-rw-r--r--src/vnet/fib/fib_types.c1
-rw-r--r--src/vnet/fib/fib_types.h4
-rw-r--r--src/vnet/ip/ip_api.c5
5 files changed, 19 insertions, 0 deletions
diff --git a/src/vnet/fib/fib_entry_src.c b/src/vnet/fib/fib_entry_src.c
index 1d73af3bf0d..66f5987a7cf 100644
--- a/src/vnet/fib/fib_entry_src.c
+++ b/src/vnet/fib/fib_entry_src.c
@@ -1077,6 +1077,10 @@ fib_entry_flags_update (const fib_entry_t *fib_entry,
{
esrc->fes_entry_flags &= ~FIB_ENTRY_FLAG_ATTACHED;
}
+ if (rpath->frp_flags & FIB_ROUTE_PATH_DEAG)
+ {
+ esrc->fes_entry_flags |= FIB_ENTRY_FLAG_LOOSE_URPF_EXEMPT;
+ }
}
if (fib_route_attached_cross_table(fib_entry, rpath))
{
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index f7fed26ac9a..fddb8ecdd5a 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -1294,6 +1294,11 @@ fib_path_create (fib_node_index_t pl_index,
path->fp_type = FIB_PATH_TYPE_BIER_TABLE;
path->bier_table.fp_bier_tbl = rpath->frp_bier_tbl;
}
+ else if (rpath->frp_flags & FIB_ROUTE_PATH_DEAG)
+ {
+ path->fp_type = FIB_PATH_TYPE_DEAG;
+ path->deag.fp_tbl_id = rpath->frp_fib_index;
+ }
else if (~0 != rpath->frp_sw_if_index)
{
if (ip46_address_is_zero(&rpath->frp_addr))
diff --git a/src/vnet/fib/fib_types.c b/src/vnet/fib/fib_types.c
index 48f2bd1dc9a..f38c8154e0c 100644
--- a/src/vnet/fib/fib_types.c
+++ b/src/vnet/fib/fib_types.c
@@ -416,6 +416,7 @@ unformat_fib_route_path (unformat_input_t * input, va_list * args)
{
rpath->frp_proto = *payload_proto;
rpath->frp_sw_if_index = ~0;
+ rpath->frp_flags |= FIB_ROUTE_PATH_DEAG;
}
else if (unformat (input, "resolve-via-host"))
{
diff --git a/src/vnet/fib/fib_types.h b/src/vnet/fib/fib_types.h
index 94c94228bb3..5742c69b7c7 100644
--- a/src/vnet/fib/fib_types.h
+++ b/src/vnet/fib/fib_types.h
@@ -340,6 +340,10 @@ typedef enum fib_route_path_flags_t_
* A path that resolves via a BIER impostion object
*/
FIB_ROUTE_PATH_BIER_IMP = (1 << 12),
+ /**
+ * A path that resolves via another table
+ */
+ FIB_ROUTE_PATH_DEAG = (1 << 13),
} fib_route_path_flags_t;
/**
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index fefaccf3fd4..db88d7b0161 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -911,6 +911,11 @@ add_del_route_t_handler (u8 is_multipath,
path_flags |= FIB_ROUTE_PATH_UDP_ENCAP;
path.frp_udp_encap_id = next_hop_id;
}
+ if (path.frp_sw_if_index == ~0 && ip46_address_is_zero (&path.frp_addr)
+ && path.frp_fib_index != ~0)
+ {
+ path_flags |= FIB_ROUTE_PATH_DEAG;
+ }
path.frp_flags = path_flags;