summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_vty.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2019-08-28 16:01:38 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2019-08-28 16:19:34 +0200
commit5a0bdc782c209e4cc57c549f313bfd6d1ca316eb (patch)
treee2e865a3ef61a582275f5edc90348de2fd17b134 /zebra/zebra_vty.c
parentMerge pull request #4880 from ddutt/master (diff)
downloadfrr-5a0bdc782c209e4cc57c549f313bfd6d1ca316eb.tar.xz
frr-5a0bdc782c209e4cc57c549f313bfd6d1ca316eb.zip
zebra: nht resolution default configurable per vrf
even if vty commands were available, the default resolution command was working only for the first vrf configured. others were ignored. Also, for nexthop, resolution was working for all vrfs, and not the specific one. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to '')
-rw-r--r--zebra/zebra_vty.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 5c0dc2738..ac28f3812 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -1086,10 +1086,10 @@ DEFUN (ip_nht_default_route,
if (!zvrf)
return CMD_WARNING;
- if (zebra_rnh_ip_default_route)
+ if (zvrf->zebra_rnh_ip_default_route)
return CMD_SUCCESS;
- zebra_rnh_ip_default_route = 1;
+ zvrf->zebra_rnh_ip_default_route = 1;
zebra_evaluate_rnh(zvrf, AFI_IP, 1, RNH_NEXTHOP_TYPE, NULL);
return CMD_SUCCESS;
@@ -1108,10 +1108,10 @@ DEFUN (no_ip_nht_default_route,
if (!zvrf)
return CMD_WARNING;
- if (!zebra_rnh_ip_default_route)
+ if (!zvrf->zebra_rnh_ip_default_route)
return CMD_SUCCESS;
- zebra_rnh_ip_default_route = 0;
+ zvrf->zebra_rnh_ip_default_route = 0;
zebra_evaluate_rnh(zvrf, AFI_IP, 1, RNH_NEXTHOP_TYPE, NULL);
return CMD_SUCCESS;
}
@@ -1128,10 +1128,10 @@ DEFUN (ipv6_nht_default_route,
if (!zvrf)
return CMD_WARNING;
- if (zebra_rnh_ipv6_default_route)
+ if (zvrf->zebra_rnh_ipv6_default_route)
return CMD_SUCCESS;
- zebra_rnh_ipv6_default_route = 1;
+ zvrf->zebra_rnh_ipv6_default_route = 1;
zebra_evaluate_rnh(zvrf, AFI_IP6, 1, RNH_NEXTHOP_TYPE, NULL);
return CMD_SUCCESS;
}
@@ -1150,10 +1150,10 @@ DEFUN (no_ipv6_nht_default_route,
if (!zvrf)
return CMD_WARNING;
- if (!zebra_rnh_ipv6_default_route)
+ if (!zvrf->zebra_rnh_ipv6_default_route)
return CMD_SUCCESS;
- zebra_rnh_ipv6_default_route = 0;
+ zvrf->zebra_rnh_ipv6_default_route = 0;
zebra_evaluate_rnh(zvrf, AFI_IP6, 1, RNH_NEXTHOP_TYPE, NULL);
return CMD_SUCCESS;
}
@@ -2625,12 +2625,6 @@ static int config_write_protocol(struct vty *vty)
if (allow_delete)
vty_out(vty, "allow-external-route-update\n");
- if (zebra_rnh_ip_default_route)
- vty_out(vty, "ip nht resolve-via-default\n");
-
- if (zebra_rnh_ipv6_default_route)
- vty_out(vty, "ipv6 nht resolve-via-default\n");
-
if (zrouter.ribq->spec.hold != ZEBRA_RIB_PROCESS_HOLD_TIME)
vty_out(vty, "zebra work-queue %u\n", zrouter.ribq->spec.hold);