mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Preexport callback now takes the channel instead of protocol as argument
Passing protocol to preexport was in fact a historical relic from the old times when channels weren't a thing. Refactoring that to match current extensibility needs.
This commit is contained in:
@@ -101,11 +101,11 @@ pipe_rt_notify(struct proto *P, struct channel *src_ch, net *n, rte *new, rte *o
|
||||
}
|
||||
|
||||
static int
|
||||
pipe_preexport(struct proto *P, rte **ee, struct linpool *p UNUSED)
|
||||
pipe_preexport(struct channel *C, rte **ee, struct linpool *p UNUSED)
|
||||
{
|
||||
struct proto *pp = (*ee)->sender->proto;
|
||||
|
||||
if (pp == P)
|
||||
if (pp == C->proto)
|
||||
return -1; /* Avoid local loops automatically */
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user