mirror of
				https://gitlab.labs.nic.cz/labs/bird.git
				synced 2024-05-11 16:54:54 +00:00 
			
		
		
		
	f_new_dynamic_attr gets third argument, type as filters know it.
This commit is contained in:
		@@ -21,10 +21,10 @@ f_new_inst(void)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct f_inst *
 | 
					struct f_inst *
 | 
				
			||||||
f_new_dynamic_attr(int type, int code)
 | 
					f_new_dynamic_attr(int type, int f_type, int code)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  struct f_inst *f = f_new_inst();
 | 
					  struct f_inst *f = f_new_inst();
 | 
				
			||||||
  f->aux = T_PATH; /* type; HACK!!! */
 | 
					  f->aux = f_type;
 | 
				
			||||||
  f->a2.i = code;
 | 
					  f->a2.i = code;
 | 
				
			||||||
  return f;
 | 
					  return f;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -64,7 +64,7 @@ struct filter {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void filters_postconfig(void);
 | 
					void filters_postconfig(void);
 | 
				
			||||||
struct f_inst *f_new_inst(void);
 | 
					struct f_inst *f_new_inst(void);
 | 
				
			||||||
struct f_inst *f_new_dynamic_attr(int type, int code);
 | 
					struct f_inst *f_new_dynamic_attr(int type, int f_type, int code);	/* Type as core knows it, type as filters know it, and code */
 | 
				
			||||||
struct f_tree *f_new_tree(void);
 | 
					struct f_tree *f_new_tree(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct f_tree *build_tree(struct f_tree *);
 | 
					struct f_tree *build_tree(struct f_tree *);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -50,7 +50,7 @@ bgp_proto:
 | 
				
			|||||||
 | bgp_proto NEXT HOP SELF ';' { BGP_CFG->next_hop_self = 1; }
 | 
					 | bgp_proto NEXT HOP SELF ';' { BGP_CFG->next_hop_self = 1; }
 | 
				
			||||||
 ;
 | 
					 ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CF_ADDTO(dynamic_attr, BGP_PATH { $$ = f_new_dynamic_attr(EAF_TYPE_AS_PATH, EA_CODE(EAP_BGP, BA_AS_PATH)); })
 | 
					CF_ADDTO(dynamic_attr, BGP_PATH { $$ = f_new_dynamic_attr(EAF_TYPE_AS_PATH, T_PATH, EA_CODE(EAP_BGP, BA_AS_PATH)); })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CF_CODE
 | 
					CF_CODE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -98,8 +98,8 @@ rip_iface_list:
 | 
				
			|||||||
 | rip_iface_list ',' rip_iface
 | 
					 | rip_iface_list ',' rip_iface
 | 
				
			||||||
 ;
 | 
					 ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CF_ADDTO(dynamic_attr, RIP_METRIC { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, EA_RIP_METRIC); })
 | 
					CF_ADDTO(dynamic_attr, RIP_METRIC { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, T_INT, EA_RIP_METRIC); })
 | 
				
			||||||
CF_ADDTO(dynamic_attr, RIP_TAG { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, EA_RIP_TAG); })
 | 
					CF_ADDTO(dynamic_attr, RIP_TAG { $$ = f_new_dynamic_attr(EAF_TYPE_INT | EAF_TEMP, T_INT, EA_RIP_TAG); })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CF_CODE
 | 
					CF_CODE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user