diff options
author | Neale Ranns <neale@graphiant.com> | 2021-10-08 07:16:12 +0000 |
---|---|---|
committer | Neale Ranns <neale@graphiant.com> | 2021-11-15 08:42:26 +0000 |
commit | 50bd1d3e256154212198a31932896b07af5b129f (patch) | |
tree | 020ead7393316f8229f0f592f6cc8e1bc2daf6c0 /src/vnet/fib/fib_node.h | |
parent | 8d76ccf9cca5991d2f9b18035989ccb0baca1798 (diff) |
fib: re-evaluate the import/export state of a prefix.
Type: fix
re-evaluate the import/export state of a prefix when the interface it is attached to rebinds to a different table.
Only attached routes have import/export requirements, so we can back walk from the glean adjacency when the interface rebinds tables.
There are two cases to consider.
1. the rebind may change the prefix from/to import
2. the import VRF may change
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I25b6af43b3b2d8f701dfbe7a08710dc56b3f5778
Diffstat (limited to 'src/vnet/fib/fib_node.h')
-rw-r--r-- | src/vnet/fib/fib_node.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/vnet/fib/fib_node.h b/src/vnet/fib/fib_node.h index 27e67b11c87..dd266ee8ff9 100644 --- a/src/vnet/fib/fib_node.h +++ b/src/vnet/fib/fib_node.h @@ -110,6 +110,10 @@ typedef enum fib_node_back_walk_reason_t_ { */ FIB_NODE_BW_REASON_INTERFACE_DOWN, /** + * A resolving interface has been bound to another table + */ + FIB_NODE_BW_REASON_INTERFACE_BIND, + /** * A resolving interface has been deleted. */ FIB_NODE_BW_REASON_INTERFACE_DELETE, @@ -138,6 +142,7 @@ typedef enum fib_node_back_walk_reason_t_ { [FIB_NODE_BW_REASON_INTERFACE_UP] = "if-up", \ [FIB_NODE_BW_REASON_INTERFACE_DOWN] = "if-down", \ [FIB_NODE_BW_REASON_INTERFACE_DELETE] = "if-delete", \ + [FIB_NODE_BW_REASON_INTERFACE_BIND] = "if-bind", \ [FIB_NODE_BW_REASON_ADJ_UPDATE] = "adj-update", \ [FIB_NODE_BW_REASON_ADJ_MTU] = "adj-mtu", \ [FIB_NODE_BW_REASON_ADJ_DOWN] = "adj-down", \ @@ -157,14 +162,15 @@ typedef enum fib_node_bw_reason_flag_t_ { FIB_NODE_BW_REASON_FLAG_EVALUATE = (1 << FIB_NODE_BW_REASON_EVALUATE), FIB_NODE_BW_REASON_FLAG_INTERFACE_UP = (1 << FIB_NODE_BW_REASON_INTERFACE_UP), FIB_NODE_BW_REASON_FLAG_INTERFACE_DOWN = (1 << FIB_NODE_BW_REASON_INTERFACE_DOWN), + FIB_NODE_BW_REASON_FLAG_INTERFACE_BIND = (1 << FIB_NODE_BW_REASON_INTERFACE_BIND), FIB_NODE_BW_REASON_FLAG_INTERFACE_DELETE = (1 << FIB_NODE_BW_REASON_INTERFACE_DELETE), FIB_NODE_BW_REASON_FLAG_ADJ_UPDATE = (1 << FIB_NODE_BW_REASON_ADJ_UPDATE), FIB_NODE_BW_REASON_FLAG_ADJ_MTU = (1 << FIB_NODE_BW_REASON_ADJ_MTU), FIB_NODE_BW_REASON_FLAG_ADJ_DOWN = (1 << FIB_NODE_BW_REASON_ADJ_DOWN), } __attribute__ ((packed)) fib_node_bw_reason_flag_t; -STATIC_ASSERT(sizeof(fib_node_bw_reason_flag_t) < 2, - "BW Reason enum < 2 byte. Consequences for cover_upd_res_t"); +STATIC_ASSERT(sizeof(fib_node_bw_reason_flag_t) < 3, + "BW Reason enum < 2 byte. Consequences for fib_entry_src_cover_res_t"); extern u8 *format_fib_node_bw_reason(u8 *s, va_list *args); @@ -229,6 +235,17 @@ typedef struct fib_node_back_walk_ctx_t_ { * in the graph. */ u32 fnbw_depth; + + /** + * Additional data associated with the reason the walk is occuring + */ + union + { + struct { + u32 fnbw_from_fib_index; + u32 fnbw_to_fib_index; + } interface_bind; + }; } fib_node_back_walk_ctx_t; /** |