diff options
author | Paul Jakma <paul.jakma@sun.com> | 2007-08-23 23:22:02 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2007-08-23 23:22:02 +0000 |
commit | 6d134fb4defecb16591adbf4acb020acd165a75a (patch) | |
tree | e88549ea00e5a8b22ffacb36b7b1d2c9d941b664 /bgpd/bgp_regex.c | |
parent | b7fe4141123c6fc26fffec68d0db62ecf474c074 (diff) | |
download | quagga-6d134fb4defecb16591adbf4acb020acd165a75a.tar.bz2 quagga-6d134fb4defecb16591adbf4acb020acd165a75a.tar.xz |
[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.
Diffstat (limited to 'bgpd/bgp_regex.c')
-rw-r--r-- | bgpd/bgp_regex.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |