]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: revised fix to --dryrun (BZ#622)
authorSergey Y. Afonin <asy@altlinux.ru>
Thu, 27 Oct 2011 13:01:11 +0000 (17:01 +0400)
committerDenis Ovsienko <infrastation@yandex.ru>
Tue, 15 Nov 2011 16:34:01 +0000 (20:34 +0400)
bgpd/bgpd.c

index dafbbf7206732015e1ecf624e0ade5033a2f353e..b9fdfd77c89c4be1a3aa11bc7f0d37855c9b77ff 100644 (file)
@@ -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;
 }