diff options
Diffstat (limited to 'lib/log.c')
| -rw-r--r-- | lib/log.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -734,6 +734,17 @@ openzlog (const char *progname, const char *protoname, u_short instance, openlog (progname, syslog_flags, zl->facility); zlog_default = zl; + +#ifdef HAVE_GLIBC_BACKTRACE + /* work around backtrace() using lazily resolved dynamically linked + * symbols, which will otherwise cause funny breakage in the SEGV handler. + * (particularly, the dynamic linker can call malloc(), which uses locks + * in programs linked with -pthread, thus can deadlock.) */ + void *bt[4]; + backtrace (bt, array_size(bt)); + free (backtrace_symbols (bt, 0)); + backtrace_symbols_fd (bt, 0, 0); +#endif } void @@ -1059,7 +1070,7 @@ proto_redistnum(int afi, const char *s) return ZEBRA_ROUTE_VNC; else if (strmatch (s, "vnc-direct")) return ZEBRA_ROUTE_VNC_DIRECT; - else if (strncmp (s, "n", 1) == 0) + else if (strmatch (s, "nhrp")) return ZEBRA_ROUTE_NHRP; } if (afi == AFI_IP6) @@ -1084,7 +1095,7 @@ proto_redistnum(int afi, const char *s) return ZEBRA_ROUTE_VNC; else if (strmatch (s, "vnc-direct")) return ZEBRA_ROUTE_VNC_DIRECT; - else if (strncmp (s, "n", 1) == 0) + else if (strmatch (s, "nhrp")) return ZEBRA_ROUTE_NHRP; } return -1; |
