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:
		@@ -391,10 +391,10 @@ radv_net_match_trigger(struct radv_config *cf, net *n)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
radv_preexport(struct proto *P, rte **new, struct linpool *pool UNUSED)
 | 
			
		||||
radv_preexport(struct channel *C, rte **new, struct linpool *pool UNUSED)
 | 
			
		||||
{
 | 
			
		||||
  // struct radv_proto *p = (struct radv_proto *) P;
 | 
			
		||||
  struct radv_config *cf = (struct radv_config *) (P->cf);
 | 
			
		||||
  struct radv_config *cf = (struct radv_config *) (C->proto->cf);
 | 
			
		||||
 | 
			
		||||
  if (radv_net_match_trigger(cf, (*new)->net))
 | 
			
		||||
    return RIC_PROCESS;
 | 
			
		||||
@@ -555,7 +555,7 @@ radv_check_active(struct radv_proto *p)
 | 
			
		||||
    return 1;
 | 
			
		||||
 | 
			
		||||
  struct channel *c = p->p.main_channel;
 | 
			
		||||
  return rt_examine(c->table, &cf->trigger, &p->p, c->out_filter);
 | 
			
		||||
  return rt_examine(c->table, &cf->trigger, c, c->out_filter);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user