From ca1936123cbe2c02521dce6c7890d66135888654 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Wed, 14 Jun 2017 06:50:08 -0700 Subject: ARP: ignore non-connected routes and non-interface sources when determing if source is connected Change-Id: I39fb0ec44cc322eaa12c0ff0700fc405d3982bfc Signed-off-by: Neale Ranns --- src/vnet/fib/fib_entry.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/vnet/fib/fib_entry.c') 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); } -- cgit 1.2.3-korg