[bgpd] Pass NOSUB to regexec

2007-08-23 Paul Jakma <paul.jakma@sun.com>

	* bgp_regex.c: (bgp_regcomp) Pass NOSUB flag to regcomp to
	  prevent parsing of substitutions, which can have profound
	  performance effects on bgpd and are of no use to the CLI
	  anyway. How much it helps depends on the regex
	  implementation.
This commit is contained in:
Paul Jakma 2007-08-23 23:22:02 +00:00
parent b7fe414112
commit 6d134fb4de
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2007-08-23 Paul Jakma <paul.jakma@sun.com>
* bgp_regex.c: (bgp_regcomp) Pass NOSUB flag to regcomp to
prevent parsing of substitutions, which can have profound
performance effects on bgpd and are of no use to the CLI
anyway. How much it helps depends on the regex
implementation.
2007-07-31 Paul Jakma <paul.jakma@sun.com>
* (general) Support for draft-ietf-idr-as-pathlimit-03.

View File

@ -66,7 +66,7 @@ bgp_regcomp (const char *regstr)
regex = XMALLOC (MTYPE_BGP_REGEXP, sizeof (regex_t));
ret = regcomp (regex, magic_str, REG_EXTENDED);
ret = regcomp (regex, magic_str, REG_EXTENDED|REG_NOSUB);
XFREE (MTYPE_TMP, magic_str);