ports/139227: bgpctl doesn't reload after a config error

Renato Ornelas renato at openx.com.br
Tue Sep 29 01:40:06 UTC 2009


>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 at 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 at 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 at 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:



More information about the freebsd-ports-bugs mailing list