]> git.puffer.fish Git - mirror/frr.git/commitdiff
[bgpd] Pass NOSUB to regexec
authorPaul Jakma <paul.jakma@sun.com>
Thu, 23 Aug 2007 23:22:02 +0000 (23:22 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Thu, 23 Aug 2007 23:22:02 +0000 (23:22 +0000)
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.

bgpd/ChangeLog
bgpd/bgp_regex.c

index 26614ced4f56bd024797a2fb39d32e6f895a7d7a..548fd4d63ce48a9f98a145af406d5f81399c9931 100644 (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.
index be84d4071cff7e775af2c964e3cbee92b8af9727..9b65f7cb153a8f037627a8272cf9d42ffef85545 100644 (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);