From: Lou Berger Date: Tue, 19 Sep 2017 14:07:31 +0000 (-0400) Subject: bgpd: rfapi - fix a couple of check that should have been against RD len vs RD type... X-Git-Tag: frr-4.0-dev~298^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d2d080f52e156b4d7290bcd634e59291465f877e;p=matthieu%2Ffrr.git bgpd: rfapi - fix a couple of check that should have been against RD len vs RD type flag (family) Signed-off-by: Lou Berger --- diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c index a39fe068bd..91a3744315 100644 --- a/bgpd/rfapi/bgp_rfapi_cfg.c +++ b/bgpd/rfapi/bgp_rfapi_cfg.c @@ -4093,7 +4093,7 @@ int bgp_rfapi_cfg_write(struct vty *vty, struct bgp *bgp) } } - if (hc->default_rd.family || hc->default_response_lifetime + if (hc->default_rd.prefixlen || hc->default_response_lifetime || hc->default_rt_import_list || hc->default_rt_export_list || hc->nve_groups_sequential->count) { diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c index e7314d2983..8d1b2b974e 100644 --- a/bgpd/rfapi/rfapi_vty.c +++ b/bgpd/rfapi/rfapi_vty.c @@ -4671,7 +4671,7 @@ static int vnc_add_vrf_prefix(struct vty *vty, const char *arg_vrf, arg_vrf); return CMD_WARNING_CONFIG_FAILED; } - if (!rfg->rd.family && !arg_rd) { + if (!rfg->rd.prefixlen && !arg_rd) { vty_out(vty, "VRF \"%s\" isn't configured with an RD, so RD must be provided.\n", arg_vrf);