diff options
author | Neale Ranns <nranns@cisco.com> | 2017-06-14 06:50:08 -0700 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2017-06-21 11:49:01 +0000 |
commit | ca1936123cbe2c02521dce6c7890d66135888654 (patch) | |
tree | 5f2d1c8b35eb88da40c89c16028a12ab9fe92005 /src/vnet/fib | |
parent | 996f790dfb42260b3bd1e15b33f90171dc5907fb (diff) |
ARP: ignore non-connected routes and non-interface sources when determing if source is connected
Change-Id: I39fb0ec44cc322eaa12c0ff0700fc405d3982bfc
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/fib')
-rw-r--r-- | src/vnet/fib/fib_entry.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vnet/fib/fib_entry.c b/src/vnet/fib/fib_entry.c index cdebfbce..1143f05a 100644 --- a/src/vnet/fib/fib_entry.c +++ b/src/vnet/fib/fib_entry.c @@ -462,11 +462,15 @@ fib_entry_get_adj (fib_node_index_t fib_entry_index) const dpo_id_t *dpo; dpo = fib_entry_contribute_ip_forwarding(fib_entry_index); - dpo = load_balance_get_bucket(dpo->dpoi_index, 0); - if (dpo_is_adj(dpo)) + if (dpo_id_is_valid(dpo)) { - return (dpo->dpoi_index); + dpo = load_balance_get_bucket(dpo->dpoi_index, 0); + + if (dpo_is_adj(dpo)) + { + return (dpo->dpoi_index); + } } return (ADJ_INDEX_INVALID); } |