diff options
-rw-r--r-- | bgpd/bgp_main.c | 6 | ||||
-rw-r--r-- | bgpd/bgpd.c | 3 | ||||
-rw-r--r-- | bgpd/bgpd.h | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 620ca128..0219bcee 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -53,6 +53,7 @@ static const struct option longopts[] = { "version", no_argument, NULL, 'v'}, { "dryrun", no_argument, NULL, 'C'}, { "help", no_argument, NULL, 'h'}, + { "import-check", no_argument, NULL, 'I'}, { 0 } }; @@ -220,7 +221,7 @@ main (int argc, char **argv) /* Command line argument treatment. */ while (1) { - opt = getopt_long (argc, argv, "df:i:hp:l:A:P:rnu:g:vC", longopts, 0); + opt = getopt_long (argc, argv, "df:i:hp:l:A:P:rnu:g:vCI", longopts, 0); if (opt == EOF) break; @@ -282,6 +283,9 @@ main (int argc, char **argv) case 'C': dryrun = 1; break; + case 'I': + bgp_option_set (BGP_OPT_IMPORT_CHECK); + break; case 'h': usage (progname, 0); break; diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 58ceef1b..630f0c22 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -1861,6 +1861,9 @@ bgp_create (as_t *as, const char *name) if (name) bgp->name = strdup (name); + if (bgp_option_check (BGP_OPT_IMPORT_CHECK)) + bgp_flag_set (bgp, BGP_FLAG_IMPORT_CHECK); + return bgp; } diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 1e72b1c9..20b8424f 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -59,6 +59,7 @@ struct bgp_master #define BGP_OPT_NO_FIB (1 << 0) #define BGP_OPT_MULTIPLE_INSTANCE (1 << 1) #define BGP_OPT_CONFIG_CISCO (1 << 2) +#define BGP_OPT_IMPORT_CHECK (1 << 3) }; /* BGP instance structure. */ |