From fad82c05a82b2460b5d3a8afe0e0e81fc33ebee5 Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 23 Aug 2007 23:22:02 +0000 Subject: [bgpd] Pass NOSUB to regexec 2007-08-23 Paul Jakma * 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. --- bgpd/bgp_regex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bgpd/bgp_regex.c') diff --git a/bgpd/bgp_regex.c b/bgpd/bgp_regex.c index be84d407..9b65f7cb 100644 --- a/bgpd/bgp_regex.c +++ b/bgpd/bgp_regex.c @@ -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); -- cgit v1.2.3