From: Paul Jakma Date: Thu, 23 Aug 2007 23:22:02 +0000 (+0000) Subject: [bgpd] Pass NOSUB to regexec X-Git-Tag: frr-2.0-rc1~2472 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=6d134fb4defecb16591adbf4acb020acd165a75a;p=mirror%2Ffrr.git [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. --- diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog index 26614ced4f..548fd4d63c 100644 --- a/bgpd/ChangeLog +++ b/bgpd/ChangeLog @@ -1,3 +1,11 @@ +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. + 2007-07-31 Paul Jakma * (general) Support for draft-ietf-idr-as-pathlimit-03. diff --git a/bgpd/bgp_regex.c b/bgpd/bgp_regex.c index be84d4071c..9b65f7cb15 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);