From e2fe097424fb169dfe01421ff17b8ccd0c26b4a6 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 26 Nov 2020 08:37:27 +0000 Subject: fib: Source Address Selection Type: feature Use the FIB to provide SAS (in so far as it is today) - Use the glean adjacency as the record of the connected prefixes = there's a glean per-{interface, protocol, connected-prefix} - Keep the glean up to date with whatever the recieve host prefix is (since it can change) Signed-off-by: Neale Ranns Change-Id: I0f3dd1edb1f3fc965af1c7c586709028eb9cdeac --- src/plugins/unittest/fib_test.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/plugins/unittest') diff --git a/src/plugins/unittest/fib_test.c b/src/plugins/unittest/fib_test.c index 3244b8a3001..1a2ba4a4b00 100644 --- a/src/plugins/unittest/fib_test.c +++ b/src/plugins/unittest/fib_test.c @@ -898,9 +898,6 @@ fib_test_v4 (void) adj = adj_get(ai); FIB_TEST((IP_LOOKUP_NEXT_GLEAN == adj->lookup_next_index), "attached interface adj is glean"); - FIB_TEST((0 == ip46_address_cmp(&local_pfx.fp_addr, - &adj->sub_type.glean.receive_addr)), - "attached interface adj is receive ok"); local_pfx.fp_len = 32; fib_table_entry_update_one_path(fib_index, &local_pfx, @@ -937,6 +934,9 @@ fib_test_v4 (void) FIB_PROTOCOL_IP4, FIB_SOURCE_INTERFACE)), "2 Interface Source'd prefixes"); + FIB_TEST((0 == ip46_address_cmp(&local_pfx.fp_addr, + &adj->sub_type.glean.rx_pfx.fp_addr)), + "attached interface adj is receive ok"); /* * +2 interface routes +2 non-shared path-lists @@ -4495,9 +4495,6 @@ fib_test_v6 (void) adj = adj_get(ai); FIB_TEST((IP_LOOKUP_NEXT_GLEAN == adj->lookup_next_index), "attached interface adj is glean"); - FIB_TEST((0 == ip46_address_cmp(&local_pfx.fp_addr, - &adj->sub_type.glean.receive_addr)), - "attached interface adj is receive ok"); dpo = fib_entry_contribute_ip_forwarding(fei); FIB_TEST((dpo->dpoi_index == ip6_fib_table_fwding_lookup( 1, @@ -4535,6 +4532,9 @@ fib_test_v6 (void) 1, &local_pfx.fp_addr.ip6)), "local-route; fwd and non-fwd tables match"); + FIB_TEST((0 == ip46_address_cmp(&local_pfx.fp_addr, + &adj->sub_type.glean.rx_pfx.fp_addr)), + "attached interface adj is receive ok"); /* * +2 entries. +2 unshared path-lists @@ -5257,6 +5257,8 @@ fib_test_v6 (void) FIB_TEST((0 == adj_nbr_db_size()), "ADJ DB size is %d", adj_nbr_db_size()); + FIB_TEST((0 == adj_glean_db_size()), "ADJ DB size is %d", + adj_glean_db_size()); return (res); } -- cgit 1.2.3-korg