diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-07-20 15:00:14 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-07-20 15:00:14 +0000 |
commit | ac20646f75063a3e8ab7ab8b8a7365c4a3d6b4d8 (patch) | |
tree | 32e5322551209e883d1a27f11fe449affd07f415 | |
parent | ee862f72ddbaf46e7ee152665ad00cf82bd4235f (diff) |
On config reload errors free the list of ribs so that following reloads
don't fail because of redefinition conflicts. This problem was reported
by some people.
-rw-r--r-- | usr.sbin/bgpd/bgpd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c index 43e284b9336..048e0c3d5f0 100644 --- a/usr.sbin/bgpd/bgpd.c +++ b/usr.sbin/bgpd/bgpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.c,v 1.148 2009/06/07 00:30:23 claudio Exp $ */ +/* $OpenBSD: bgpd.c,v 1.149 2009/07/20 15:00:13 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -464,6 +464,10 @@ reconfigure(char *conffile, struct bgpd_config *conf, struct mrt_head *mrt_l, 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); } |