1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Merge commit '1c30b689ddd032ef8000fb7836348a48ba3184ff' into haugesund

This commit is contained in:
Maria Matejka
2022-05-30 17:26:25 +02:00
20 changed files with 79 additions and 51 deletions

View File

@@ -87,7 +87,6 @@ typedef struct rta {
struct ea_list *eattrs; /* Extended Attribute chain */
struct hostentry *hostentry; /* Hostentry for recursive next-hops */
u16 cached:1; /* Are attributes cached? */
u16 source:7; /* Route source (RTS_...) */
u16 dest:4; /* Route destination type (RTD_...) */
struct nexthop nh; /* Next hop */
} rta;
@@ -133,12 +132,13 @@ static inline int rte_is_reachable(rte *r)
typedef struct eattr {
word id; /* EA_CODE(PROTOCOL_..., protocol-dependent ID) */
byte flags; /* Protocol-dependent flags */
byte type:5; /* Attribute type */
byte type; /* Attribute type */
byte rfu:5;
byte originated:1; /* The attribute has originated locally */
byte fresh:1; /* An uncached attribute (e.g. modified in export filter) */
byte undef:1; /* Explicitly undefined */
PADDING(unused, 0, 4);
PADDING(unused, 3, 3);
union bval u;
} eattr;
@@ -310,6 +310,12 @@ u32 rt_get_igp_metric(const rte *rt);
/* From: Advertising router */
extern struct ea_class ea_gen_from;
/* Source: An old method to devise the route source protocol and kind.
* To be superseded in a near future by something more informative. */
extern struct ea_class ea_gen_source;
static inline u32 rt_get_source_attr(const rte *rt)
{ return ea_get_int(rt->attrs->eattrs, &ea_gen_source, 0); }
/* Next hop structures */
#define NEXTHOP_MAX_SIZE (sizeof(struct nexthop) + sizeof(u32)*MPLS_MAX_LABEL_STACK)

View File

@@ -54,6 +54,7 @@ t_eattr(void)
e.id = ~0;
e.flags = ~0;
e.type = ~0;
e.rfu = ~0;
e.originated = ~0;
e.fresh = ~0;
e.undef = ~0;