diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2018-07-25 09:38:56 +0200 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-08-28 16:23:50 +0200 |
commit | cc6743c290d88107f316917dcda706332477c8ff (patch) | |
tree | 32fc95f33c36ce7bd4a0de18c974117ac7a69ebe /zebra | |
parent | doc: add information about dynamic update of default vrf name (diff) | |
download | frr-cc6743c290d88107f316917dcda706332477c8ff.tar.xz frr-cc6743c290d88107f316917dcda706332477c8ff.zip |
zebra: add an option to zebra command to change default vrf name
There is a possibility to change the default vrf name, using the '-o'
option.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/zebra/main.c b/zebra/main.c index 5e7c69382..8db1c48f2 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -99,6 +99,7 @@ struct option longopts[] = { {"ecmp", required_argument, NULL, 'e'}, {"label_socket", no_argument, NULL, 'l'}, {"retain", no_argument, NULL, 'r'}, + {"vrfdefaultname", required_argument, NULL, 'o'}, #ifdef HAVE_NETLINK {"vrfwnetns", no_argument, NULL, 'n'}, {"nl-bufsize", required_argument, NULL, 's'}, @@ -235,7 +236,7 @@ int main(int argc, char **argv) frr_preinit(&zebra_di, argc, argv); frr_opt_add( - "bakz:e:l:r" + "bakz:e:l:o:r" #ifdef HAVE_NETLINK "s:n" #endif @@ -254,6 +255,7 @@ int main(int argc, char **argv) " -l, --label_socket Socket to external label manager\n" " -k, --keep_kernel Don't delete old routes which were installed by zebra.\n" " -r, --retain When program terminates, retain added route by zebra.\n" + " -o, --vrfdefaultname Set default VRF name.\n" #ifdef HAVE_NETLINK " -n, --vrfwnetns Use NetNS as VRF backend\n" " -s, --nl-bufsize Set netlink receive buffer size\n" @@ -296,6 +298,9 @@ int main(int argc, char **argv) return 1; } break; + case 'o': + vrf_set_default_name(optarg); + break; case 'z': zserv_path = optarg; if (!frr_zclient_addr(&dummy, &dummylen, optarg)) { |