summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
authorSergey Y. Afonin <asy@altlinux.ru>2011-10-27 17:01:11 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2011-11-15 20:34:01 +0400
commitf85bab1482b0db4cfdf90a2fd50f42d6dae96b42 (patch)
tree695084c92e0dac05dfe7925467691fc2049b9a79 /bgpd
parent7ebd47095b178e91c3c3ef514e0ddd0afe1a97a9 (diff)
bgpd: revised fix to --dryrun (BZ#622)
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgpd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index dafbbf72..b9fdfd77 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;
}