mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-08-02 08:33:36 +00:00
zebra: Share route type checking macros
Make the RIB_*_ROUTE() macro which is passed a route in rib.h just use the R*_ROUTE() macros that directly check the type in rt.h. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
parent
84340a15b4
commit
66cb184575
@ -148,10 +148,9 @@ struct route_entry {
|
||||
uint32_t dplane_sequence;
|
||||
};
|
||||
|
||||
#define RIB_SYSTEM_ROUTE(R) \
|
||||
((R)->type == ZEBRA_ROUTE_KERNEL || (R)->type == ZEBRA_ROUTE_CONNECT)
|
||||
#define RIB_SYSTEM_ROUTE(R) RSYSTEM_ROUTE((R)->type)
|
||||
|
||||
#define RIB_KERNEL_ROUTE(R) ((R)->type == ZEBRA_ROUTE_KERNEL)
|
||||
#define RIB_KERNEL_ROUTE(R) RKERNEL_ROUTE((R)->type)
|
||||
|
||||
/* meta-queue structure:
|
||||
* sub-queue 0: connected, kernel
|
||||
|
||||
@ -35,8 +35,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define RSYSTEM_ROUTE(type) \
|
||||
((type) == ZEBRA_ROUTE_KERNEL || (type) == ZEBRA_ROUTE_CONNECT)
|
||||
#define RKERNEL_ROUTE(type) ((type) == ZEBRA_ROUTE_KERNEL)
|
||||
|
||||
#define RSYSTEM_ROUTE(type) \
|
||||
((RKERNEL_ROUTE(type)) || (type) == ZEBRA_ROUTE_CONNECT)
|
||||
|
||||
/*
|
||||
* Update or delete a route, LSP, or pseudowire from the kernel,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user