diff options
Diffstat (limited to 'bgpd/bgp_clist.c')
| -rw-r--r-- | bgpd/bgp_clist.c | 80 | 
1 files changed, 0 insertions, 80 deletions
diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c index 6ac6cf56dd..e17cce3ff6 100644 --- a/bgpd/bgp_clist.c +++ b/bgpd/bgp_clist.c @@ -654,86 +654,6 @@ static bool ecommunity_regexp_match(struct ecommunity *ecom, regex_t *reg)  	return false;  } -#if 0 -/* Delete community attribute using regular expression match.  Return -   modified communites attribute.  */ -static struct community * -community_regexp_delete (struct community *com, regex_t * reg) -{ -	int i; -	uint32_t comval; -	/* Maximum is "65535:65535" + '\0'. */ -	char c[12]; -	const char *str; - -	if (!com) -		return NULL; - -	i = 0; -	while (i < com->size) -	{ -		memcpy (&comval, com_nthval (com, i), sizeof(uint32_t)); -		comval = ntohl (comval); - -		switch (comval) { -		case COMMUNITY_INTERNET: -			str = "internet"; -			break; -		case COMMUNITY_ACCEPT_OWN: -			str = "accept-own"; -			break; -		case COMMUNITY_ROUTE_FILTER_TRANSLATED_v4: -			str = "route-filter-translated-v4"; -			break; -		case COMMUNITY_ROUTE_FILTER_v4: -			str = "route-filter-v4"; -			break; -		case COMMUNITY_ROUTE_FILTER_TRANSLATED_v6: -			str = "route-filter-translated-v6"; -			break; -		case COMMUNITY_ROUTE_FILTER_v6: -			str = "route-filter-v6"; -			break; -		case COMMUNITY_LLGR_STALE: -			str = "llgr-stale"; -			break; -		case COMMUNITY_NO_LLGR: -			str = "no-llgr"; -			break; -		case COMMUNITY_ACCEPT_OWN_NEXTHOP: -			str = "accept-own-nexthop"; -			break; -		case COMMUNITY_BLACKHOLE: -			str = "blackhole"; -			break; -		case COMMUNITY_NO_EXPORT: -			str = "no-export"; -			break; -		case COMMUNITY_NO_ADVERTISE: -			str = "no-advertise"; -			break; -		case COMMUNITY_LOCAL_AS: -			str = "local-AS"; -			break; -		case COMMUNITY_NO_PEER: -			str = "no-peer"; -			break; -		default: -			sprintf (c, "%d:%d", (comval >> 16) & 0xFFFF, -			 comval & 0xFFFF); -			str = c; -			break; -		} - -		if (regexec (reg, str, 0, NULL, 0) == 0) -			community_del_val (com, com_nthval (com, i)); -		else -			i++; -	} -	return com; -} -#endif -  /* When given community attribute matches to the community-list return     1 else return 0.  */  bool community_list_match(struct community *com, struct community_list *list)  | 
