summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-12-01 16:49:22 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2016-12-05 16:02:46 +0100
commitb6a9e7b4878f76306ca2b25960cb52805794c8a5 (patch)
tree9268e8855cae8e110328bcbb8feb06431a3d8687 /zebra
parentbgpd: Remove nexthop for peer only for "real" peer (diff)
downloadfrr-b6a9e7b4878f76306ca2b25960cb52805794c8a5.tar.xz
frr-b6a9e7b4878f76306ca2b25960cb52805794c8a5.zip
lib, zebra: Minimize display of link-params sub data
When link-params is configured it auto starts displaying 6000-02# conf t dell-s6000-02(config)# int swp1 dell-s6000-02(config-if)# link-params dell-s6000-02(config-link-params)# admin-grp 0x12345678 dell-s6000-02(config-link-params)# end dell-s6000-02# show run interface swp1 link-params enable metric 0 <----Remove the bw lines max-bw 1.25e+06 max-rsv-bw 1.25e+06 unrsv-bw 0 1.25e+06 unrsv-bw 1 1.25e+06 unrsv-bw 2 1.25e+06 unrsv-bw 3 1.25e+06 unrsv-bw 4 1.25e+06 unrsv-bw 5 1.25e+06 unrsv-bw 6 1.25e+06 unrsv-bw 7 1.25e+06 admin-grp 305419896 exit-link-params ! I'd like to reduce this to: interface enp0s3 ip igmp ip pim sm link-params enable admin-grp 0x12345678 <----- Fix this to be what we entered exit-link-params ! Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra')
-rw-r--r--zebra/interface.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 68edd30de..3fec663f1 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1846,7 +1846,7 @@ DEFUN (link_params_metric,
VTY_GET_ULONG("metric", metric, argv[0]);
/* Update TE metric if needed */
- link_param_cmd_set_uint32 (ifp, &iflp->te_metric, LP_TE, metric);
+ link_param_cmd_set_uint32 (ifp, &iflp->te_metric, LP_TE | LP_TE_METRIC, metric);
return CMD_SUCCESS;
}
@@ -1860,7 +1860,7 @@ DEFUN (no_link_params_metric,
VTY_DECLVAR_CONTEXT (interface, ifp);
/* Unset TE Metric */
- link_param_cmd_unset(ifp, LP_TE);
+ link_param_cmd_unset(ifp, LP_TE | LP_TE_METRIC);
return CMD_SUCCESS;
}
@@ -2788,20 +2788,21 @@ link_params_config_write (struct vty *vty, struct interface *ifp)
vty_out (vty, " link-params%s", VTY_NEWLINE);
vty_out(vty, " enable%s", VTY_NEWLINE);
- if (IS_PARAM_SET(iflp, LP_TE))
+ if (IS_PARAM_SET(iflp, LP_TE) && IS_PARAM_SET(iflp, LP_TE_METRIC))
vty_out(vty, " metric %u%s",iflp->te_metric, VTY_NEWLINE);
- if (IS_PARAM_SET(iflp, LP_MAX_BW))
+ if (IS_PARAM_SET(iflp, LP_MAX_BW) && iflp->max_bw != iflp->default_bw)
vty_out(vty, " max-bw %g%s", iflp->max_bw, VTY_NEWLINE);
- if (IS_PARAM_SET(iflp, LP_MAX_RSV_BW))
+ if (IS_PARAM_SET(iflp, LP_MAX_RSV_BW) && iflp->max_rsv_bw != iflp->default_bw)
vty_out(vty, " max-rsv-bw %g%s", iflp->max_rsv_bw, VTY_NEWLINE);
if (IS_PARAM_SET(iflp, LP_UNRSV_BW))
{
for (i = 0; i < 8; i++)
- vty_out(vty, " unrsv-bw %d %g%s",
- i, iflp->unrsv_bw[i], VTY_NEWLINE);
+ if (iflp->unrsv_bw[i] != iflp->default_bw)
+ vty_out(vty, " unrsv-bw %d %g%s",
+ i, iflp->unrsv_bw[i], VTY_NEWLINE);
}
if (IS_PARAM_SET(iflp, LP_ADM_GRP))
- vty_out(vty, " admin-grp %u%s", iflp->admin_grp, VTY_NEWLINE);
+ vty_out(vty, " admin-grp 0x%x%s", iflp->admin_grp, VTY_NEWLINE);
if (IS_PARAM_SET(iflp, LP_DELAY))
{
vty_out(vty, " delay %u", iflp->av_delay);