diff options
author | Neale Ranns <nranns@cisco.com> | 2017-10-13 05:15:07 -0700 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-10-14 09:11:42 +0000 |
commit | 054c03ac9c20a5e38121590b83f01fd91f82acf0 (patch) | |
tree | 93ec5f8d85defb3e58d12fdca917a68000dbe6d3 /src/vnet/fib/fib_path.c | |
parent | d77275307b6ad6459ecba01912a302fb7dbf0f02 (diff) |
Source Lookup progammable via API
Change-Id: I5d5d4f22b6369d504455a644f73076d772fbcfb4
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/fib/fib_path.c')
-rw-r--r-- | src/vnet/fib/fib_path.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c index 889d17def9c..7b713a4b5c5 100644 --- a/src/vnet/fib/fib_path.c +++ b/src/vnet/fib/fib_path.c @@ -1054,6 +1054,8 @@ fib_path_route_flags_to_cfg_flags (const fib_route_path_t *rpath) cfg_flags |= FIB_PATH_CFG_FLAG_EXCLUSIVE; if (rpath->frp_flags & FIB_ROUTE_PATH_DROP) cfg_flags |= FIB_PATH_CFG_FLAG_DROP; + if (rpath->frp_flags & FIB_ROUTE_PATH_SOURCE_LOOKUP) + cfg_flags |= FIB_PATH_CFG_FLAG_DEAG_SRC; return (cfg_flags); } @@ -1695,16 +1697,20 @@ fib_path_resolve (fib_node_index_t path_index) * Resolve via a lookup DPO. * FIXME. control plane should add routes with a table ID */ + lookup_input_t input; lookup_cast_t cast; - + cast = (path->fp_cfg_flags & FIB_PATH_CFG_FLAG_RPF_ID ? LOOKUP_MULTICAST : LOOKUP_UNICAST); + input = (path->fp_cfg_flags & FIB_PATH_CFG_FLAG_DEAG_SRC ? + LOOKUP_INPUT_SRC_ADDR : + LOOKUP_INPUT_DST_ADDR); lookup_dpo_add_or_lock_w_fib_index(path->deag.fp_tbl_id, path->fp_nh_proto, cast, - LOOKUP_INPUT_DST_ADDR, + input, LOOKUP_TABLE_FROM_CONFIG, &path->fp_dpo); break; |