diff options
author | Florin Coras <fcoras@cisco.com> | 2017-12-16 08:31:06 -0800 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2017-12-21 20:53:31 +0000 |
commit | 79ae2d306269524b9de662dbbf532a04e11b7634 (patch) | |
tree | 70e6a66d1551e31a2e0354221bb1c0b761b1cbdd /src/vnet/fib | |
parent | 529a425b04751d0590de2f398a20bd36d0e25308 (diff) |
fib: make deag entries urpf extempt
Change-Id: Ie8f6bb4fcd3e4fa269e86a77d2f21c87f372b783
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/fib')
-rw-r--r-- | src/vnet/fib/fib_entry_src.c | 4 | ||||
-rw-r--r-- | src/vnet/fib/fib_path.c | 5 | ||||
-rw-r--r-- | src/vnet/fib/fib_types.c | 1 | ||||
-rw-r--r-- | src/vnet/fib/fib_types.h | 4 |
4 files changed, 14 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; /** |