diff options
| author | Lou Berger <lberger@labn.net> | 2017-04-02 13:55:58 -0400 |
|---|---|---|
| committer | Lou Berger <lberger@labn.net> | 2017-04-02 16:18:36 -0400 |
| commit | 508f9997f271c066b0ffc4fe0d5861ef20430317 (patch) | |
| tree | 598248cda89e6cf21e88da51437dcd4e2987f497 | |
| parent | 2b5c7fa46d98ea35f6febd5b3da32ca0a2445ca2 (diff) | |
bgp: fix a couple of instances of bm being used before init'ed
Signed-off-by: Lou Berger <lberger@labn.net>
| -rw-r--r-- | bgpd/bgp_main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 423c9453eb..55bf410628 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -363,6 +363,7 @@ main (int argc, char **argv) int bgp_port = BGP_PORT_DEFAULT; char *bgp_address = NULL; + int no_fib_flag = 0; frr_preinit(&bgpd_di, argc, argv); frr_opt_add("p:l:rne:", longopts, @@ -389,7 +390,7 @@ main (int argc, char **argv) if (tmp_port <= 0 || tmp_port > 0xffff) bgp_port = BGP_PORT_DEFAULT; else - bm->port = tmp_port; + bgp_port = tmp_port; break; case 'e': multipath_num = atoi (optarg); @@ -406,7 +407,7 @@ main (int argc, char **argv) bgp_address = optarg; /* listenon implies -n */ case 'n': - bgp_option_set (BGP_OPT_NO_FIB); + no_fib_flag = 1; break; default: frr_help_exit (1); @@ -418,6 +419,8 @@ main (int argc, char **argv) bgp_master_init (frr_init ()); bm->port = bgp_port; bm->address = bgp_address; + if (no_fib_flag) + bgp_option_set (BGP_OPT_NO_FIB); /* Initializations. */ bgp_vrf_init (); |
