summaryrefslogtreecommitdiffstats
path: root/src/plugins/unittest
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2020-11-26 08:37:27 +0000
committerOle Tr�an <otroan@employees.org>2020-12-08 09:00:24 +0000
commite2fe097424fb169dfe01421ff17b8ccd0c26b4a6 (patch)
tree2d9993f78d9165c1aba23b1daa4067106da81b45 /src/plugins/unittest
parent9b8cb5082471dd670066b8ba2872ffbcc35a87f8 (diff)
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 <neale.ranns@cisco.com> Change-Id: I0f3dd1edb1f3fc965af1c7c586709028eb9cdeac
Diffstat (limited to 'src/plugins/unittest')
-rw-r--r--src/plugins/unittest/fib_test.c14
1 files changed, 8 insertions, 6 deletions
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);
}