Date: Tue, 29 Sep 2009 01:39:38 GMT From: Renato Ornelas <renato@openx.com.br> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/139227: bgpctl doesn't reload after a config error Message-ID: <200909290139.n8T1dcLN077451@www.freebsd.org> Resent-Message-ID: <200909290140.n8T1e4C7062339@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 139227 >Category: ports >Synopsis: bgpctl doesn't reload after a config error >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 29 01:40:03 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Renato Ornelas >Release: 7.2 >Organization: Open X >Environment: FreeBSD bgp1.openx.com.br 7.2-RELEASE-p3 FreeBSD 7.2-RELEASE-p3 #2: Wed Sep 9 23:03:45 BRT 2009 renato@freebsd.openx.com.br:/usr/obj/usr/src/sys/OPENX i386 >Description: With both openbgpd-4.4.1_2 and openbgpd-4.5.20090709 when you issue a bgpctl reload comand and the config file has any errors on, you can no longer issue a bgpctl reload. Every time after the 1st error, it gives: reload request sent. config file has errors, reload failed On the syslog you get (my config file has 746 lines): Sep 28 22:29:57 bgp1 bgpd[2585]: /usr/local/etc/bgpd.conf:747: rib "Adj-RIB-In" allready exists. Sep 28 22:29:57 bgp1 bgpd[2585]: /usr/local/etc/bgpd.conf:747: rib "Loc-RIB" allready exists. Sep 28 22:29:57 bgp1 bgpd[2585]: config file /usr/local/etc/bgpd.conf has errors, not reloading >How-To-Repeat: Put any invalid option on the config file, issue a bgpctl reload, correct the file and give another reload to bgpctl >Fix: Applying the following patch on bgpd/bgpd.c: *** bgpd/bgpd.c 2009/06/07 01:30:23 1.148 --- bgpd/bgpd.c 2009/07/20 16:00:13 1.149 *************** *** 1,4 **** ! /* $OpenBSD: bgpd.c,v 1.148 2009/06/07 00:30:23 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> --- 1,4 ---- ! /* $OpenBSD: bgpd.c,v 1.149 2009/07/20 15:00:13 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> *************** reconfigure(char *conffile, struct bgpd_config *conf, *** 464,469 **** --- 464,473 ---- if (parse_config(conffile, conf, mrt_l, peer_l, &net_l, rules_l)) { log_warnx("config file %s has errors, not reloading", conffile); + while ((rr = SIMPLEQ_FIRST(&ribnames))) { + SIMPLEQ_REMOVE_HEAD(&ribnames, entry); + free(rr); + } return (1); } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909290139.n8T1dcLN077451>