diff options
author | Neale Ranns <nranns@cisco.com> | 2017-05-13 05:52:58 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2017-05-15 11:36:33 +0000 |
commit | 08b1648194e0076220c52aebe27ee1eb5615fd6a (patch) | |
tree | 00ff881719d0d47a49898b333a00d0945b323893 /src/vnet/fib/fib_path.c | |
parent | 572825df79e27a8baebcfc11d91bdb6f9776c2c7 (diff) |
Fix FIB recursion loops via cover (VPP-842)
Change-Id: Ia91c3e8cb27b9e4c1cccefc0a4857dd9995450ab
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 | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c index 889317fd83c..b47d51f8d51 100644 --- a/src/vnet/fib/fib_path.c +++ b/src/vnet/fib/fib_path.c @@ -1716,7 +1716,11 @@ fib_path_get_resolving_interface (fib_node_index_t path_index) case FIB_PATH_TYPE_RECEIVE: return (path->receive.fp_interface); case FIB_PATH_TYPE_RECURSIVE: - return (fib_entry_get_resolving_interface(path->fp_via_fib)); + if (fib_path_is_resolved(path_index)) + { + return (fib_entry_get_resolving_interface(path->fp_via_fib)); + } + break; case FIB_PATH_TYPE_INTF_RX: case FIB_PATH_TYPE_SPECIAL: case FIB_PATH_TYPE_DEAG: @@ -1781,11 +1785,12 @@ fib_path_contribute_urpf (fib_node_index_t path_index, break; case FIB_PATH_TYPE_RECURSIVE: - if (FIB_NODE_INDEX_INVALID != path->fp_via_fib) + if (FIB_NODE_INDEX_INVALID != path->fp_via_fib && + !fib_path_is_looped(path_index)) { /* * there's unresolved due to constraints, and there's unresolved - * due to ain't go no via. can't do nowt w'out via. + * due to ain't got no via. can't do nowt w'out via. */ fib_entry_contribute_urpf(path->fp_via_fib, urpf); } |