mirror of
				https://gitlab.labs.nic.cz/labs/bird.git
				synced 2024-05-11 16:54:54 +00:00 
			
		
		
		
	Implements protocol-specific router id and updates documentation.
This commit is contained in:
		@@ -140,6 +140,7 @@ proto_item:
 | 
			
		||||
 | IMPORT imexport { this_proto->in_filter = $2; }
 | 
			
		||||
 | EXPORT imexport { this_proto->out_filter = $2; }
 | 
			
		||||
 | TABLE rtable { this_proto->table = $2; }
 | 
			
		||||
 | ROUTER ID idval { this_proto->router_id = $3; }
 | 
			
		||||
 ;
 | 
			
		||||
 | 
			
		||||
imexport:
 | 
			
		||||
 
 | 
			
		||||
@@ -313,6 +313,7 @@ protos_commit(struct config *new, struct config *old, int force_reconfig, int ty
 | 
			
		||||
		  && nc->preference == oc->preference
 | 
			
		||||
		  && nc->disabled == oc->disabled
 | 
			
		||||
		  && nc->table->table == oc->table->table
 | 
			
		||||
		  && proto_get_router_id(nc) == proto_get_router_id(oc)
 | 
			
		||||
		  && ((type == RECONFIG_SOFT) || filter_same(nc->in_filter, oc->in_filter))
 | 
			
		||||
		  && ((type == RECONFIG_SOFT) || filter_same(nc->out_filter, oc->out_filter))
 | 
			
		||||
		  && p->proto_state != PS_DOWN)
 | 
			
		||||
 
 | 
			
		||||
@@ -12,6 +12,7 @@
 | 
			
		||||
#include "lib/lists.h"
 | 
			
		||||
#include "lib/resource.h"
 | 
			
		||||
#include "lib/timer.h"
 | 
			
		||||
#include "conf/conf.h"
 | 
			
		||||
 | 
			
		||||
struct iface;
 | 
			
		||||
struct ifa;
 | 
			
		||||
@@ -81,6 +82,7 @@ struct proto_config {
 | 
			
		||||
  struct proto *proto;			/* Instance we've created */
 | 
			
		||||
  char *name;
 | 
			
		||||
  unsigned debug, preference, disabled;	/* Generic parameters */
 | 
			
		||||
  u32 router_id;			/* Protocol specific router ID */
 | 
			
		||||
  struct rtable_config *table;		/* Table we're attached to */
 | 
			
		||||
  struct filter *in_filter, *out_filter; /* Attached filters */
 | 
			
		||||
 | 
			
		||||
@@ -192,6 +194,12 @@ struct proto *proto_get_named(struct symbol *, struct protocol *);
 | 
			
		||||
void proto_xxable(char *, int);
 | 
			
		||||
void proto_debug(char *, unsigned int);
 | 
			
		||||
 | 
			
		||||
static inline u32
 | 
			
		||||
proto_get_router_id(struct proto_config *pc)
 | 
			
		||||
{
 | 
			
		||||
  return pc->router_id ? pc->router_id : pc->global->router_id;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
extern list active_proto_list;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user