From: Sergey Y. Afonin Date: Thu, 27 Oct 2011 13:01:11 +0000 (+0400) Subject: bgpd: revised fix to --dryrun (BZ#622) X-Git-Tag: frr-2.0-rc1~1918^2~68 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f85bab1482b0db4cfdf90a2fd50f42d6dae96b42;p=mirror%2Ffrr.git bgpd: revised fix to --dryrun (BZ#622) --- diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index dafbbf7206..b9fdfd77c8 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -2044,6 +2044,10 @@ bgp_get (struct bgp **bgp_val, as_t *as, const char *name) } } + bgp = bgp_create (as, name); + bgp_router_id_set(bgp, &router_id_zebra); + *bgp_val = bgp; + /* Create BGP server socket, if first instance. */ if (list_isempty(bm->bgp)) { @@ -2051,10 +2055,7 @@ bgp_get (struct bgp **bgp_val, as_t *as, const char *name) return BGP_ERR_INVALID_VALUE; } - bgp = bgp_create (as, name); listnode_add (bm->bgp, bgp); - bgp_router_id_set(bgp, &router_id_zebra); - *bgp_val = bgp; return 0; }