diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2020-11-26 08:37:27 +0000 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2020-12-08 09:00:24 +0000 |
commit | e2fe097424fb169dfe01421ff17b8ccd0c26b4a6 (patch) | |
tree | 2d9993f78d9165c1aba23b1daa4067106da81b45 /src/vnet/ip/ip6_link.c | |
parent | 9b8cb5082471dd670066b8ba2872ffbcc35a87f8 (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/vnet/ip/ip6_link.c')
-rw-r--r-- | src/vnet/ip/ip6_link.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/vnet/ip/ip6_link.c b/src/vnet/ip/ip6_link.c index bd7ad73b695..082033a9de9 100644 --- a/src/vnet/ip/ip6_link.c +++ b/src/vnet/ip/ip6_link.c @@ -337,41 +337,6 @@ ip6_link_get_mcast_adj (u32 sw_if_index) } int -ip6_src_address_for_packet (u32 sw_if_index, - const ip6_address_t * dst, ip6_address_t * src) -{ - ip_lookup_main_t *lm; - - lm = &ip6_main.lookup_main; - - if (ip6_address_is_link_local_unicast (dst)) - { - ip6_address_copy (src, ip6_get_link_local_address (sw_if_index)); - - return (!0); - } - else - { - u32 if_add_index = - lm->if_address_pool_index_by_sw_if_index[sw_if_index]; - if (PREDICT_TRUE (if_add_index != ~0)) - { - ip_interface_address_t *if_add = - pool_elt_at_index (lm->if_address_pool, if_add_index); - ip6_address_t *if_ip = - ip_interface_address_get_address (lm, if_add); - *src = *if_ip; - return (!0); - } - } - - src->as_u64[0] = 0; - src->as_u64[1] = 0; - - return (0); -} - -int ip6_link_set_local_address (u32 sw_if_index, const ip6_address_t * address) { ip6_link_delegate_t *ild; |