diff options
Diffstat (limited to 'lib/log.c')
| -rw-r--r-- | lib/log.c | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -14,10 +14,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. + * You should have received a copy of the GNU General Public License along + * with this program; see the file COPYING; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #define FRR_DEFINE_DESC_TABLE @@ -734,6 +733,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 @@ -1047,6 +1057,8 @@ proto_redistnum(int afi, const char *s) return ZEBRA_ROUTE_STATIC; else if (strmatch (s, "rip")) return ZEBRA_ROUTE_RIP; + else if (strmatch (s, "eigrp")) + return ZEBRA_ROUTE_EIGRP; else if (strmatch (s, "ospf")) return ZEBRA_ROUTE_OSPF; else if (strmatch (s, "isis")) |
