]> git.puffer.fish Git - matthieu/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:45:17 +0000 (20:45 +0400)
bgpd/bgpd.c

index e8038553ababffbe894b32ad1bec00c21e804f58..b8215ee68713588b38a25df9bc2f4bc1db2c0519 100644 (file)
@@ -2048,6 +2048,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))
     {
@@ -2055,10 +2059,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;
 }