mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-03 07:31:54 +00:00
Merge commit 'dc9351d3' into HEAD
This commit is contained in:
commit
1e01721525
@ -180,15 +180,12 @@ struct proto {
|
|||||||
* Routing entry hooks (called only for routes belonging to this protocol):
|
* Routing entry hooks (called only for routes belonging to this protocol):
|
||||||
*
|
*
|
||||||
* rte_recalculate Called at the beginning of the best route selection
|
* rte_recalculate Called at the beginning of the best route selection
|
||||||
* rte_better Compare two rte's and decide which one is better (1=first, 0=second).
|
|
||||||
* rte_same Compare two rte's and decide whether they are identical (1=yes, 0=no).
|
|
||||||
* rte_mergable Compare two rte's and decide whether they could be merged (1=yes, 0=no).
|
* rte_mergable Compare two rte's and decide whether they could be merged (1=yes, 0=no).
|
||||||
* rte_insert Called whenever a rte is inserted to a routing table.
|
* rte_insert Called whenever a rte is inserted to a routing table.
|
||||||
* rte_remove Called whenever a rte is removed from the routing table.
|
* rte_remove Called whenever a rte is removed from the routing table.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int (*rte_recalculate)(struct rtable_private *, struct network *, struct rte *, struct rte *, struct rte *);
|
int (*rte_recalculate)(struct rtable_private *, struct network *, struct rte *, struct rte *, struct rte *);
|
||||||
int (*rte_better)(struct rte *, struct rte *);
|
|
||||||
int (*rte_mergable)(struct rte *, struct rte *);
|
int (*rte_mergable)(struct rte *, struct rte *);
|
||||||
void (*rte_insert)(struct network *, struct rte *);
|
void (*rte_insert)(struct network *, struct rte *);
|
||||||
void (*rte_remove)(struct network *, struct rte *);
|
void (*rte_remove)(struct network *, struct rte *);
|
||||||
|
@ -1874,6 +1874,9 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nhad.ad.length)
|
||||||
|
ea_set_attr(&ra, EA_LITERAL_DIRECT_ADATA(&ea_gen_nexthop, 0, &nhad.ad));
|
||||||
|
|
||||||
if (i->rtm_scope != def_scope)
|
if (i->rtm_scope != def_scope)
|
||||||
ea_set_attr(&ra,
|
ea_set_attr(&ra,
|
||||||
EA_LITERAL_EMBEDDED(&ea_krt_scope, 0, i->rtm_scope));
|
EA_LITERAL_EMBEDDED(&ea_krt_scope, 0, i->rtm_scope));
|
||||||
|
@ -835,6 +835,10 @@ krt_postconfig(struct proto_config *CF)
|
|||||||
krt_sys_postconfig(cf);
|
krt_sys_postconfig(cf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct rte_owner_class krt_rte_owner_class = {
|
||||||
|
.rte_better = krt_rte_better,
|
||||||
|
};
|
||||||
|
|
||||||
static struct proto *
|
static struct proto *
|
||||||
krt_init(struct proto_config *CF)
|
krt_init(struct proto_config *CF)
|
||||||
{
|
{
|
||||||
@ -848,7 +852,8 @@ krt_init(struct proto_config *CF)
|
|||||||
p->p.if_notify = krt_if_notify;
|
p->p.if_notify = krt_if_notify;
|
||||||
p->p.reload_routes = krt_reload_routes;
|
p->p.reload_routes = krt_reload_routes;
|
||||||
p->p.feed_end = krt_feed_end;
|
p->p.feed_end = krt_feed_end;
|
||||||
p->p.rte_better = krt_rte_better;
|
|
||||||
|
p->p.sources.class = &krt_rte_owner_class;
|
||||||
|
|
||||||
krt_sys_init(p);
|
krt_sys_init(p);
|
||||||
return &p->p;
|
return &p->p;
|
||||||
|
Loading…
Reference in New Issue
Block a user