From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Sep 29 01:40:06 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B273D1065698 for ; Tue, 29 Sep 2009 01:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3E5798FC1C for ; Tue, 29 Sep 2009 01:40:04 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8T1e4lR062340 for ; Tue, 29 Sep 2009 01:40:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8T1e4C7062339; Tue, 29 Sep 2009 01:40:04 GMT (envelope-from gnats) Resent-Date: Tue, 29 Sep 2009 01:40:04 GMT Resent-Message-Id: <200909290140.n8T1e4C7062339@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Renato Ornelas Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21DF5106566C for ; Tue, 29 Sep 2009 01:39:39 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 126D08FC1C for ; Tue, 29 Sep 2009 01:39:39 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n8T1dcdg077482 for ; Tue, 29 Sep 2009 01:39:38 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n8T1dcLN077451; Tue, 29 Sep 2009 01:39:38 GMT (envelope-from nobody) Message-Id: <200909290139.n8T1dcLN077451@www.freebsd.org> Date: Tue, 29 Sep 2009 01:39:38 GMT From: Renato Ornelas To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/139227: bgpctl doesn't reload after a config error X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2009 01:40:06 -0000 >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 --- 1,4 ---- ! /* $OpenBSD: bgpd.c,v 1.149 2009/07/20 15:00:13 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer *************** 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: