+// SPDX-License-Identifier: GPL-2.0-or-later
/*
*
* Copyright 2009-2016, LabN Consulting, L.L.C.
*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "lib/zebra.h"
*/
time_t rfapi_time(time_t *t)
{
- time_t clock = bgp_clock();
+ time_t clock = monotime(NULL);
if (t)
*t = clock;
return clock;
} else {
+ /* TODO: save RD format */
ret = str2prefix_rd(argv[1]->arg, &prd);
if (!ret) {
vty_out(vty, "%% Malformed rd\n");
} else {
+ /* TODO: save RD format */
ret = str2prefix_rd(argv[1]->arg, &prd);
if (!ret) {
vty_out(vty, "%% Malformed rd\n");
} else {
+ /* TODO: save RD format */
ret = str2prefix_rd(argv[1]->arg, &prd);
if (!ret) {
vty_out(vty, "%% Malformed rd\n");
return h;
}
+static void bgp_rfapi_rfgn_list_delete(void *data)
+{
+ struct rfapi_rfg_name *rfgn = data;
+ free(rfgn->name);
+ rfgn_free(rfgn);
+}
+
void bgp_rfapi_cfg_destroy(struct bgp *bgp, struct rfapi_cfg *h)
{
afi_t afi;
if (h->l2_groups != NULL)
list_delete(&h->l2_groups);
list_delete(&h->nve_groups_sequential);
+
+ h->rfg_export_direct_bgp_l->del = bgp_rfapi_rfgn_list_delete;
list_delete(&h->rfg_export_direct_bgp_l);
+
+ h->rfg_export_zebra_l->del = bgp_rfapi_rfgn_list_delete;
list_delete(&h->rfg_export_zebra_l);
+
if (h->default_rt_export_list)
ecommunity_free(&h->default_rt_export_list);
if (h->default_rt_import_list)
}
if (rfg->rd.prefixlen) {
- char buf[RD_ADDRSTRLEN];
-
if (AF_UNIX == rfg->rd.family) {
uint16_t value = 0;
value);
} else
- vty_out(vty, " rd %s\n",
- prefix_rd2str(&rfg->rd, buf,
- sizeof(buf)));
+ vty_out(vty, " rd %pRDP\n", &rfg->rd);
}
if (rfg->rt_import_list && rfg->rt_export_list
rfg->routemap_redist_name
[ZEBRA_ROUTE_BGP_DIRECT_EXT]);
}
- vty_out(vty, " exit-vrf-policy\n");
+ vty_out(vty, " exit-vrf-policy\n");
vty_out(vty, "!\n");
}
if (hc->flags & BGP_VNC_CONFIG_ADV_UN_METHOD_ENCAP) {
vty, bgp->rfapi->rfp,
RFAPI_RFP_CFG_GROUP_L2,
rfgc->name, rfgc->rfp_cfg);
- vty_out(vty, " exit-vnc\n");
+ vty_out(vty, " exit-vnc\n");
vty_out(vty, "!\n");
}
}
vty_out(vty, " vnc defaults\n");
if (hc->default_rd.prefixlen) {
- char buf[RD_ADDRSTRLEN];
-
if (AF_UNIX == hc->default_rd.family) {
uint16_t value = 0;
value);
} else
- vty_out(vty, " rd %s\n",
- prefix_rd2str(&hc->default_rd,
- buf,
- sizeof(buf)));
+ vty_out(vty, " rd %pRDP\n",
+ &hc->default_rd);
}
if (hc->default_response_lifetime
!= BGP_VNC_DEFAULT_RESPONSE_LIFETIME_DEFAULT) {
vty, bgp->rfapi->rfp,
RFAPI_RFP_CFG_GROUP_DEFAULT, NULL,
bgp->rfapi_cfg->default_rfp_cfg);
- vty_out(vty, " exit-vnc\n");
+ vty_out(vty, " exit-vnc\n");
vty_out(vty, "!\n");
}
if (rfg->rd.prefixlen) {
- char buf[RD_ADDRSTRLEN];
-
if (AF_UNIX == rfg->rd.family) {
uint16_t value = 0;
value);
} else
- vty_out(vty, " rd %s\n",
- prefix_rd2str(
- &rfg->rd, buf,
- sizeof(buf)));
+ vty_out(vty, " rd %pRDP\n",
+ &rfg->rd);
}
if (rfg->flags & RFAPI_RFG_RESPONSE_LIFETIME) {
vty_out(vty, " response-lifetime ");
vty, bgp->rfapi->rfp,
RFAPI_RFP_CFG_GROUP_NVE,
rfg->name, rfg->rfp_cfg);
- vty_out(vty, " exit-vnc\n");
+ vty_out(vty, " exit-vnc\n");
vty_out(vty, "!\n");
}
} /* have listen ports */