pimd: v6 intentionally turned off route-maps. Turn it on.
}
}
+PRINTFRR(6, 7)
static void cp_debug(bool mhop, struct sockaddr_any *peer,
struct sockaddr_any *local, ifindex_t ifindex,
vrf_id_t vrfid, const char *fmt, ...)
/* Implement RFC 5880 6.8.6 */
if (mlen < BFD_PKT_LEN) {
cp_debug(is_mhop, &peer, &local, ifindex, vrfid,
- "too small (%ld bytes)", mlen);
+ "too small (%zd bytes)", mlen);
return;
}
/*
* Functions
*/
+PRINTFRR(2, 3)
static void debug_printbpc(const struct bfd_peer_cfg *bpc, const char *fmt, ...)
{
char timers[3][128] = {};
}
/* Printing functions */
-/* Feed the AS_PATH to the vty; the suffix string follows it only in case
+/* Feed the AS_PATH to the vty; the space suffix follows it only in case
* AS_PATH wasn't empty.
*/
-void aspath_print_vty(struct vty *vty, const char *format, struct aspath *as,
- const char *suffix)
+void aspath_print_vty(struct vty *vty, struct aspath *as)
{
- assert(format);
- vty_out(vty, format, as->str);
- if (as->str_len && strlen(suffix))
- vty_out(vty, "%s", suffix);
+ vty_out(vty, "%s%s", as->str, as->str_len ? " " : "");
}
static void aspath_show_all_iterator(struct hash_bucket *bucket,
extern struct aspath *aspath_intern(struct aspath *aspath);
extern void aspath_unintern(struct aspath **aspath);
extern const char *aspath_print(struct aspath *aspath);
-extern void aspath_print_vty(struct vty *vty, const char *format,
- struct aspath *aspath, const char *suffix);
+extern void aspath_print_vty(struct vty *vty, struct aspath *aspath);
extern void aspath_print_all_vty(struct vty *vty);
extern unsigned int aspath_key_make(const void *p);
extern unsigned int aspath_get_first_as(struct aspath *aspath);
if (bgp_dump->filename[0] != DIRECTORY_SEP) {
snprintf(fullpath, sizeof(fullpath), "%s/%s", vty_get_cwd(),
bgp_dump->filename);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ /* user supplied date/time format string */
ret = strftime(realpath, MAXPATHLEN, fullpath, &tm);
} else
ret = strftime(realpath, MAXPATHLEN, bgp_dump->filename, &tm);
+#pragma GCC diagnostic pop
if (ret == 0) {
flog_warn(EC_BGP_DUMP, "%s: strftime error", __func__);
mpls_label_t label[BGP_MAX_LABELS] = {};
uint32_t num_labels = 0;
uint32_t eth_tag;
- int ret;
+ int ret = 0;
/* Type-2 route should be either 33, 37 or 49 bytes or an
* additional 3 bytes if there is a second label (VNI):
/* Process the route. */
if (attr)
- ret = bgp_update(peer, (struct prefix *)&p, addpath_id, attr,
- afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL,
- &prd, &label[0], num_labels, 0, &evpn);
+ bgp_update(peer, (struct prefix *)&p, addpath_id, attr, afi,
+ safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd,
+ &label[0], num_labels, 0, &evpn);
else
- ret = bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr,
- afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL,
- &prd, &label[0], num_labels, &evpn);
+ bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr, afi,
+ safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd,
+ &label[0], num_labels, &evpn);
goto done;
fail:
struct prefix_evpn p;
uint8_t ipaddr_len;
uint32_t eth_tag;
- int ret;
/* Type-3 route should be either 17 or 29 bytes: RD (8), Eth Tag (4),
* IP len (1) and IP (4 or 16).
/* Process the route. */
if (attr)
- ret = bgp_update(peer, (struct prefix *)&p, addpath_id, attr,
- afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL,
- &prd, NULL, 0, 0, NULL);
+ bgp_update(peer, (struct prefix *)&p, addpath_id, attr, afi,
+ safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL,
+ 0, 0, NULL);
else
- ret = bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr,
- afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL,
- &prd, NULL, 0, NULL);
- return ret;
+ bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr, afi,
+ safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd,
+ NULL, 0, NULL);
+ return 0;
}
/*
uint8_t ippfx_len;
uint32_t eth_tag;
mpls_label_t label; /* holds the VNI as in the packet */
- int ret;
bool is_valid_update = true;
/* Type-5 route should be 34 or 58 bytes:
/* Process the route. */
if (attr && is_valid_update)
- ret = bgp_update(peer, (struct prefix *)&p, addpath_id, attr,
- afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL,
- &prd, &label, 1, 0, &evpn);
+ bgp_update(peer, (struct prefix *)&p, addpath_id, attr, afi,
+ safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd,
+ &label, 1, 0, &evpn);
else {
if (!is_valid_update) {
char attr_str[BUFSIZ] = {0};
peer->hostname, peer->bgp->vrf_id, &p,
attr_str);
}
- ret = bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr,
- afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL,
- &prd, &label, 1, &evpn);
+ bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr, afi,
+ safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd,
+ &label, 1, &evpn);
}
- return ret;
+ return 0;
}
static void evpn_mpattr_encode_type5(struct stream *s, const struct prefix *p,
struct attr *attr, uint8_t *pfx, int psize,
uint32_t addpath_id)
{
- int ret;
esi_t esi;
uint8_t ipaddr_len;
struct in_addr vtep_ip;
build_evpn_type4_prefix(&p, &esi, vtep_ip);
/* Process the route. */
if (attr) {
- ret = bgp_update(peer, (struct prefix *)&p, addpath_id, attr,
- afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL,
- &prd, NULL, 0, 0, NULL);
+ bgp_update(peer, (struct prefix *)&p, addpath_id, attr, afi,
+ safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL,
+ 0, 0, NULL);
} else {
- ret = bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr,
- afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL,
- &prd, NULL, 0, NULL);
+ bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr, afi,
+ safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd,
+ NULL, 0, NULL);
}
- return ret;
+ return 0;
}
/* Check if a prefix belongs to the local ES */
struct attr *attr, uint8_t *pfx, int psize,
uint32_t addpath_id)
{
- int ret;
struct prefix_rd prd;
esi_t esi;
uint32_t eth_tag;
build_evpn_type1_prefix(&p, eth_tag, &esi, vtep_ip);
/* Process the route. */
if (attr) {
- ret = bgp_update(peer, (struct prefix *)&p, addpath_id, attr,
- afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL,
- &prd, NULL, 0, 0, NULL);
+ bgp_update(peer, (struct prefix *)&p, addpath_id, attr, afi,
+ safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL,
+ 0, 0, NULL);
} else {
- ret = bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr,
- afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL,
- &prd, NULL, 0, NULL);
+ bgp_withdraw(peer, (struct prefix *)&p, addpath_id, attr, afi,
+ safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd,
+ NULL, 0, NULL);
}
- return ret;
+ return 0;
}
void bgp_evpn_mh_config_ead_export_rt(struct bgp *bgp,
safi_t safi;
int psize = 0;
struct prefix p;
- int ret;
void *temp;
/* Start processing the NLRI - there may be multiple in the MP_REACH */
}
/* Process the route. */
if (!withdraw)
- ret = bgp_update(peer, &p, 0, attr,
- afi, safi,
- ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL,
- NULL, NULL, 0, 0, NULL);
+ bgp_update(peer, &p, 0, attr, afi, safi,
+ ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, NULL,
+ NULL, 0, 0, NULL);
else
- ret = bgp_withdraw(peer, &p, 0, attr,
- afi, safi,
- ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL,
- NULL, NULL, 0, NULL);
- if (ret) {
- flog_err(EC_BGP_FLOWSPEC_INSTALLATION,
- "Flowspec NLRI failed to be %s.",
- attr ? "added" : "withdrawn");
- return BGP_NLRI_PARSE_ERROR;
- }
+ bgp_withdraw(peer, &p, 0, attr, afi, safi,
+ ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, NULL,
+ NULL, 0, NULL);
}
return BGP_NLRI_PARSE_OK;
}
}
}
+ if (peer->hostname) {
+ XFREE(MTYPE_BGP_PEER_HOST, peer->hostname);
+ peer->hostname = NULL;
+ }
if (from_peer->hostname != NULL) {
- if (peer->hostname) {
- XFREE(MTYPE_BGP_PEER_HOST, peer->hostname);
- peer->hostname = NULL;
- }
-
peer->hostname = from_peer->hostname;
from_peer->hostname = NULL;
}
+ if (peer->domainname) {
+ XFREE(MTYPE_BGP_PEER_HOST, peer->domainname);
+ peer->domainname = NULL;
+ }
if (from_peer->domainname != NULL) {
- if (peer->domainname) {
- XFREE(MTYPE_BGP_PEER_HOST, peer->domainname);
- peer->domainname = NULL;
- }
-
peer->domainname = from_peer->domainname;
from_peer->domainname = NULL;
}
memcpy(&evpn, bgp_attr_get_evpn_overlay(pi->attr),
sizeof(evpn));
- int32_t ret = bgp_update(peer, p,
- pi->addpath_rx_id,
- pi->attr, AFI_L2VPN, SAFI_EVPN,
- ZEBRA_ROUTE_BGP,
- BGP_ROUTE_NORMAL, &prd,
- label_pnt, num_labels,
- 1, evpn);
-
- if (ret < 0)
- bgp_dest_unlock_node(dest);
+ bgp_update(peer, p, pi->addpath_rx_id, pi->attr,
+ AFI_L2VPN, SAFI_EVPN, ZEBRA_ROUTE_BGP,
+ BGP_ROUTE_NORMAL, &prd, label_pnt,
+ num_labels, 1, evpn);
}
}
}
return false;
}
-int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
- struct attr *attr, afi_t afi, safi_t safi, int type,
- int sub_type, struct prefix_rd *prd, mpls_label_t *label,
- uint32_t num_labels, int soft_reconfig,
- struct bgp_route_evpn *evpn)
+void bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
+ struct attr *attr, afi_t afi, safi_t safi, int type,
+ int sub_type, struct prefix_rd *prd, mpls_label_t *label,
+ uint32_t num_labels, int soft_reconfig,
+ struct bgp_route_evpn *evpn)
{
int ret;
int aspath_loop_count = 0;
bgp_dest_unlock_node(dest);
bgp_attr_unintern(&attr_new);
- return 0;
+ return;
}
/* Withdraw/Announce before we fully processed the withdraw */
ret = bgp_damp_update(pi, dest, afi, safi);
if (ret == BGP_DAMP_SUPPRESSED) {
bgp_dest_unlock_node(dest);
- return 0;
+ return;
}
}
bgp_unlink_nexthop(pi);
bgp_path_info_delete(dest, pi);
}
- return 0;
+ return;
} // End of implicit withdraw
/* Received Logging. */
bgp_path_info_delete(dest, new);
}
- return 0;
+ return;
/* This BGP update is filtered. Log the reason then update BGP
entry. */
}
#endif
- return 0;
+ return;
}
-int bgp_withdraw(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
- struct attr *attr, afi_t afi, safi_t safi, int type,
- int sub_type, struct prefix_rd *prd, mpls_label_t *label,
- uint32_t num_labels, struct bgp_route_evpn *evpn)
+void bgp_withdraw(struct peer *peer, const struct prefix *p,
+ uint32_t addpath_id, struct attr *attr, afi_t afi,
+ safi_t safi, int type, int sub_type, struct prefix_rd *prd,
+ mpls_label_t *label, uint32_t num_labels,
+ struct bgp_route_evpn *evpn)
{
struct bgp *bgp;
char pfx_buf[BGP_PRD_PATH_STRLEN];
peer->host, pfx_buf);
}
bgp_dest_unlock_node(dest);
- return 0;
+ return;
}
/* Lookup withdrawn route. */
/* Unlock bgp_node_get() lock. */
bgp_dest_unlock_node(dest);
- return 0;
+ return;
}
void bgp_default_originate(struct peer *peer, afi_t afi, safi_t safi,
}
}
-static int bgp_soft_reconfig_table_update(struct peer *peer,
- struct bgp_dest *dest,
- struct bgp_adj_in *ain, afi_t afi,
- safi_t safi, struct prefix_rd *prd)
+static void bgp_soft_reconfig_table_update(struct peer *peer,
+ struct bgp_dest *dest,
+ struct bgp_adj_in *ain, afi_t afi,
+ safi_t safi, struct prefix_rd *prd)
{
struct bgp_path_info *pi;
uint32_t num_labels = 0;
else
memset(&evpn, 0, sizeof(evpn));
- return bgp_update(peer, bgp_dest_get_prefix(dest), ain->addpath_rx_id,
- ain->attr, afi, safi, ZEBRA_ROUTE_BGP,
- BGP_ROUTE_NORMAL, prd, label_pnt, num_labels, 1,
- &evpn);
+ bgp_update(peer, bgp_dest_get_prefix(dest), ain->addpath_rx_id,
+ ain->attr, afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, prd,
+ label_pnt, num_labels, 1, &evpn);
}
static void bgp_soft_reconfig_table(struct peer *peer, afi_t afi, safi_t safi,
struct bgp_table *table,
struct prefix_rd *prd)
{
- int ret;
struct bgp_dest *dest;
struct bgp_adj_in *ain;
if (ain->peer != peer)
continue;
- ret = bgp_soft_reconfig_table_update(peer, dest, ain,
- afi, safi, prd);
-
- if (ret < 0) {
- bgp_dest_unlock_node(dest);
- return;
- }
+ bgp_soft_reconfig_table_update(peer, dest, ain, afi,
+ safi, prd);
}
}
static void bgp_soft_reconfig_table_task(struct thread *thread)
{
uint32_t iter, max_iter;
- int ret;
struct bgp_dest *dest;
struct bgp_adj_in *ain;
struct peer *peer;
if (ain->peer != peer)
continue;
- ret = bgp_soft_reconfig_table_update(
+ bgp_soft_reconfig_table_update(
peer, dest, ain, table->afi,
table->safi, prd);
iter++;
-
- if (ret < 0) {
- bgp_dest_unlock_node(dest);
- listnode_delete(
- table->soft_reconfig_peers,
- peer);
- bgp_announce_route(peer, table->afi,
- table->safi, false);
- if (list_isempty(
- table->soft_reconfig_peers)) {
- list_delete(
- &table->soft_reconfig_peers);
- bgp_soft_reconfig_table_flag(
- table, false);
- return;
- }
- }
}
}
}
uint8_t *lim;
struct prefix p;
int psize;
- int ret;
afi_t afi;
safi_t safi;
bool addpath_capable;
/* Normal process. */
if (attr)
- ret = bgp_update(peer, &p, addpath_id, attr, afi, safi,
- ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL,
- NULL, NULL, 0, 0, NULL);
+ bgp_update(peer, &p, addpath_id, attr, afi, safi,
+ ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, NULL,
+ NULL, 0, 0, NULL);
else
- ret = bgp_withdraw(peer, &p, addpath_id, attr, afi,
- safi, ZEBRA_ROUTE_BGP,
- BGP_ROUTE_NORMAL, NULL, NULL, 0,
- NULL);
+ bgp_withdraw(peer, &p, addpath_id, attr, afi, safi,
+ ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, NULL,
+ NULL, 0, NULL);
/* Do not send BGP notification twice when maximum-prefix count
* overflow. */
if (CHECK_FLAG(peer->sflags, PEER_STATUS_PREFIX_OVERFLOW))
return BGP_NLRI_PARSE_ERROR_PREFIX_OVERFLOW;
-
- /* Address family configuration mismatch. */
- if (ret < 0)
- return BGP_NLRI_PARSE_ERROR_ADDRESS_FAMILY;
}
/* Packet length consistency check. */
json_object_string_add(json_path, "path",
attr->aspath->str);
else
- aspath_print_vty(vty, "%s", attr->aspath, " ");
+ aspath_print_vty(vty, attr->aspath);
}
/* Print origin */
/* Print aspath */
if (attr->aspath)
- aspath_print_vty(vty, "%s", attr->aspath, " ");
+ aspath_print_vty(vty, attr->aspath);
/* Print origin */
vty_out(vty, "%s", bgp_origin_str[attr->origin]);
use_json, NULL));
if (attr->aspath)
- aspath_print_vty(vty, "%s", attr->aspath, " ");
+ aspath_print_vty(vty, attr->aspath);
vty_out(vty, "%s", bgp_origin_str[attr->origin]);
vty_out(vty, "%*s ", 8, " ");
if (attr->aspath)
- aspath_print_vty(vty, "%s", attr->aspath, " ");
+ aspath_print_vty(vty, attr->aspath);
vty_out(vty, "%s", bgp_origin_str[attr->origin]);
attr->aspath->json);
} else {
if (attr->aspath->segments)
- aspath_print_vty(vty, " %s", attr->aspath, "");
+ vty_out(vty, " %s", attr->aspath->str);
else
vty_out(vty, " Local");
}
const char *, const char *, const char *);
/* this is primarily for MPLS-VPN */
-extern int bgp_update(struct peer *peer, const struct prefix *p,
- uint32_t addpath_id, struct attr *attr,
- afi_t afi, safi_t safi, int type, int sub_type,
- struct prefix_rd *prd, mpls_label_t *label,
- uint32_t num_labels, int soft_reconfig,
- struct bgp_route_evpn *evpn);
-extern int bgp_withdraw(struct peer *peer, const struct prefix *p,
- uint32_t addpath_id, struct attr *attr, afi_t afi,
- safi_t safi, int type, int sub_type,
- struct prefix_rd *prd, mpls_label_t *label,
- uint32_t num_labels, struct bgp_route_evpn *evpn);
+extern void bgp_update(struct peer *peer, const struct prefix *p,
+ uint32_t addpath_id, struct attr *attr, afi_t afi,
+ safi_t safi, int type, int sub_type,
+ struct prefix_rd *prd, mpls_label_t *label,
+ uint32_t num_labels, int soft_reconfig,
+ struct bgp_route_evpn *evpn);
+extern void bgp_withdraw(struct peer *peer, const struct prefix *p,
+ uint32_t addpath_id, struct attr *attr, afi_t afi,
+ safi_t safi, int type, int sub_type,
+ struct prefix_rd *prd, mpls_label_t *label,
+ uint32_t num_labels, struct bgp_route_evpn *evpn);
/* for bgp_nexthop and bgp_damp */
extern void bgp_process(struct bgp *, struct bgp_dest *, afi_t, safi_t);
if (json)
json_object_string_add(json, "remoteGrMode", mode);
else
- vty_out(vty, mode, "\n");
+ vty_out(vty, "%s\n", mode);
}
static void bgp_show_neighbor_graceful_restart_local_mode(struct vty *vty,
if (json)
json_object_string_add(json, "localGrMode", mode);
else
- vty_out(vty, mode, "\n");
+ vty_out(vty, "%s\n", mode);
}
static void bgp_show_neighbor_graceful_restart_capability_per_afi_safi(
XFREE(MTYPE_PEER_DESC, peer->desc);
XFREE(MTYPE_BGP_PEER_HOST, peer->host);
+ XFREE(MTYPE_BGP_PEER_HOST, peer->hostname);
XFREE(MTYPE_BGP_PEER_HOST, peer->domainname);
XFREE(MTYPE_BGP_PEER_IFNAME, peer->ifname);
return 0;
}
+PRINTFRR(2, 3)
static int rfapiStdioPrintf(void *stream, const char *format, ...)
{
FILE *file = NULL;
AC_C_FLAG([-funwind-tables])
AC_C_FLAG([-Wall])
AC_C_FLAG([-Wextra])
+AC_C_FLAG([-Wformat-nonliteral])
+AC_C_FLAG([-Wformat-security])
AC_C_FLAG([-Wstrict-prototypes])
AC_C_FLAG([-Wmissing-prototypes])
AC_C_FLAG([-Wmissing-declarations])
-- Donatas Abraitis <donatas@opensourcerouting.org> Tue, 04 Oct 2022 16:00:00 +0500
+frr (8.4.2-1) unstable; urgency=medium
+
+ * new upstream release FRR 8.4.2
+ * drop all patches in debian/patches/, they got merged upstream
+
+ -- David Lamparter <equinox-debian@diac24.net> Mon, 23 Jan 2023 17:32:02 +0100
+
+frr (8.4.1-2) unstable; urgency=medium
+
+ * commit to git tarball as source instead of dist tarball
+ * ditch unneeded sphinx missing files patch
+ * fix clippy symbol lookup issue (build SEGV on mips64el)
+ * correctly mark :native for libelf-dev & libpython3-dev to fix cross-build
+ * use mutex for zserv stats (atomic uint64_t is too wide for 32-bit archs)
+
+ -- David Lamparter <equinox-debian@diac24.net> Fri, 06 Jan 2023 14:59:57 +0100
+
+frr (8.4.1-1) unstable; urgency=medium
+
+ * New upstream release FRR 8.4.1 (closes: #1017518)
+ * New frr@ systemd service unit to run inside network namespace
+ * egrep to grep -E
+ * upstream fix ospfd crash (PR 8876) (closes: #981139)
+ * upstream fix isisd parsing issues CVE-2022-26125, CVE-2022-26126 and
+ babeld parsing issues CVE-2022-26127, CVE-2022-26128, CVE-2022-26129
+ (closes: #1008010)
+ * upstream fix bgpd out-of-bounds read CVE-2022-37032 (closes: #1021016)
+ * upstream fix bgpd UAF CVE-2022-37035 (closes: #1016978)
+ * libyang-related pcre3 dep replaced with pcre2 (closes: #1000032)
+ * disable ELF magic on mips64el
+ * fixed texinfo figure installation directory
+ * enable dh_sphinxdoc to get rid of embedded javascript in frr-doc
+ * removed bogus iproute dependency choice
+
+ -- David Lamparter <equinox-debian@diac24.net> Mon, 02 Jan 2023 14:46:06 +0100
+
frr (8.4-0) unstable; urgency=medium
* New upstream release FRR 8.4
-- Jafar Al-Gharaibeh <jafar@atcorp.com> Tue, 01 Mar 2022 10:00:00 +0500
+frr (8.1-1) unstable; urgency=medium
+
+ * New upstream release FRR 8.1
+ * Upload to unstable.
+
+ -- Ondřej Surý <ondrej@debian.org> Sat, 13 Nov 2021 13:32:48 +0100
+
frr (8.1-0) unstable; urgency=medium
* New upstream release FRR 8.1
quagga (0.98.3-5) unstable; urgency=high
* The patch which tried to remove the OpenSSL dependency, which is
- not only unnecessary but also a violation of the licence and thus RC,
+ not only unneccessary but also a violation of the licence and thus RC,
stopped working a while ago, since autoreconf is no longer run before
building the binaries. So now ./configure is patched directly (thanks
to Faidon Liambotis for reporting). Closes: #306840
* Made the directory (but not the config/log files!) world accessible
again on user request (thanks to Anand Kumria)). Closes: #213129
* No longer providing sample configuration in /etc/quagga/. They are
- now only available in /usr/share/doc/quagga/ to avoid accidentally
+ now only available in /usr/share/doc/quagga/ to avoid accidently
using them without changing the adresses (thanks to Marc Haber).
Closes: #215918
quagga (0.96.2-9) unstable; urgency=medium
- * Removed /usr/share/info/dir.* which were accidentally there and prevented
+ * Removed /usr/share/info/dir.* which were accidently there and prevented
the installation by dpkg (thanks to Simon Raven). Closes: #212614
* Reworded package description (thanks to Anand Kumria). Closes: #213125
* Added french debconf translation (thanks to Christian Perrier).
install-info,
libc-ares-dev,
libcap-dev,
- libelf-dev,
+ libelf-dev:native,
libjson-c-dev | libjson0-dev,
libpam0g-dev | libpam-dev,
libpcre2-dev,
- libpython3-dev,
+ libpython3-dev:native,
libreadline-dev,
librtr-dev (>= 0.8.0~) <!pkg.frr.nortrlib>,
libsnmp-dev,
libyang2-dev,
lsb-base,
pkg-config,
- python3,
- python3-dev,
- python3-pytest <!nocheck>,
- python3-sphinx,
+ python3:native,
+ python3-dev:native,
+ python3-pytest:native <!nocheck>,
+ python3-sphinx:native,
texinfo (>= 4.7),
lua5.3 <pkg.frr.lua>,
liblua5.3-dev <pkg.frr.lua>
Package: frr
Architecture: linux-any
-Depends: iproute2 | iproute,
+Depends: iproute2,
logrotate (>= 3.2-11),
lsof,
${misc:Depends},
Section: doc
Architecture: all
Multi-Arch: foreign
-Depends: libjs-jquery,
- libjs-underscore,
- ${misc:Depends}
+Depends: ${misc:Depends},
+ ${sphinxdoc:Depends}
Suggests: frr
Conflicts: quagga-doc
Description: FRRouting suite - user manual
Index: /usr/share/info/frr.info.gz
Files:
/usr/share/info/frr.info.gz
- /usr/share/info/fig-normal-processing.png
- /usr/share/info/fig-rs-processing.png
- /usr/share/info/fig-vnc-commercial-route-reflector.png
- /usr/share/info/fig-vnc-frr-route-reflector.png
- /usr/share/info/fig-vnc-gw.png
- /usr/share/info/fig-vnc-mesh.png
- /usr/share/info/fig-vnc-redundant-route-reflectors.png
- /usr/share/info/fig_topologies_full.png
- /usr/share/info/fig_topologies_rs.png
+ /usr/share/info/frr-figures/fig-normal-processing.png
+ /usr/share/info/frr-figures/fig-rs-processing.png
+ /usr/share/info/frr-figures/fig-vnc-commercial-route-reflector.png
+ /usr/share/info/frr-figures/fig-vnc-frr-route-reflector.png
+ /usr/share/info/frr-figures/fig-vnc-gw.png
+ /usr/share/info/frr-figures/fig-vnc-mesh.png
+ /usr/share/info/frr-figures/fig-vnc-redundant-route-reflectors.png
+ /usr/share/info/frr-figures/fig_topologies_full.png
+ /usr/share/info/frr-figures/fig_topologies_rs.png
-doc/user/_build/texinfo/frr.info
+build/doc/user/_build/texinfo/frr.info
# other
README.md usr/share/doc/frr
doc/figures/*.png usr/share/doc/frr
-doc/figures/fig-normal-processing.png usr/share/info
-doc/figures/fig-rs-processing.png usr/share/info
-doc/figures/fig-vnc-commercial-route-reflector.png usr/share/info
-doc/figures/fig-vnc-frr-route-reflector.png usr/share/info
-doc/figures/fig-vnc-gw.png usr/share/info
-doc/figures/fig-vnc-mesh.png usr/share/info
-doc/figures/fig-vnc-redundant-route-reflectors.png usr/share/info
-doc/figures/fig_topologies_full.png usr/share/info
-doc/figures/fig_topologies_rs.png usr/share/info
+doc/figures/fig-normal-processing.png usr/share/info/frr-figures
+doc/figures/fig-rs-processing.png usr/share/info/frr-figures
+doc/figures/fig-vnc-commercial-route-reflector.png usr/share/info/frr-figures
+doc/figures/fig-vnc-frr-route-reflector.png usr/share/info/frr-figures
+doc/figures/fig-vnc-gw.png usr/share/info/frr-figures
+doc/figures/fig-vnc-mesh.png usr/share/info/frr-figures
+doc/figures/fig-vnc-redundant-route-reflectors.png usr/share/info/frr-figures
+doc/figures/fig_topologies_full.png usr/share/info/frr-figures
+doc/figures/fig_topologies_rs.png usr/share/info/frr-figures
usr/share/doc/frr/html
usr/share/info/
# function names & co.
-frr binary: spelling-error-in-binary usr/lib/*/frr/libfrr.so.0.0.0 writen written
-frr binary: spelling-error-in-binary usr/lib/*/frr/libfrrospfapiclient.so.0.0.0 writen written
-frr binary: spelling-error-in-binary usr/lib/frr/ospfd writen written
-frr binary: spelling-error-in-binary usr/lib/frr/zebra writen written
-frr binary: spelling-error-in-binary usr/lib/frr/pimd writen written
-frr binary: spelling-error-in-binary usr/lib/frr/pimd iif if
+frr binary: spelling-error-in-binary *writen written*
+frr binary: spelling-error-in-binary *iif if*
# prefixed man pages for off-PATH daemons
manpage-without-executable
-doc/manpages/_build/man/frr-bgpd.8
-doc/manpages/_build/man/frr-eigrpd.8
-doc/manpages/_build/man/frr-fabricd.8
-doc/manpages/_build/man/frr-isisd.8
-doc/manpages/_build/man/frr-ldpd.8
-doc/manpages/_build/man/frr-nhrpd.8
-doc/manpages/_build/man/frr-ospf6d.8
-doc/manpages/_build/man/frr-ospfd.8
-doc/manpages/_build/man/frr-pimd.8
-doc/manpages/_build/man/frr-ripd.8
-doc/manpages/_build/man/frr-ripngd.8
-doc/manpages/_build/man/frr-watchfrr.8
-doc/manpages/_build/man/frr-zebra.8
-doc/manpages/_build/man/frr.1
-doc/manpages/_build/man/mtracebis.8
-doc/manpages/_build/man/vtysh.1
+build/doc/manpages/_build/man/frr-bgpd.8
+build/doc/manpages/_build/man/frr-eigrpd.8
+build/doc/manpages/_build/man/frr-fabricd.8
+build/doc/manpages/_build/man/frr-isisd.8
+build/doc/manpages/_build/man/frr-ldpd.8
+build/doc/manpages/_build/man/frr-nhrpd.8
+build/doc/manpages/_build/man/frr-ospf6d.8
+build/doc/manpages/_build/man/frr-ospfd.8
+build/doc/manpages/_build/man/frr-pimd.8
+build/doc/manpages/_build/man/frr-ripd.8
+build/doc/manpages/_build/man/frr-ripngd.8
+build/doc/manpages/_build/man/frr-watchfrr.8
+build/doc/manpages/_build/man/frr-zebra.8
+build/doc/manpages/_build/man/frr.1
+build/doc/manpages/_build/man/mtracebis.8
+build/doc/manpages/_build/man/vtysh.1
export PYTHON=python3
%:
- dh $@
+ dh $@ -Bbuild --with=sphinxdoc
override_dh_auto_configure:
$(shell dpkg-buildflags --export=sh); \
sed -e '1c #!/usr/bin/python3' -i debian/tmp/usr/lib/frr/frr-reload.py
sed -e '1c #!/usr/bin/python3' -i debian/tmp/usr/lib/frr/generate_support_bundle.py
+ sed -e '1c #!/usr/bin/python3' -i debian/tmp/usr/lib/frr/frr_babeltrace.py
+ sed -e '1c #!/usr/bin/python3' -i debian/tmp/usr/lib/frr/ospfclient.py
# let dh_systemd_* and dh_installinit do their thing automatically
- cp tools/frr.service debian/frr.service
- cp tools/frr@.service debian/frr@.service
- cp tools/frrinit.sh debian/frr.init
+ cp build/tools/frr.service debian/frr.service
+ cp build/tools/frr@.service debian/frr@.service
+ cp build/tools/frrinit.sh debian/frr.init
-rm -f debian/tmp/usr/lib/frr/frr
# install config files
rm -rf debian/tmp/usr/include
-rm debian/tmp/usr/lib/frr/ssd
-# use installed js libraries
- -rm -f debian/tmp/usr/share/doc/frr/html/_static/jquery.js
- ln -s /usr/share/javascript/jquery/jquery.js debian/tmp/usr/share/doc/frr/html/_static/jquery.js
- -rm -f debian/tmp/usr/share/doc/frr/html/_static/underscore.js
- ln -s /usr/share/javascript/underscore/underscore.js debian/tmp/usr/share/doc/frr/html/_static/underscore.js
-
override_dh_auto_build:
dh_auto_build -- $(MAKE_SILENT)
override_dh_missing:
dh_missing --fail-missing
+ifneq ($(filter nocheck,$(DEB_BUILD_PROFILES) $(DEB_BUILD_OPTIONS)),)
+override_dh_auto_test:
+ true
+endif
+
override_dh_auto_clean:
# we generally do NOT want a full distclean since that wipes both
# debian/changelog and config.version
version=4
-opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/ \
+opts="\
+searchmode=plain,\
+uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/,\
+downloadurlmangle=s&releases/>FRR\s*(\d\S+)\s+Release<&archive/refs/tags/frr-$1.tar.gz&,\
+filenamemangle=s&>FRR\s*(\d\S+)\s+Release<&frr-$1.tar.gz&,\
+" \
https://github.com/FRRouting/frr/releases/ \
- .*/frr-(\d\S+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
+ >FRR\s*(\d\S+)\s+Release<
+++ /dev/null
-check process watchfrr with pidfile /var/run/frr/watchfrr.pid
- start program = "/etc/init.d/frr start watchfrr" with timeout 120 seconds
- stop program = "/etc/init.d/frr stop watchfrr"
- if 3 restarts within 10 cycles then timeout
vrf_name);
nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
- ret = nb_cli_apply_changes(vty, base_xpath);
+ ret = nb_cli_apply_changes(vty, "%s", base_xpath);
if (ret == CMD_SUCCESS)
VTY_PUSH_XPATH(ISIS_NODE, base_xpath);
overload ? "true" : "false");
}
- return nb_cli_apply_changes(vty, base_xpath);
+ return nb_cli_apply_changes(vty, "%s", base_xpath);
}
void cli_show_isis_mt_ipv4_multicast(struct vty *vty,
vlog(LOG_ERR, emsg, ap);
logit(LOG_ERR, "%s", strerror(errno));
} else {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ /* format extended above */
vlog(LOG_ERR, nfmt, ap);
+#pragma GCC diagnostic pop
free(nfmt);
}
va_end(ap);
#include "log.h"
+PRINTFRR(3, 0)
void vzlogx(const struct xref_logmsg *xref, int prio,
const char *format, va_list args)
{
return ferr_ok();
}
+PRINTFRR(7, 0)
static ferr_r ferr_set_va(const char *file, int line, const char *func,
enum ferr_kind kind, const char *pathname,
int errno_val, const char *text, va_list va)
/* do NOT call these functions directly. only for macro use! */
ferr_r ferr_set_internal(const char *file, int line, const char *func,
- enum ferr_kind kind, const char *text, ...);
+ enum ferr_kind kind, const char *text, ...)
+ PRINTFRR(5, 6);
ferr_r ferr_set_internal_ext(const char *file, int line, const char *func,
enum ferr_kind kind, const char *pathname,
- int errno_val, const char *text, ...);
+ int errno_val, const char *text, ...)
+ PRINTFRR(7, 8);
#define ferr_ok() 0
#include "vty.h"
/* print error message to vty; $ERR is replaced by the error's message */
-void vty_print_error(struct vty *vty, ferr_r err, const char *msg, ...);
+void vty_print_error(struct vty *vty, ferr_r err, const char *msg, ...)
+ PRINTFRR(3, 4);
#define CMD_FERR_DO(func, action, ...) \
do { \
nb_cli_enqueue_change(vty, "./source-any", NB_OP_CREATE, NULL);
}
- return nb_cli_apply_changes(vty, xpath_entry);
+ return nb_cli_apply_changes(vty, "%s", xpath_entry);
}
DEFPY_YANG(
NULL);
}
- return nb_cli_apply_changes(vty, xpath_entry);
+ return nb_cli_apply_changes(vty, "%s", xpath_entry);
}
DEFPY_YANG(
nb_cli_enqueue_change(vty, "./any", NB_OP_CREATE, NULL);
}
- return nb_cli_apply_changes(vty, xpath_entry);
+ return nb_cli_apply_changes(vty, "%s", xpath_entry);
}
DEFPY_YANG(
remark = argv_concat(argv, argc, 3);
nb_cli_enqueue_change(vty, "./remark", NB_OP_CREATE, remark);
- rv = nb_cli_apply_changes(vty, xpath);
+ rv = nb_cli_apply_changes(vty, "%s", xpath);
XFREE(MTYPE_TMP, remark);
return rv;
nb_cli_enqueue_change(vty, "./any", NB_OP_CREATE, NULL);
}
- return nb_cli_apply_changes(vty, xpath_entry);
+ return nb_cli_apply_changes(vty, "%s", xpath_entry);
}
DEFPY_YANG(
remark = argv_concat(argv, argc, 4);
nb_cli_enqueue_change(vty, "./remark", NB_OP_CREATE, remark);
- rv = nb_cli_apply_changes(vty, xpath);
+ rv = nb_cli_apply_changes(vty, "%s", xpath);
XFREE(MTYPE_TMP, remark);
return rv;
nb_cli_enqueue_change(vty, "./any", NB_OP_CREATE, NULL);
}
- return nb_cli_apply_changes(vty, xpath_entry);
+ return nb_cli_apply_changes(vty, "%s", xpath_entry);
}
DEFPY_YANG(
remark = argv_concat(argv, argc, 4);
nb_cli_enqueue_change(vty, "./remark", NB_OP_CREATE, remark);
- rv = nb_cli_apply_changes(vty, xpath);
+ rv = nb_cli_apply_changes(vty, "%s", xpath);
XFREE(MTYPE_TMP, remark);
return rv;
nb_cli_enqueue_change(vty, "./any", NB_OP_CREATE, NULL);
}
- return nb_cli_apply_changes(vty, xpath_entry);
+ return nb_cli_apply_changes(vty, "%s", xpath_entry);
}
DEFPY_YANG(
remark = argv_concat(argv, argc, 4);
nb_cli_enqueue_change(vty, "./remark", NB_OP_CREATE, remark);
- rv = nb_cli_apply_changes(vty, xpath);
+ rv = nb_cli_apply_changes(vty, "%s", xpath);
XFREE(MTYPE_TMP, remark);
return rv;
nb_cli_enqueue_change(vty, "./any", NB_OP_CREATE, NULL);
}
- return nb_cli_apply_changes(vty, xpath_entry);
+ return nb_cli_apply_changes(vty, "%s", xpath_entry);
}
DEFPY_YANG(
remark = argv_concat(argv, argc, 4);
nb_cli_enqueue_change(vty, "./remark", NB_OP_CREATE, remark);
- rv = nb_cli_apply_changes(vty, xpath);
+ rv = nb_cli_apply_changes(vty, "%s", xpath);
XFREE(MTYPE_TMP, remark);
return rv;
* prefix length <= le.
*/
if (yang_dnode_exists(args->dnode, xpath_le)) {
- le = yang_dnode_get_uint8(args->dnode, xpath_le);
+ le = yang_dnode_get_uint8(args->dnode, "%s", xpath_le);
if (p.prefixlen > le)
goto log_and_fail;
}
* prefix length <= ge.
*/
if (yang_dnode_exists(args->dnode, xpath_ge)) {
- ge = yang_dnode_get_uint8(args->dnode, xpath_ge);
+ ge = yang_dnode_get_uint8(args->dnode, "%s", xpath_ge);
if (p.prefixlen > ge)
goto log_and_fail;
}
*/
if (yang_dnode_exists(args->dnode, xpath_le)
&& yang_dnode_exists(args->dnode, xpath_ge)) {
- le = yang_dnode_get_uint8(args->dnode, xpath_le);
- ge = yang_dnode_get_uint8(args->dnode, xpath_ge);
+ le = yang_dnode_get_uint8(args->dnode, "%s", xpath_le);
+ ge = yang_dnode_get_uint8(args->dnode, "%s", xpath_ge);
if (ge > le)
goto log_and_fail;
}
return YANG_ITER_CONTINUE;
/* Check if different value. */
- if (strcmp(yang_dnode_get_string(dnode, ada->ada_xpath[idx]),
+ if (strcmp(yang_dnode_get_string(dnode, "%s",
+ ada->ada_xpath[idx]),
ada->ada_value[idx]))
return YANG_ITER_CONTINUE;
}
}
ada.ada_xpath[arg_idx] = cisco_entries[idx];
- ada.ada_value[arg_idx] =
- yang_dnode_get_string(entry_dnode, cisco_entries[idx]);
+ ada.ada_value[arg_idx] = yang_dnode_get_string(
+ entry_dnode, "%s", cisco_entries[idx]);
arg_idx++;
idx++;
}
}
ada.ada_xpath[arg_idx] = zebra_entries[idx];
- ada.ada_value[arg_idx] =
- yang_dnode_get_string(entry_dnode, zebra_entries[idx]);
+ ada.ada_value[arg_idx] = yang_dnode_get_string(
+ entry_dnode, "%s", zebra_entries[idx]);
arg_idx++;
idx++;
}
}
nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
- ret = nb_cli_apply_changes_clear_pending(vty, xpath_list);
+ ret = nb_cli_apply_changes_clear_pending(vty, "%s", xpath_list);
if (ret == CMD_SUCCESS) {
VTY_PUSH_XPATH(INTERFACE_NODE, xpath_list);
nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
- return nb_cli_apply_changes(vty, xpath_list);
+ return nb_cli_apply_changes(vty, "%s", xpath_list);
}
static void netns_ifname_split(const char *xpath, char *ifname, char *vrfname)
* CMD_SUCCESS on success, CMD_WARNING_CONFIG_FAILED otherwise.
*/
extern int nb_cli_apply_changes_clear_pending(struct vty *vty,
- const char *xpath_base_fmt, ...);
+ const char *xpath_base_fmt, ...)
+ PRINTFRR(2, 3);
/*
* Apply enqueued changes to the candidate configuration, this function
* CMD_SUCCESS on success, CMD_WARNING_CONFIG_FAILED otherwise.
*/
extern int nb_cli_apply_changes(struct vty *vty, const char *xpath_base_fmt,
- ...);
+ ...) PRINTFRR(2, 3);
/*
* Execute a YANG RPC or Action.
* when allocating a larger buffer in asnprintfrr()
*/
va_copy(ap, *vaf->va);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ /* can't format check this */
return vbprintfrr(buf, vaf->fmt, ap);
+#pragma GCC diagnostic pop
}
fmt[4] = ch;
fmt[5] = '\0';
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
snprintf(buf, sizeof(buf), fmt, prec, arg);
+#pragma GCC diagnostic pop
} else {
double arg = GETARG(double);
char fmt[5] = "%.*";
fmt[3] = ch;
fmt[4] = '\0';
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
snprintf(buf, sizeof(buf), fmt, prec, arg);
+#pragma GCC diagnostic pop
}
cp = buf;
/* for proper padding */
endif
lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl
+ @$(MKDIR_P) lib
$(PERL) $(top_srcdir)/lib/route_types.pl $(rt_enabled) < $(top_srcdir)/lib/route_types.txt > $@
DISTCLEANFILES += lib/route_types.h
.SILENT: lib/gitversion.h lib/gitversion.h.tmp
GITH=lib/gitversion.h
lib/gitversion.h.tmp: $(top_srcdir)/.git
+ @$(MKDIR_P) lib
$(PERL) $(top_srcdir)/lib/gitversion.pl $(top_srcdir) > ${GITH}.tmp
lib/gitversion.h: lib/gitversion.h.tmp
{ test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp ${GITH}.tmp ${GITH}
*
* @return pointer to the first cell of allocated row
*/
+PRINTFRR(3, 0)
static struct ttable_cell *ttable_insert_row_va(struct ttable *tt, int i,
const char *format, va_list ap)
{
abspad -= row[j].style.border.right_on ? 1 : 0;
/* print text */
- const char *fmt;
if (row[j].style.align == LEFT)
- fmt = "%-*s";
+ pos += sprintf(&buf[pos], "%-*s", abspad,
+ row[j].text);
else
- fmt = "%*s";
-
- pos += sprintf(&buf[pos], fmt, abspad, row[j].text);
+ pos += sprintf(&buf[pos], "%*s", abspad,
+ row[j].text);
/* print right padding */
for (int k = 0; k < row[j].style.rpad; k++)
snprintf(xpath_list, sizeof(xpath_list), FRR_VRF_KEY_XPATH, vrfname);
nb_cli_enqueue_change(vty, xpath_list, NB_OP_CREATE, NULL);
- ret = nb_cli_apply_changes_clear_pending(vty, xpath_list);
+ ret = nb_cli_apply_changes_clear_pending(vty, "%s", xpath_list);
if (ret == CMD_SUCCESS) {
VTY_PUSH_XPATH(VRF_NODE, xpath_list);
vrf = vrf_lookup_by_name(vrfname);
vty_out(vty, "%s", host.motd);
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+/* prompt formatting has a %s in the cmd_node prompt string.
+ *
+ * Also for some reason GCC emits the warning on the end of the function
+ * (optimization maybe?) rather than on the vty_out line, so this pragma
+ * wraps the entire function rather than just the vty_out line.
+ */
+
/* Put out prompt and wait input from user. */
static void vty_prompt(struct vty *vty)
{
vty_out(vty, cmd_prompt(vty->node), cmd_hostname_get());
}
}
+#pragma GCC diagnostic pop
/* Send WILL TELOPT_ECHO to remote server. */
static void vty_will_echo(struct vty *vty)
vty->address);
/* format the prompt */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ /* prompt formatting has a %s in the cmd_node prompt string */
snprintf(prompt_str, sizeof(prompt_str), cmd_prompt(vty->node),
vty_str);
+#pragma GCC diagnostic pop
/* now log the command */
zlog_notice("%s%s", prompt_str, buf);
* Schema name of the libyang data node.
*/
extern const char *yang_dnode_get_schema_name(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
/*
* Find a libyang data node by its YANG data path.
* The libyang data node if found, or NULL if not found.
*/
extern struct lyd_node *yang_dnode_getf(const struct lyd_node *dnode,
- const char *path_fmt, ...);
+ const char *path_fmt, ...)
+ PRINTFRR(2, 3);
/*
* Check if a libyang data node exists.
* true if a libyang data node was found, false otherwise.
*/
extern bool yang_dnode_existsf(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
/*
* Iterate over all libyang data nodes that satisfy an XPath query.
*/
void yang_dnode_iterate(yang_dnode_iter_cb cb, void *arg,
const struct lyd_node *dnode, const char *xpath_fmt,
- ...);
+ ...) PRINTFRR(4, 5);
/*
* Check if the libyang data node contains a default value. Non-presence
* true if the data node contains the default value, false otherwise.
*/
extern bool yang_dnode_is_defaultf(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
/*
* Check if the libyang data node and all of its children contain default
* Pointer to yang_data if found, NULL otherwise.
*/
extern struct yang_data *yang_data_list_find(const struct list *list,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
/*
* Create and set up a libyang context (for use by the translator)
if (!mapping)
return YANG_TRANSLATE_NOTFOUND;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ /* processing format strings from mapping node... */
n = sscanf(xpath, mapping->xpath_from_fmt, keys[0], keys[1], keys[2],
keys[3]);
+#pragma GCC diagnostic pop
if (n < 0) {
flog_warn(EC_LIB_YANG_TRANSLATION_ERROR,
"%s: sscanf() failed: %s", __func__,
return YANG_TRANSLATE_FAILURE;
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ /* processing format strings from mapping node... */
snprintf(xpath, xpath_len, mapping->xpath_to_fmt, keys[0], keys[1],
keys[2], keys[3]);
+#pragma GCC diagnostic pop
return YANG_TRANSLATE_SUCCESS;
}
} \
} while (0)
+PRINTFRR(2, 0)
static inline const char *
yang_dnode_xpath_get_canon(const struct lyd_node *dnode, const char *xpath_fmt,
va_list ap)
return lyd_get_value(&__dleaf->node);
}
+PRINTFRR(2, 0)
static inline const struct lyd_value *
yang_dnode_xpath_get_value(const struct lyd_node *dnode, const char *xpath_fmt,
va_list ap)
extern bool yang_str2bool(const char *value);
extern struct yang_data *yang_data_new_bool(const char *xpath, bool value);
extern bool yang_dnode_get_bool(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
-extern bool yang_get_default_bool(const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
+extern bool yang_get_default_bool(const char *xpath_fmt, ...) PRINTFRR(1, 2);
/* dec64 */
extern double yang_str2dec64(const char *xpath, const char *value);
extern struct yang_data *yang_data_new_dec64(const char *xpath, double value);
extern double yang_dnode_get_dec64(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
-extern double yang_get_default_dec64(const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
+extern double yang_get_default_dec64(const char *xpath_fmt, ...) PRINTFRR(1, 2);
/* enum */
extern int yang_str2enum(const char *xpath, const char *value);
extern struct yang_data *yang_data_new_enum(const char *xpath, int value);
extern int yang_dnode_get_enum(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
-extern int yang_get_default_enum(const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
+extern int yang_get_default_enum(const char *xpath_fmt, ...) PRINTFRR(1, 2);
/* int8 */
extern int8_t yang_str2int8(const char *value);
extern struct yang_data *yang_data_new_int8(const char *xpath, int8_t value);
extern int8_t yang_dnode_get_int8(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
-extern int8_t yang_get_default_int8(const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
+extern int8_t yang_get_default_int8(const char *xpath_fmt, ...) PRINTFRR(1, 2);
/* int16 */
extern int16_t yang_str2int16(const char *value);
extern struct yang_data *yang_data_new_int16(const char *xpath, int16_t value);
extern int16_t yang_dnode_get_int16(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
-extern int16_t yang_get_default_int16(const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
+extern int16_t yang_get_default_int16(const char *xpath_fmt, ...)
+ PRINTFRR(1, 2);
/* int32 */
extern int32_t yang_str2int32(const char *value);
extern struct yang_data *yang_data_new_int32(const char *xpath, int32_t value);
extern int32_t yang_dnode_get_int32(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
-extern int32_t yang_get_default_int32(const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
+extern int32_t yang_get_default_int32(const char *xpath_fmt, ...)
+ PRINTFRR(1, 2);
/* int64 */
extern int64_t yang_str2int64(const char *value);
extern struct yang_data *yang_data_new_int64(const char *xpath, int64_t value);
extern int64_t yang_dnode_get_int64(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
-extern int64_t yang_get_default_int64(const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
+extern int64_t yang_get_default_int64(const char *xpath_fmt, ...)
+ PRINTFRR(1, 2);
/* uint8 */
extern uint8_t yang_str2uint8(const char *value);
extern struct yang_data *yang_data_new_uint8(const char *xpath, uint8_t value);
extern uint8_t yang_dnode_get_uint8(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
-extern uint8_t yang_get_default_uint8(const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
+extern uint8_t yang_get_default_uint8(const char *xpath_fmt, ...)
+ PRINTFRR(1, 2);
/* uint16 */
extern uint16_t yang_str2uint16(const char *value);
extern struct yang_data *yang_data_new_uint16(const char *xpath,
uint16_t value);
extern uint16_t yang_dnode_get_uint16(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
-extern uint16_t yang_get_default_uint16(const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
+extern uint16_t yang_get_default_uint16(const char *xpath_fmt, ...)
+ PRINTFRR(1, 2);
/* uint32 */
extern uint32_t yang_str2uint32(const char *value);
extern struct yang_data *yang_data_new_uint32(const char *xpath,
uint32_t value);
extern uint32_t yang_dnode_get_uint32(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
-extern uint32_t yang_get_default_uint32(const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
+extern uint32_t yang_get_default_uint32(const char *xpath_fmt, ...)
+ PRINTFRR(1, 2);
/* uint64 */
extern uint64_t yang_str2uint64(const char *value);
extern struct yang_data *yang_data_new_uint64(const char *xpath,
uint64_t value);
extern uint64_t yang_dnode_get_uint64(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
-extern uint64_t yang_get_default_uint64(const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
+extern uint64_t yang_get_default_uint64(const char *xpath_fmt, ...)
+ PRINTFRR(1, 2);
/* string */
extern struct yang_data *yang_data_new_string(const char *xpath,
const char *value);
extern const char *yang_dnode_get_string(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
extern void yang_dnode_get_string_buf(char *buf, size_t size,
const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
-extern const char *yang_get_default_string(const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...)
+ PRINTFRR(4, 5);
+extern const char *yang_get_default_string(const char *xpath_fmt, ...)
+ PRINTFRR(1, 2);
extern void yang_get_default_string_buf(char *buf, size_t size,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...)
+ PRINTFRR(3, 4);
/* binary */
extern struct yang_data *yang_data_new_binary(const char *xpath,
const char *value, size_t len);
extern size_t yang_dnode_get_binary_buf(char *buf, size_t size,
const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...)
+ PRINTFRR(4, 5);
/* empty */
extern struct yang_data *yang_data_new_empty(const char *xpath);
extern bool yang_dnode_get_empty(const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(2, 3);
/* ip prefix */
extern void yang_str2prefix(const char *value, union prefixptr prefix);
union prefixconstptr prefix);
extern void yang_dnode_get_prefix(struct prefix *prefix,
const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(3, 4);
extern void yang_get_default_prefix(union prefixptr var, const char *xpath_fmt,
- ...);
+ ...) PRINTFRR(2, 3);
/* ipv4 */
extern void yang_str2ipv4(const char *value, struct in_addr *addr);
const struct in_addr *addr);
extern void yang_dnode_get_ipv4(struct in_addr *addr,
const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(3, 4);
extern void yang_get_default_ipv4(struct in_addr *var, const char *xpath_fmt,
- ...);
+ ...) PRINTFRR(2, 3);
/* ipv4p */
extern void yang_str2ipv4p(const char *value, union prefixptr prefix);
union prefixconstptr prefix);
extern void yang_dnode_get_ipv4p(union prefixptr prefix,
const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(3, 4);
extern void yang_get_default_ipv4p(union prefixptr var, const char *xpath_fmt,
- ...);
+ ...) PRINTFRR(2, 3);
/* ipv6 */
extern void yang_str2ipv6(const char *value, struct in6_addr *addr);
const struct in6_addr *addr);
extern void yang_dnode_get_ipv6(struct in6_addr *addr,
const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(3, 4);
extern void yang_get_default_ipv6(struct in6_addr *var, const char *xpath_fmt,
- ...);
+ ...) PRINTFRR(2, 3);
/* ipv6p */
extern void yang_str2ipv6p(const char *value, union prefixptr prefix);
union prefixconstptr prefix);
extern void yang_dnode_get_ipv6p(union prefixptr prefix,
const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(3, 4);
extern void yang_get_default_ipv6p(union prefixptr var, const char *xpath_fmt,
- ...);
+ ...) PRINTFRR(2, 3);
/* ip */
extern void yang_str2ip(const char *value, struct ipaddr *addr);
extern struct yang_data *yang_data_new_ip(const char *xpath,
const struct ipaddr *addr);
extern void yang_dnode_get_ip(struct ipaddr *addr, const struct lyd_node *dnode,
- const char *xpath_fmt, ...);
-extern void yang_get_default_ip(struct ipaddr *var, const char *xpath_fmt, ...);
+ const char *xpath_fmt, ...) PRINTFRR(3, 4);
+extern void yang_get_default_ip(struct ipaddr *var, const char *xpath_fmt, ...)
+ PRINTFRR(2, 3);
/* mac */
extern struct yang_data *yang_data_new_mac(const char *xpath,
fb.outpos_i = 0;
va_copy(args, msg->args);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ /* format-string checking is done further up the chain */
need += vbprintfrr(&fb, msg->fmt, args);
+#pragma GCC diagnostic pop
va_end(args);
msg->textlen = need;
fb.outpos_i = 0;
va_copy(args, msg->args);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ /* same as above */
vbprintfrr(&fb, msg->fmt, args);
+#pragma GCC diagnostic pop
va_end(args);
bputch(&fb, '\n');
struct of_cb_args args = {0};
struct of_cb_pref *p;
- yang_dnode_iterate(iter_objfun_cb, &args, dnode, path);
+ yang_dnode_iterate(iter_objfun_cb, &args, dnode, "%s", path);
for (p = args.first; p != NULL; p = p->next)
fun(p->type, arg);
}
#define MAX_PATH_NAME_SIZE 255
/* pceplib logging callback */
-static int pceplib_logging_cb(int level, const char *fmt, va_list args);
+static int pceplib_logging_cb(int level, const char *fmt, va_list args)
+ PRINTFRR(2, 0);
/* Socket callbacks */
static int pcep_lib_pceplib_socket_read_cb(void *fpt, void **thread, int fd,
#include <stdarg.h>
#include <stdio.h>
+#include "compiler.h"
#include "pcep_utils_logging.h"
/* Forward declaration */
-int pcep_stdout_logger(int priority, const char *format, va_list args);
+int pcep_stdout_logger(int priority, const char *format, va_list args)
+ PRINTFRR(2, 0);
static pcep_logger_func logger_func = pcep_stdout_logger;
static int logging_level_ = LOG_INFO;
"Connection retry period (in seconds)\n")
{
const char *vrfname;
- char xpath[XPATH_MAXLEN];
vrfname = pim_cli_get_vrf_name(vty);
if (vrfname == NULL)
return CMD_WARNING_CONFIG_FAILED;
- snprintf(xpath, sizeof(xpath), FRR_PIM_MSDP_XPATH, "frr-pim:pimd",
- "pim", vrfname, "frr-routing:ipv4");
nb_cli_enqueue_change(vty, "./hold-time", NB_OP_MODIFY, holdtime_str);
nb_cli_enqueue_change(vty, "./keep-alive", NB_OP_MODIFY, keepalive_str);
if (connretry_str)
nb_cli_enqueue_change(vty, "./connection-retry", NB_OP_DESTROY,
NULL);
- nb_cli_apply_changes(vty, xpath);
-
+ nb_cli_apply_changes(vty, FRR_PIM_MSDP_XPATH, "frr-pim:pimd", "pim",
+ vrfname, "frr-routing:ipv4");
return CMD_SUCCESS;
}
IGNORED_IN_NO_STR)
{
const char *vrfname;
- char xpath[XPATH_MAXLEN];
vrfname = pim_cli_get_vrf_name(vty);
if (vrfname == NULL)
return CMD_WARNING_CONFIG_FAILED;
- snprintf(xpath, sizeof(xpath), FRR_PIM_MSDP_XPATH, "frr-pim:pimd",
- "pim", vrfname, "frr-routing:ipv4");
-
nb_cli_enqueue_change(vty, "./hold-time", NB_OP_DESTROY, NULL);
nb_cli_enqueue_change(vty, "./keep-alive", NB_OP_DESTROY, NULL);
nb_cli_enqueue_change(vty, "./connection-retry", NB_OP_DESTROY, NULL);
- nb_cli_apply_changes(vty, xpath);
+ nb_cli_apply_changes(vty, FRR_PIM_MSDP_XPATH, "frr-pim:pimd", "pim",
+ vrfname, "frr-routing:ipv4");
return CMD_SUCCESS;
}
sizeof(rs_timer_xpath));
/* RFC4601 */
- v = yang_dnode_get_uint16(vty->candidate_config->dnode,
+ v = yang_dnode_get_uint16(vty->candidate_config->dnode, "%s",
rs_timer_xpath);
v = 3 * v + PIM_REGISTER_PROBE_TIME_DEFAULT;
if (v > UINT16_MAX)
return NB_OK;
}
- plist = yang_dnode_get_string(plist_dnode, plist_xpath);
+ plist = yang_dnode_get_string(plist_dnode, "%s", plist_xpath);
if (strcmp(prefix_list, plist)) {
vty_out(vty, "%% Unable to find specified RP\n");
return NB_OK;
}
}
- ret = nb_cli_apply_changes(vty, xpath_prefix);
+ ret = nb_cli_apply_changes(vty, "%s", xpath_prefix);
} else {
if (args->source)
snprintf(ab_xpath, sizeof(ab_xpath),
yang_dnode_get_path(dnode, ab_xpath, XPATH_MAXLEN);
nb_cli_enqueue_change(vty, ab_xpath, NB_OP_DESTROY, NULL);
- ret = nb_cli_apply_changes(vty, ab_xpath);
+ ret = nb_cli_apply_changes(vty, "%s", ab_xpath);
}
return ret;
# end
tests/isisd/test_fuzz_isis_tlv_tests.h: $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz
- @mkdir -p tests/isisd
+ @$(MKDIR_P) tests/isisd
$(AM_V_GEN)gzip -d < $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz > "$@"
CLEANFILES += tests/isisd/test_fuzz_isis_tlv_tests.h
nodist_tests_lib_cli_test_commands_SOURCES = tests/lib/cli/test_commands_defun.c
tests_lib_cli_test_commands_SOURCES = tests/lib/cli/test_commands.c tests/helpers/c/prng.c
tests/lib/cli/test_commands_defun.c: vtysh/vtysh_cmd.c
- @mkdir -p tests/lib/cli
+ @$(MKDIR_P) tests/lib/cli
$(AM_V_GEN)sed \
-e 's%"vtysh/vtysh\.h"%"tests/helpers/c/tests.h"%' \
-e 's/vtysh_init_cmd/test_init_cmd/' \
!
+debug bgp neighbor
+!
router bgp 65001
no bgp ebgp-requires-policy
+ bgp default show-hostname
+ bgp default show-nexthop-hostname
neighbor 192.168.1.2 remote-as external
+ neighbor 192.168.1.2 timers 1 3
+ neighbor 192.168.1.2 timers connect 1
neighbor 192.168.1.2 dont-capability-negotiate
!
router bgp 65002
no bgp ebgp-requires-policy
neighbor 192.168.1.1 remote-as external
+ neighbor 192.168.1.1 timers 1 3
+ neighbor 192.168.1.1 timers connect 1
address-family ipv4 unicast
redistribute connected
exit-address-family
# pylint: disable=C0413
from lib import topotest
from lib.topogen import Topogen, TopoRouter, get_topogen
+from lib.common_config import step
pytestmark = [pytest.mark.bgpd]
tgen.stop_topology()
+def bgp_converge(router):
+ output = json.loads(router.vtysh_cmd("show bgp ipv4 unicast summary json"))
+ expected = {
+ "peers": {
+ "192.168.1.2": {
+ "pfxRcd": 2,
+ "pfxSnt": 2,
+ "state": "Established",
+ "peerState": "OK",
+ }
+ }
+ }
+ return topotest.json_cmp(output, expected)
+
+
def test_bgp_dont_capability_negotiate():
tgen = get_topogen()
if tgen.routers_have_failure():
pytest.skip(tgen.errors)
- router = tgen.gears["r1"]
+ r1 = tgen.gears["r1"]
+
+ test_func = functools.partial(bgp_converge, r1)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ assert result is None, "Can't converge with dont-capability-negotiate"
+
+
+def test_bgp_check_fqdn():
+ tgen = get_topogen()
- def _bgp_converge(router):
- output = json.loads(router.vtysh_cmd("show bgp ipv4 unicast summary json"))
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
+ r1 = tgen.gears["r1"]
+ r2 = tgen.gears["r2"]
+
+ def _bgp_check_fqdn(fqdn=None):
+ output = json.loads(r1.vtysh_cmd("show bgp ipv4 unicast 172.16.16.1/32 json"))
expected = {
- "peers": {
- "192.168.1.2": {
- "pfxRcd": 2,
- "pfxSnt": 2,
- "state": "Established",
- "peerState": "OK",
+ "paths": [
+ {
+ "nexthops": [
+ {
+ "hostname": fqdn,
+ }
+ ],
+ "peer": {
+ "hostname": fqdn,
+ },
}
- }
+ ]
}
return topotest.json_cmp(output, expected)
- test_func = functools.partial(_bgp_converge, router)
- success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ step("Enable all capabilities")
+ r1.vtysh_cmd(
+ """
+ configure terminal
+ router bgp
+ address-family ipv4 unicast
+ no neighbor 192.168.1.2 dont-capability-negotiate
+ end
+ clear bgp 192.168.1.2
+ """
+ )
+
+ step("Wait to converge")
+ test_func = functools.partial(bgp_converge, r1)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ assert result is None, "Can't converge with dont-capability-negotiate"
+
+ test_func = functools.partial(_bgp_check_fqdn, "r2")
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ assert result is None, "FQDN capability enabled, but r1 can't see it"
+
+ step("Disable sending any capabilities from r2")
+ r2.vtysh_cmd(
+ """
+ configure terminal
+ router bgp
+ address-family ipv4 unicast
+ neighbor 192.168.1.1 dont-capability-negotiate
+ end
+ clear bgp 192.168.1.1
+ """
+ )
+
+ step("Wait to converge")
+ test_func = functools.partial(bgp_converge, r1)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
assert result is None, "Can't converge with dont-capability-negotiate"
+ step("Make sure FQDN capability is reset")
+ test_func = functools.partial(_bgp_check_fqdn)
+ _, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+ assert result is None, "FQDN capability disabled, but we still have a hostname"
+
if __name__ == "__main__":
args = ["-s"] + sys.argv[1:]
# Exclude empty string at end of list
for d in dmns[:-1]:
if re.search(r"%s" % daemon, d):
- daemonpid = self.cmd("cat %s" % d.rstrip()).rstrip()
+ daemonpidfile = d.rstrip()
+ daemonpid = self.cmd("cat %s" % daemonpidfile).rstrip()
if daemonpid.isdigit() and pid_exists(int(daemonpid)):
logger.info(
"{}: killing {}".format(
self.name,
- os.path.basename(d.rstrip().rsplit(".", 1)[0]),
+ os.path.basename(daemonpidfile.rsplit(".", 1)[0]),
)
)
- self.cmd("kill -9 %s" % daemonpid)
+ os.kill(int(daemonpid), signal.SIGKILL)
if pid_exists(int(daemonpid)):
numRunning += 1
while wait and numRunning > 0:
),
)
)
- self.cmd("kill -9 %s" % daemonpid)
+ os.kill(int(daemonpid), signal.SIGKILL)
if daemonpid.isdigit() and not pid_exists(
int(daemonpid)
):
numRunning -= 1
- self.cmd("rm -- {}".format(d.rstrip()))
+ self.cmd("rm -- {}".format(daemonpidfile))
if wait:
errors = self.checkRouterCores(reportOnce=True)
if self.checkRouterVersion("<", minErrorVersion):
try:
# Stop toplogy and Remove tmp files
- tgen.stop_topology
+ tgen.stop_topology()
except OSError:
# OSError exception is raised when mininet tries to stop switch
try:
# Stop toplogy and Remove tmp files
- tgen.stop_topology
+ tgen.stop_topology()
except OSError:
# OSError exception is raised when mininet tries to stop switch
try:
# Stop toplogy and Remove tmp files
- tgen.stop_topology
+ tgen.stop_topology()
except OSError:
# OSError exception is raised when mininet tries to stop switch
try:
# Stop toplogy and Remove tmp files
- tgen.stop_topology
+ tgen.stop_topology()
except OSError:
# OSError exception is raised when mininet tries to stop switch
CLEANFILES += vtysh/vtysh_daemons.h
vtysh/vtysh_daemons.h:
- mkdir -p vtysh
+ @$(MKDIR_P) vtysh
$(PERL) $(top_srcdir)/vtysh/daemons.pl $(vtysh_daemons) > vtysh/vtysh_daemons.h
return frrstr_join(argstr, argc + off, " ");
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+/* 'headline' is a format string with a %s for the daemon name
+ *
+ * Also for some reason GCC emits the warning on the end of the function
+ * (optimization maybe?) rather than on the vty_out line, so this pragma
+ * wraps the entire function rather than just the vty_out line.
+ */
+
static int show_per_daemon(struct vty *vty, struct cmd_token **argv, int argc,
const char *headline)
{
return ret;
}
+#pragma GCC diagnostic pop
static int show_one_daemon(struct vty *vty, struct cmd_token **argv, int argc,
const char *name)
{
static char buf[512];
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ /* prompt formatting has a %s in the cmd_node prompt string. */
snprintf(buf, sizeof(buf), cmd_prompt(vty->node), cmd_hostname_get());
+#pragma GCC diagnostic pop
return buf;
}
restart->kills = 0;
{
char cmd[strlen(command) + strlen(restart->name) + 1];
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ /* user supplied command string has a %s for the daemon name */
snprintf(cmd, sizeof(cmd), command, restart->name);
+#pragma GCC diagnostic pop
if ((restart->pid = run_background(cmd)) > 0) {
thread_add_timer(master, restart_kill, restart,
gs.restart_timeout, &restart->t_kill);
outname = sys.argv[2]
outdir = os.path.dirname(os.path.abspath(outname))
-if not os.path.isdir(outdir):
+try:
os.makedirs(outdir)
+except FileExistsError:
+ pass
# these are regexes to avoid a compile-time/host dependency on yang-tools
# or python-yang. Cross-compiling FRR is already somewhat involved, no need
ctxnhg->nexthop != NULL ? "" : " (empty)");
/* Set the flag about the dedicated fib list */
- SET_FLAG(re->status, ROUTE_ENTRY_USE_FIB_NHG);
- if (ctxnhg->nexthop)
- copy_nexthops(&(re->fib_ng.nexthop), ctxnhg->nexthop, NULL);
+ if (zrouter.asic_notification_nexthop_control) {
+ SET_FLAG(re->status, ROUTE_ENTRY_USE_FIB_NHG);
+ if (ctxnhg->nexthop)
+ copy_nexthops(&(re->fib_ng.nexthop), ctxnhg->nexthop,
+ NULL);
+ }
check_backups: