FIB_SOURCE_AE,
/**
* Recursive resolution source.
- * Used to install an entry that is thre resolution traget of another.
+ * Used to install an entry that is the resolution traget of another.
*/
FIB_SOURCE_RR,
+ /**
+ * uRPF bypass/exemption.
+ * Used to install an entry that is exempt from the loose uRPF check
+ */
+ FIB_SOURCE_URPF_EXEMPT,
/**
* The default route source.
* The default route is always added to the FIB table (like the
FIB_SOURCE_LAST = FIB_SOURCE_DEFAULT_ROUTE,
} __attribute__ ((packed)) fib_source_t;
-_Static_assert (sizeof(fib_source_t) == 1,
- "FIB too many sources");
+STATIC_ASSERT (sizeof(fib_source_t) == 1,
+ "FIB too many sources");
/**
* The maximum number of sources
[FIB_SOURCE_RR] = "recursive-resolution", \
[FIB_SOURCE_AE] = "attached_export", \
[FIB_SOURCE_MPLS] = "mpls", \
+ [FIB_SOURCE_URPF_EXEMPT] = "urpf-exempt", \
[FIB_SOURCE_DEFAULT_ROUTE] = "default-route", \
}
* Keep the size of the flags field to 2 bytes, so it
* can be placed next to the 2 bytes reference count
*/
-_Static_assert (sizeof(fib_entry_src_flag_t) <= 2,
- "FIB entry flags field size too big");
+STATIC_ASSERT (sizeof(fib_entry_src_flag_t) <= 2,
+ "FIB entry flags field size too big");
/**
* Information related to the source of a FIB entry
* paint the header straight on without the need to check the packet
* type to derive the EOS bit value.
*/
- dpo_id_t fe_lb[FIB_FORW_CHAIN_NUM];
+ dpo_id_t fe_lb[FIB_FORW_CHAIN_MPLS_NUM];
/**
* Vector of source infos.
* Most entries will only have 1 source. So we optimise for memory usage,
fib_source_t source,
fib_entry_flag_t flags,
const dpo_id_t *dpo);
+extern void fib_entry_special_update(fib_node_index_t fib_entry_index,
+ fib_source_t source,
+ fib_entry_flag_t flags,
+ const dpo_id_t *dpo);
extern fib_entry_src_flag_t fib_entry_special_remove(fib_node_index_t fib_entry_index,
fib_source_t source);
extern fib_entry_src_flag_t fib_entry_delete(fib_node_index_t fib_entry_index,
fib_source_t source);
+extern void fib_entry_contribute_urpf(fib_node_index_t path_index,
+ index_t urpf);
extern void fib_entry_contribute_forwarding(
fib_node_index_t fib_entry_index,
fib_forward_chain_type_t type,
fib_node_index_t fib_entry_index,
fib_source_t source);
+extern void fib_entry_encode(fib_node_index_t fib_entry_index,
+ fib_route_path_encode_t **api_rpaths);
extern void fib_entry_get_prefix(fib_node_index_t fib_entry_index,
fib_prefix_t *pfx);
extern u32 fib_entry_get_fib_index(fib_node_index_t fib_entry_index);