diff options
65 files changed, 464 insertions, 276 deletions
diff --git a/Makefile.am b/Makefile.am index 6dc8e0d354..1e3311fa7b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -110,6 +110,7 @@ dist_examples_DATA = dist_yangmodels_DATA = man_MANS = vtysh_scan = +clippy_scan = ## libtool, the self-made GNU scourge ## ... this should fix relinking @@ -183,6 +184,8 @@ EXTRA_DIST += \ \ python/clidef.py \ python/clippy/__init__.py \ + python/makevars.py \ + python/makefile.py \ \ redhat/frr.logrotate \ redhat/frr.pam \ diff --git a/babeld/subdir.am b/babeld/subdir.am index dd46675f22..7827e7dc58 100644 --- a/babeld/subdir.am +++ b/babeld/subdir.am @@ -7,9 +7,9 @@ noinst_LIBRARIES += babeld/libbabel.a sbin_PROGRAMS += babeld/babeld dist_examples_DATA += babeld/babeld.conf.sample vtysh_scan += \ - $(top_srcdir)/babeld/babel_interface.c \ - $(top_srcdir)/babeld/babel_zebra.c \ - $(top_srcdir)/babeld/babeld.c \ + babeld/babel_interface.c \ + babeld/babel_zebra.c \ + babeld/babeld.c \ # end endif diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c index 71d0a49f6d..f22e9277a1 100644 --- a/bfdd/bfdd_vty.c +++ b/bfdd/bfdd_vty.c @@ -878,9 +878,12 @@ DEFUN_NOSH(show_debugging_bfd, "BFD daemon\n") { vty_out(vty, "BFD debugging status:\n"); - vty_out(vty, " Peer events debugging.\n"); - vty_out(vty, " Zebra events debugging.\n"); - vty_out(vty, " Network layer debugging.\n"); + if (bglobal.debug_peer_event) + vty_out(vty, " Peer events debugging is on.\n"); + if (bglobal.debug_zebra) + vty_out(vty, " Zebra events debugging is on.\n"); + if (bglobal.debug_network) + vty_out(vty, " Network layer debugging is on.\n"); return CMD_SUCCESS; } diff --git a/bfdd/ptm_adapter.c b/bfdd/ptm_adapter.c index 4c88922b8a..7efbd2c7b8 100644 --- a/bfdd/ptm_adapter.c +++ b/bfdd/ptm_adapter.c @@ -24,6 +24,7 @@ #include "lib/queue.h" #include "lib/stream.h" #include "lib/zclient.h" +#include "lib/printfrr.h" #include "lib/bfd.h" @@ -105,12 +106,12 @@ static void debug_printbpc(const struct bfd_peer_cfg *bpc, const char *fmt, ...) snprintf(addr[2], sizeof(addr[2]), " vrf:%s", bpc->bpc_vrfname); if (bpc->bpc_has_recvinterval) - snprintf(timers[0], sizeof(timers[0]), " rx:%" PRIu64, - bpc->bpc_recvinterval); + snprintfrr(timers[0], sizeof(timers[0]), " rx:%" PRIu64, + bpc->bpc_recvinterval); if (bpc->bpc_has_txinterval) - snprintf(timers[1], sizeof(timers[1]), " tx:%" PRIu64, - bpc->bpc_recvinterval); + snprintfrr(timers[1], sizeof(timers[1]), " tx:%" PRIu64, + bpc->bpc_recvinterval); if (bpc->bpc_has_detectmultiplier) snprintf(timers[2], sizeof(timers[2]), " detect-multiplier:%d", diff --git a/bfdd/subdir.am b/bfdd/subdir.am index 254329e221..a79620c45c 100644 --- a/bfdd/subdir.am +++ b/bfdd/subdir.am @@ -6,8 +6,8 @@ if BFDD noinst_LIBRARIES += bfdd/libbfd.a sbin_PROGRAMS += bfdd/bfdd dist_examples_DATA += bfdd/bfdd.conf.sample -vtysh_scan += $(top_srcdir)/bfdd/bfdd_vty.c -vtysh_scan += $(top_srcdir)/bfdd/bfdd_cli.c +vtysh_scan += bfdd/bfdd_vty.c +vtysh_scan += bfdd/bfdd_cli.c man8 += $(MANBUILD)/frr-bfdd.8 endif @@ -25,11 +25,10 @@ bfdd_libbfd_a_SOURCES = \ bfdd/ptm_adapter.c \ # end -bfdd/bfdd_vty_clippy.c: $(CLIPPY_DEPS) -bfdd/bfdd_vty.$(OBJEXT): bfdd/bfdd_vty_clippy.c - -bfdd/bfdd_cli_clippy.c: $(CLIPPY_DEPS) -bfdd/bfdd_cli.$(OBJEXT): bfdd/bfdd_cli_clippy.c +clippy_scan += \ + bfdd/bfdd_cli.c \ + bfdd/bfdd_vty.c \ + # end noinst_HEADERS += \ bfdd/bfdctl.h \ diff --git a/bgpd/bgp_updgrp_adv.c b/bgpd/bgp_updgrp_adv.c index 6399bc93aa..b460690849 100644 --- a/bgpd/bgp_updgrp_adv.c +++ b/bgpd/bgp_updgrp_adv.c @@ -316,7 +316,7 @@ static int subgroup_coalesce_timer(struct thread *thread) zlog_debug("u%" PRIu64 ":s%" PRIu64 " announcing routes upon coalesce timer expiry(%u ms)", (SUBGRP_UPDGRP(subgrp))->id, subgrp->id, - subgrp->v_coalesce), + subgrp->v_coalesce); subgrp->t_coalesce = NULL; subgrp->v_coalesce = 0; subgroup_announce_route(subgrp); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index b7a7d2c382..d7c18ee0ad 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -73,8 +73,12 @@ #endif FRR_CFG_DEFAULT_BOOL(BGP_IMPORT_CHECK, - { .val_bool = true, .match_profile = "datacenter", }, - { .val_bool = false }, + { + .val_bool = false, + .match_profile = "traditional", + .match_version = "< 7.4", + }, + { .val_bool = true }, ) FRR_CFG_DEFAULT_BOOL(BGP_SHOW_HOSTNAME, { .val_bool = true, .match_profile = "datacenter", }, @@ -9050,10 +9054,12 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi, vty_out(vty, "EstdCnt DropCnt ResetTime Reason\n"); else vty_out(vty, - "V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd\n"); + "V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt\n"); } } + paf = peer_af_find(peer, afi, pfx_rcd_safi); + count++; /* Works for both failed & successful cases */ if (peer_dynamic_neighbor(peer)) @@ -9109,7 +9115,6 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi, json_object_int_add(json_peer, "pfxRcd", peer->pcount[afi][pfx_rcd_safi]); - paf = peer_af_find(peer, afi, pfx_rcd_safi); if (paf && PAF_SUBGRP(paf)) json_object_int_add(json_peer, "pfxSnt", @@ -9195,7 +9200,7 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi, peer_uptime(peer->uptime, timebuf, BGP_UPTIME_LEN, 0, NULL)); - if (peer->status == Established) + if (peer->status == Established) { if (peer->afc_recv[afi][safi]) vty_out(vty, " %12" PRIu32, peer->pcount @@ -9203,7 +9208,12 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi, [pfx_rcd_safi]); else vty_out(vty, " NoNeg"); - else { + + if (paf && PAF_SUBGRP(paf)) + vty_out(vty, " %8" PRIu32, + (PAF_SUBGRP(paf)) + ->scount); + } else { if (CHECK_FLAG(peer->flags, PEER_FLAG_SHUTDOWN)) vty_out(vty, " Idle (Admin)"); else if (CHECK_FLAG( @@ -9214,6 +9224,8 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi, vty_out(vty, " %12s", lookup_msg(bgp_status_msg, peer->status, NULL)); + + vty_out(vty, " %8" PRIu32, 0); } vty_out(vty, "\n"); } diff --git a/bgpd/subdir.am b/bgpd/subdir.am index ff15248a98..6b5c0fe719 100644 --- a/bgpd/subdir.am +++ b/bgpd/subdir.am @@ -12,29 +12,29 @@ dist_examples_DATA += \ bgpd/bgpd.conf.vnc.sample \ # end vtysh_scan += \ - $(top_srcdir)/bgpd/bgp_bfd.c \ - $(top_srcdir)/bgpd/bgp_debug.c \ - $(top_srcdir)/bgpd/bgp_dump.c \ - $(top_srcdir)/bgpd/bgp_evpn_vty.c \ - $(top_srcdir)/bgpd/bgp_filter.c \ - $(top_srcdir)/bgpd/bgp_mplsvpn.c \ - $(top_srcdir)/bgpd/bgp_nexthop.c \ - $(top_srcdir)/bgpd/bgp_route.c \ - $(top_srcdir)/bgpd/bgp_routemap.c \ - $(top_srcdir)/bgpd/bgp_vty.c \ - $(top_srcdir)/bgpd/bgp_flowspec_vty.c \ + bgpd/bgp_bfd.c \ + bgpd/bgp_debug.c \ + bgpd/bgp_dump.c \ + bgpd/bgp_evpn_vty.c \ + bgpd/bgp_filter.c \ + bgpd/bgp_mplsvpn.c \ + bgpd/bgp_nexthop.c \ + bgpd/bgp_route.c \ + bgpd/bgp_routemap.c \ + bgpd/bgp_vty.c \ + bgpd/bgp_flowspec_vty.c \ # end # can be loaded as DSO - always include for vtysh -vtysh_scan += $(top_srcdir)/bgpd/bgp_rpki.c -vtysh_scan += $(top_srcdir)/bgpd/bgp_bmp.c +vtysh_scan += bgpd/bgp_rpki.c +vtysh_scan += bgpd/bgp_bmp.c if ENABLE_BGP_VNC vtysh_scan += \ - $(top_srcdir)/bgpd/rfapi/bgp_rfapi_cfg.c \ - $(top_srcdir)/bgpd/rfapi/rfapi.c \ - $(top_srcdir)/bgpd/rfapi/rfapi_vty.c \ - $(top_srcdir)/bgpd/rfapi/vnc_debug.c \ + bgpd/rfapi/bgp_rfapi_cfg.c \ + bgpd/rfapi/rfapi.c \ + bgpd/rfapi/rfapi_vty.c \ + bgpd/rfapi/vnc_debug.c \ # end endif if SNMP @@ -217,18 +217,12 @@ bgpd_bgpd_bmp_la_SOURCES = bgpd/bgp_bmp.c bgpd_bgpd_bmp_la_LIBADD = lib/libfrrcares.la bgpd_bgpd_bmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -bgpd/bgp_evpn_vty_clippy.c: $(CLIPPY_DEPS) -bgpd/bgp_evpn_vty.$(OBJEXT): bgpd/bgp_evpn_vty_clippy.c -bgpd/bgp_vty_clippy.c: $(CLIPPY_DEPS) -bgpd/bgp_vty.$(OBJEXT): bgpd/bgp_vty_clippy.c -bgpd/bgp_route_clippy.c: $(CLIPPY_DEPS) -bgpd/bgp_route.$(OBJEXT): bgpd/bgp_route_clippy.c -bgpd/bgp_debug_clippy.c: $(CLIPPY_DEPS) -bgpd/bgp_debug.$(OBJEXT): bgpd/bgp_debug_clippy.c -bgpd/bgp_routemap_clippy.c: $(CLIPPY_DEPS) -bgpd/bgp_routemap.$(OBJEXT): bgpd/bgp_routemap_clippy.c -bgpd/bgp_rpki_clippy.c: $(CLIPPY_DEPS) -$(AUTOMAKE_DUMMY)bgpd/bgpd_bgpd_rpki_la-bgp_rpki.lo: bgpd/bgp_rpki_clippy.c -$(AUTOMAKE_DUMMY)bgpd/bgpd_rpki_la-bgp_rpki.lo: bgpd/bgp_rpki_clippy.c -bgpd/bgp_bmp_clippy.c: $(CLIPPY_DEPS) -bgpd/bgp_bmp.lo: bgpd/bgp_bmp_clippy.c +clippy_scan += \ + bgpd/bgp_bmp.c \ + bgpd/bgp_debug.c \ + bgpd/bgp_evpn_vty.c \ + bgpd/bgp_route.c \ + bgpd/bgp_routemap.c \ + bgpd/bgp_rpki.c \ + bgpd/bgp_vty.c \ + # end diff --git a/configure.ac b/configure.ac index 6f7ca9defd..e1e23e224d 100755 --- a/configure.ac +++ b/configure.ac @@ -428,6 +428,9 @@ LT_INIT _LT_CONFIG_LIBTOOL([ patch -N -i "${srcdir}/m4/libtool-whole-archive.patch" libtool >&AS_MESSAGE_LOG_FD || \ AC_MSG_WARN([Could not patch libtool for static linking support. Loading modules into a statically linked daemon will fail.]) + sed -e 's%func_warning "relinking%true #\0%' -i libtool || true + sed -e 's%func_warning "remember to run%true #\0%' -i libtool || true + sed -e 's%func_warning ".*has not been installed in%true #\0%' -i libtool || true ]) if test "$enable_static_bin" = "yes"; then AC_LDFLAGS="-static" @@ -2402,7 +2405,13 @@ AM_CONDITIONAL([STATICD], [test "$enable_staticd" != "no"]) AM_CONDITIONAL([FABRICD], [test "$enable_fabricd" != "no"]) AM_CONDITIONAL([VRRPD], [test "$enable_vrrpd" != "no"]) -AC_CONFIG_FILES([Makefile],[sed -e 's/^#AUTODERP# //' -i Makefile]) +AC_CONFIG_FILES([Makefile],[ + test "$enable_dev_build" = "yes" && makefile_devbuild="--dev-build" + ${PYTHON} "${ac_abs_top_srcdir}/python/makefile.py" ${makefile_devbuild} || exit 1 +], [ + PYTHON="$PYTHON" + enable_dev_build="$enable_dev_build" +]) AC_CONFIG_FILES([ config.version diff --git a/doc/user/bgp.rst b/doc/user/bgp.rst index eb718007e8..8020aeeae3 100644 --- a/doc/user/bgp.rst +++ b/doc/user/bgp.rst @@ -908,6 +908,17 @@ Networks .. index:: no network A.B.C.D/M .. clicmd:: no network A.B.C.D/M +.. index:: [no] bgp network import-check +.. clicmd:: [no] bgp network import-check + + This configuration modifies the behavior of the network statement. + If you have this configured the underlying network must exist in + the rib. If you have the [no] form configured then BGP will not + check for the networks existence in the rib. For versions 7.3 and + before frr defaults for datacenter were the network must exist, + traditional did not check for existence. For versions 7.4 and beyond + both traditional and datacenter the network must exist. + .. _bgp-route-aggregation: Route Aggregation diff --git a/eigrpd/subdir.am b/eigrpd/subdir.am index e59c88b471..8b86b9c8a7 100644 --- a/eigrpd/subdir.am +++ b/eigrpd/subdir.am @@ -7,11 +7,11 @@ noinst_LIBRARIES += eigrpd/libeigrp.a sbin_PROGRAMS += eigrpd/eigrpd dist_examples_DATA += eigrpd/eigrpd.conf.sample vtysh_scan += \ - $(top_srcdir)/eigrpd/eigrp_cli.c \ - $(top_srcdir)/eigrpd/eigrp_dump.c \ - $(top_srcdir)/eigrpd/eigrp_vty.c \ + eigrpd/eigrp_cli.c \ + eigrpd/eigrp_dump.c \ + eigrpd/eigrp_vty.c \ # end -# $(top_srcdir)/eigrpd/eigrp_routemap.c +# eigrpd/eigrp_routemap.c man8 += $(MANBUILD)/frr-eigrpd.8 endif @@ -48,11 +48,10 @@ eigrpdheader_HEADERS = \ eigrpd/eigrpd.h \ # end -eigrpd/eigrp_vty_clippy.c: $(CLIPPY_DEPS) -eigrpd/eigrp_vty.$(OBJEXT): eigrpd/eigrp_vty_clippy.c - -eigrpd/eigrp_cli_clippy.c: $(CLIPPY_DEPS) -eigrpd/eigrp_cli.$(OBJEXT): eigrpd/eigrp_cli_clippy.c +clippy_scan += \ + eigrpd/eigrp_cli.c \ + eigrpd/eigrp_vty.c \ + # end noinst_HEADERS += \ eigrpd/eigrp_const.h \ diff --git a/isisd/subdir.am b/isisd/subdir.am index 5dddb7d345..94f9116d34 100644 --- a/isisd/subdir.am +++ b/isisd/subdir.am @@ -7,12 +7,12 @@ noinst_LIBRARIES += isisd/libisis.a sbin_PROGRAMS += isisd/isisd dist_examples_DATA += isisd/isisd.conf.sample vtysh_scan += \ - $(top_srcdir)/isisd/isis_cli.c \ - $(top_srcdir)/isisd/isis_redist.c \ - $(top_srcdir)/isisd/isis_spf.c \ - $(top_srcdir)/isisd/isis_te.c \ - $(top_srcdir)/isisd/isis_vty_fabricd.c \ - $(top_srcdir)/isisd/isisd.c \ + isisd/isis_cli.c \ + isisd/isis_redist.c \ + isisd/isis_spf.c \ + isisd/isis_te.c \ + isisd/isis_vty_fabricd.c \ + isisd/isisd.c \ # end man8 += $(MANBUILD)/frr-isisd.8 endif @@ -106,8 +106,9 @@ isisd_libisis_a_SOURCES = \ isisd/isis_cli.c \ #end -isisd/isis_cli_clippy.c: $(CLIPPY_DEPS) -isisd/isis_cli.$(OBJEXT): isisd/isis_cli_clippy.c +clippy_scan += \ + isisd/isis_cli.c \ + # end isisd_isisd_LDADD = isisd/libisis.a $(ISIS_LDADD_COMMON) isisd_isisd_SOURCES = $(ISIS_SOURCES) diff --git a/ldpd/subdir.am b/ldpd/subdir.am index f464bad9e7..09936e5c28 100644 --- a/ldpd/subdir.am +++ b/ldpd/subdir.am @@ -6,7 +6,7 @@ if LDPD noinst_LIBRARIES += ldpd/libldp.a sbin_PROGRAMS += ldpd/ldpd dist_examples_DATA += ldpd/ldpd.conf.sample -vtysh_scan += $(top_srcdir)/ldpd/ldp_vty_cmds.c +vtysh_scan += ldpd/ldp_vty_cmds.c man8 += $(MANBUILD)/frr-ldpd.8 endif @@ -40,8 +40,9 @@ ldpd_libldp_a_SOURCES = \ ldpd/util.c \ # end -ldpd/ldp_vty_cmds_clippy.c: $(CLIPPY_DEPS) -ldpd/ldp_vty_cmds.$(OBJEXT): ldpd/ldp_vty_cmds_clippy.c +clippy_scan += \ + ldpd/ldp_vty_cmds.c \ + # end noinst_HEADERS += \ ldpd/control.h \ diff --git a/lib/command.c b/lib/command.c index 38a7b3fe7c..d8a2270bc5 100644 --- a/lib/command.c +++ b/lib/command.c @@ -967,7 +967,6 @@ int cmd_execute_command(vector vline, struct vty *vty, return saved_ret; if (ret != CMD_SUCCESS && ret != CMD_WARNING - && ret != CMD_ERR_AMBIGUOUS && ret != CMD_ERR_INCOMPLETE && ret != CMD_NOT_MY_INSTANCE && ret != CMD_WARNING_CONFIG_FAILED) { /* This assumes all nodes above CONFIG_NODE are childs of * CONFIG_NODE */ @@ -979,7 +978,6 @@ int cmd_execute_command(vector vline, struct vty *vty, ret = cmd_execute_command_real(vline, FILTER_RELAXED, vty, cmd); if (ret == CMD_SUCCESS || ret == CMD_WARNING - || ret == CMD_ERR_AMBIGUOUS || ret == CMD_ERR_INCOMPLETE || ret == CMD_NOT_MY_INSTANCE || ret == CMD_WARNING_CONFIG_FAILED) return ret; @@ -1164,7 +1162,6 @@ int command_config_read_one_line(struct vty *vty, if (!(use_daemon && ret == CMD_SUCCESS_DAEMON) && !(!use_daemon && ret == CMD_ERR_NOTHING_TODO) && ret != CMD_SUCCESS && ret != CMD_WARNING - && ret != CMD_ERR_AMBIGUOUS && ret != CMD_ERR_INCOMPLETE && ret != CMD_NOT_MY_INSTANCE && ret != CMD_WARNING_CONFIG_FAILED && vty->node != CONFIG_NODE) { int saved_node = vty->node; @@ -1173,7 +1170,6 @@ int command_config_read_one_line(struct vty *vty, while (!(use_daemon && ret == CMD_SUCCESS_DAEMON) && !(!use_daemon && ret == CMD_ERR_NOTHING_TODO) && ret != CMD_SUCCESS && ret != CMD_WARNING - && ret != CMD_ERR_AMBIGUOUS && ret != CMD_ERR_INCOMPLETE && vty->node > CONFIG_NODE) { vty->node = node_parent(vty->node); if (vty->xpath_index > 0) diff --git a/lib/srv6.c b/lib/srv6.c index be340f13f5..287bf56089 100644 --- a/lib/srv6.c +++ b/lib/srv6.c @@ -17,6 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "zebra.h" + #include "srv6.h" #include "log.h" diff --git a/lib/subdir.am b/lib/subdir.am index f3f709fd24..2f8cbe5d52 100644 --- a/lib/subdir.am +++ b/lib/subdir.am @@ -125,41 +125,36 @@ nodist_lib_libfrr_la_SOURCES = \ # end vtysh_scan += \ - $(top_srcdir)/lib/distribute.c \ - $(top_srcdir)/lib/filter.c \ - $(top_srcdir)/lib/if.c \ - $(top_srcdir)/lib/if_rmap.c \ - $(top_srcdir)/lib/keychain.c \ - $(top_srcdir)/lib/lib_vty.c \ - $(top_srcdir)/lib/nexthop_group.c \ - $(top_srcdir)/lib/plist.c \ - $(top_srcdir)/lib/routemap.c \ - $(top_srcdir)/lib/routemap_cli.c \ - $(top_srcdir)/lib/vrf.c \ - $(top_srcdir)/lib/vty.c \ + lib/distribute.c \ + lib/filter.c \ + lib/if.c \ + lib/if_rmap.c \ + lib/keychain.c \ + lib/lib_vty.c \ + lib/nexthop_group.c \ + lib/plist.c \ + lib/routemap.c \ + lib/routemap_cli.c \ + lib/vrf.c \ + lib/vty.c \ # end # can be loaded as DSO - always include for vtysh -vtysh_scan += $(top_srcdir)/lib/agentx.c +vtysh_scan += lib/agentx.c if SQLITE3 lib_libfrr_la_LIBADD += $(SQLITE3_LIBS) lib_libfrr_la_SOURCES += lib/db.c endif -lib/if_clippy.c: $(CLIPPY_DEPS) -lib/if.lo: lib/if_clippy.c -lib/plist_clippy.c: $(CLIPPY_DEPS) -lib/plist.lo: lib/plist_clippy.c -lib/nexthop_group_clippy.c: $(CLIPPY_DEPS) -lib/nexthop_group.lo: lib/nexthop_group_clippy.c -lib/northbound_cli_clippy.c: $(CLIPPY_DEPS) -lib/northbound_cli.lo: lib/northbound_cli_clippy.c -lib/routemap_cli_clippy.c: $(CLIPPY_DEPS) -lib/routemap_cli.lo: lib/routemap_cli_clippy.c -lib/vty_clippy.c: $(CLIPPY_DEPS) -lib/vty.lo: lib/vty_clippy.c -lib/log_vty_clippy.c: $(CLIPPY_DEPS) -lib/log_vty.lo: lib/log_vty_clippy.c +clippy_scan += \ + lib/if.c \ + lib/log_vty.c \ + lib/nexthop_group.c \ + lib/northbound_cli.c \ + lib/plist.c \ + lib/routemap_cli.c \ + lib/vty.c \ + # end pkginclude_HEADERS += \ lib/agg_table.h \ diff --git a/lib/zlog.h b/lib/zlog.h index 904049c0f2..1c5013746b 100644 --- a/lib/zlog.h +++ b/lib/zlog.h @@ -47,7 +47,7 @@ extern int zlog_tmpdirfd; extern void vzlog(int prio, const char *fmt, va_list ap); -__attribute__ ((format (printf, 2, 3))) +PRINTFRR(2, 3) static inline void zlog(int prio, const char *fmt, ...) { va_list ap; diff --git a/m4/ax_python.m4 b/m4/ax_python.m4 index d293da5257..9f43ea0ab1 100644 --- a/m4/ax_python.m4 +++ b/m4/ax_python.m4 @@ -3,7 +3,7 @@ dnl 2019 David Lamparter for NetDEF, Inc. dnl SPDX-License-Identifier: GPL-2.0-or-later dnl the _ at the beginning will be cut off (to support the empty version string) -m4_define_default([_FRR_PY_VERS], [_3 _ _2 _3.8 _3.7 _3.6 _3.5 _3.4 _3.3 _3.2 _2.7]) +m4_define_default([_FRR_PY_VERS], [_3 _3.10 _3.9 _3.8 _3.7 _3.6 _3.5 _3.4 _3.3 _3.2 _ _2 _2.7]) dnl check basic interpreter properties (py2/py3) dnl doubles as simple check whether the interpreter actually works diff --git a/nhrpd/subdir.am b/nhrpd/subdir.am index 42a6380b17..8cfc25b7bd 100644 --- a/nhrpd/subdir.am +++ b/nhrpd/subdir.am @@ -4,7 +4,7 @@ if NHRPD sbin_PROGRAMS += nhrpd/nhrpd -vtysh_scan += $(top_srcdir)/nhrpd/nhrp_vty.c +vtysh_scan += nhrpd/nhrp_vty.c man8 += $(MANBUILD)/frr-nhrpd.8 endif diff --git a/ospf6d/subdir.am b/ospf6d/subdir.am index 570b077cb1..9bb6838310 100644 --- a/ospf6d/subdir.am +++ b/ospf6d/subdir.am @@ -7,21 +7,21 @@ noinst_LIBRARIES += ospf6d/libospf6.a sbin_PROGRAMS += ospf6d/ospf6d dist_examples_DATA += ospf6d/ospf6d.conf.sample vtysh_scan += \ - $(top_srcdir)/ospf6d/ospf6_abr.c \ - $(top_srcdir)/ospf6d/ospf6_asbr.c \ - $(top_srcdir)/ospf6d/ospf6_area.c \ - $(top_srcdir)/ospf6d/ospf6_bfd.c \ - $(top_srcdir)/ospf6d/ospf6_flood.c \ - $(top_srcdir)/ospf6d/ospf6_interface.c \ - $(top_srcdir)/ospf6d/ospf6_intra.c \ - $(top_srcdir)/ospf6d/ospf6_lsa.c \ - $(top_srcdir)/ospf6d/ospf6_message.c \ - $(top_srcdir)/ospf6d/ospf6_neighbor.c \ - $(top_srcdir)/ospf6d/ospf6_route.c \ - $(top_srcdir)/ospf6d/ospf6_spf.c \ - $(top_srcdir)/ospf6d/ospf6_top.c \ - $(top_srcdir)/ospf6d/ospf6_zebra.c \ - $(top_srcdir)/ospf6d/ospf6d.c \ + ospf6d/ospf6_abr.c \ + ospf6d/ospf6_asbr.c \ + ospf6d/ospf6_area.c \ + ospf6d/ospf6_bfd.c \ + ospf6d/ospf6_flood.c \ + ospf6d/ospf6_interface.c \ + ospf6d/ospf6_intra.c \ + ospf6d/ospf6_lsa.c \ + ospf6d/ospf6_message.c \ + ospf6d/ospf6_neighbor.c \ + ospf6d/ospf6_route.c \ + ospf6d/ospf6_spf.c \ + ospf6d/ospf6_top.c \ + ospf6d/ospf6_zebra.c \ + ospf6d/ospf6d.c \ # end if SNMP module_LTLIBRARIES += ospf6d/ospf6d_snmp.la diff --git a/ospfd/subdir.am b/ospfd/subdir.am index 6de4099c5b..447ddf9cbb 100644 --- a/ospfd/subdir.am +++ b/ospfd/subdir.am @@ -7,14 +7,14 @@ noinst_LIBRARIES += ospfd/libfrrospf.a sbin_PROGRAMS += ospfd/ospfd dist_examples_DATA += ospfd/ospfd.conf.sample vtysh_scan += \ - $(top_srcdir)/ospfd/ospf_bfd.c \ - $(top_srcdir)/ospfd/ospf_dump.c \ - $(top_srcdir)/ospfd/ospf_opaque.c \ - $(top_srcdir)/ospfd/ospf_ri.c \ - $(top_srcdir)/ospfd/ospf_routemap.c \ - $(top_srcdir)/ospfd/ospf_te.c \ - $(top_srcdir)/ospfd/ospf_sr.c \ - $(top_srcdir)/ospfd/ospf_vty.c \ + ospfd/ospf_bfd.c \ + ospfd/ospf_dump.c \ + ospfd/ospf_opaque.c \ + ospfd/ospf_ri.c \ + ospfd/ospf_routemap.c \ + ospfd/ospf_te.c \ + ospfd/ospf_sr.c \ + ospfd/ospf_vty.c \ # end if SNMP module_LTLIBRARIES += ospfd/ospfd_snmp.la @@ -72,8 +72,9 @@ ospfdheader_HEADERS = \ # end endif -ospfd/ospf_vty_clippy.c: $(CLIPPY_DEPS) -ospfd/ospf_vty.$(OBJEXT): ospfd/ospf_vty_clippy.c +clippy_scan += \ + ospfd/ospf_vty.c \ + # end noinst_HEADERS += \ ospfd/ospf_abr.h \ diff --git a/pbrd/subdir.am b/pbrd/subdir.am index c55f0b41cc..42f279988b 100644 --- a/pbrd/subdir.am +++ b/pbrd/subdir.am @@ -7,8 +7,8 @@ noinst_LIBRARIES += pbrd/libpbr.a sbin_PROGRAMS += pbrd/pbrd dist_examples_DATA += pbrd/pbrd.conf.sample vtysh_scan += \ - $(top_srcdir)/pbrd/pbr_vty.c \ - $(top_srcdir)/pbrd/pbr_debug.c \ + pbrd/pbr_vty.c \ + pbrd/pbr_debug.c \ # end man8 += $(MANBUILD)/frr-pbrd.8 endif @@ -33,11 +33,10 @@ noinst_HEADERS += \ pbrd/pbr_vrf.h \ # end -pbrd/pbr_vty_clippy.c: $(CLIPPY_DEPS) -pbrd/pbr_vty.$(OBJEXT): pbrd/pbr_vty_clippy.c - -pbrd/pbr_debug_clippy.c: $(CLIPPY_DEPS) -pbrd/pbr_debug.$(OBJEXT): pbrd/pbr_debug_clippy.c +clippy_scan += \ + pbrd/pbr_debug.c \ + pbrd/pbr_vty.c \ + # end pbrd_pbrd_SOURCES = pbrd/pbr_main.c pbrd_pbrd_LDADD = pbrd/libpbr.a lib/libfrr.la $(LIBCAP) diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index fe9b5e1beb..76ee18ee84 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -5825,7 +5825,7 @@ static void show_mroute(struct pim_instance *pim, struct vty *vty, json = json_object_new_object(); } else { vty_out(vty, "IP Multicast Routing Table\n"); - vty_out(vty, "Flags: S- Sparse, C - Connected, P - Pruned\n"); + vty_out(vty, "Flags: S - Sparse, C - Connected, P - Pruned\n"); vty_out(vty, " R - RP-bit set, F - Register flag, T - SPT-bit set\n"); vty_out(vty, diff --git a/pimd/pim_igmp_mtrace.c b/pimd/pim_igmp_mtrace.c index 1cecd976cd..cac6fab271 100644 --- a/pimd/pim_igmp_mtrace.c +++ b/pimd/pim_igmp_mtrace.c @@ -271,11 +271,10 @@ static uint32_t query_arrival_time(void) struct timeval tv; uint32_t qat; - char m_qat[] = "Query arrival time lookup failed: errno=%d: %s"; - if (gettimeofday(&tv, NULL) < 0) { if (PIM_DEBUG_MTRACE) - zlog_warn(m_qat, errno, safe_strerror(errno)); + zlog_warn("Query arrival time lookup failed: errno=%d: %s", + errno, safe_strerror(errno)); return 0; } /* not sure second offset correct, as I get different value */ diff --git a/pimd/subdir.am b/pimd/subdir.am index 0e30590079..121abea598 100644 --- a/pimd/subdir.am +++ b/pimd/subdir.am @@ -8,7 +8,7 @@ sbin_PROGRAMS += pimd/pimd bin_PROGRAMS += pimd/mtracebis noinst_PROGRAMS += pimd/test_igmpv3_join dist_examples_DATA += pimd/pimd.conf.sample -vtysh_scan += $(top_srcdir)/pimd/pim_cmd.c +vtysh_scan += pimd/pim_cmd.c man8 += $(MANBUILD)/frr-pimd.8 man8 += $(MANBUILD)/mtracebis.8 endif @@ -123,8 +123,9 @@ noinst_HEADERS += \ pimd/mtracebis_routeget.h \ # end -pimd/pim_cmd_clippy.c: $(CLIPPY_DEPS) -pimd/pim_cmd.$(OBJEXT): pimd/pim_cmd_clippy.c +clippy_scan += \ + pimd/pim_cmd.c \ + # end pimd_pimd_LDADD = pimd/libpim.a lib/libfrr.la $(LIBCAP) pimd_pimd_SOURCES = pimd/pim_main.c diff --git a/python/firstheader.py b/python/firstheader.py new file mode 100644 index 0000000000..19a85b63e5 --- /dev/null +++ b/python/firstheader.py @@ -0,0 +1,30 @@ +# +# check that the first header included in C files is either +# zebra.h or config.h +# + +import sys, os, re, subprocess + +include_re = re.compile('^#\s*include\s+["<]([^ ">]+)[">]', re.M) + +errors = 0 + +files = subprocess.check_output(['git', 'ls-files']).decode('ASCII') +for fn in files.splitlines(): + if not fn.endswith('.c'): + continue + if fn.startswith('tools/'): + continue + with open(fn, 'r') as fd: + data = fd.read() + m = include_re.search(data) + if m is None: + #sys.stderr.write('no #include in %s?\n' % (fn)) + continue + if m.group(1) in ['config.h', 'zebra.h', 'lib/zebra.h']: + continue + sys.stderr.write('%s: %s\n' % (fn, m.group(0))) + errors += 1 + +if errors: + sys.exit(1) diff --git a/python/makefile.py b/python/makefile.py new file mode 100644 index 0000000000..9af397d373 --- /dev/null +++ b/python/makefile.py @@ -0,0 +1,100 @@ +#!/usr/bin/python3 +# +# FRR extended automake/Makefile functionality helper +# +# This script is executed on/after generating Makefile to add some pieces for +# clippy. + +import sys +import os +import subprocess +import re +import argparse +from string import Template + +argp = argparse.ArgumentParser(description = 'FRR Makefile extensions') +argp.add_argument('--dev-build', action = 'store_const', const = True, + help = 'run additional developer checks') +args = argp.parse_args() + +with open('Makefile', 'r') as fd: + before = fd.read() + +nolinecont = before.replace('\\\n', '') +m = re.search('^clippy_scan\s*=([^#]*)(?:#.*)?$', nolinecont, flags=re.MULTILINE) +if m is None: + sys.stderr.write('failed to parse Makefile.in\n') + sys.exit(2) + +clippy_scan = m.group(1).strip().split() +for clippy_file in clippy_scan: + assert clippy_file.endswith('.c') + +# check for files using clippy but not listed in clippy_scan +if args.dev_build: + basepath = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + if os.path.exists(os.path.join(basepath, '.git')): + clippy_ref = subprocess.check_output([ + 'git', '-C', basepath, 'grep', '-l', '-P', '^#\s*include.*_clippy.c', '--', '**.c']).decode('US-ASCII') + + clippy_ref = set(clippy_ref.splitlines()) + missing = clippy_ref - set(clippy_scan) + + if len(missing) > 0: + sys.stderr.write('error: files seem to be using clippy, but not listed in "clippy_scan" in subdir.am:\n\t%s\n' % ('\n\t'.join(sorted(missing)))) + sys.exit(1) + +clippydep = Template(''' +${clippybase}.$$(OBJEXT): ${clippybase}_clippy.c +${clippybase}.lo: ${clippybase}_clippy.c +${clippybase}_clippy.c: $$(CLIPPY_DEPS)''') + +clippyauxdep = Template('''# clippy{ +# auxiliary clippy target +${target}: ${clippybase}_clippy.c +# }clippy''') + +lines = before.splitlines() +autoderp = '#AUTODERP# ' +out_lines = [] +make_rule_re = re.compile('^([^:\s]+):\s*([^:\s]+)\s*($|\n)') + +while lines: + line = lines.pop(0) + if line.startswith(autoderp): + line = line[len(autoderp):] + + if line == '# clippy{': + while lines: + line = lines.pop(0) + if line == '# }clippy': + break + continue + + if line.startswith('#'): + out_lines.append(line) + continue + + m = make_rule_re.match(line) + if m is None: + out_lines.append(line) + continue + + if m.group(2) in clippy_scan: + out_lines.append(clippyauxdep.substitute(target=m.group(1), clippybase=m.group(2)[:-2])) + + out_lines.append(line) + +out_lines.append('# clippy{\n# main clippy targets') +for clippy_file in clippy_scan: + out_lines.append(clippydep.substitute(clippybase = clippy_file[:-2])) +out_lines.append('# }clippy') +out_lines.append('') + +after = '\n'.join(out_lines) +if after == before: + sys.exit(0) + +with open('Makefile.pyout', 'w') as fd: + fd.write(after) +os.rename('Makefile.pyout', 'Makefile') diff --git a/python/makevars.py b/python/makevars.py new file mode 100644 index 0000000000..e0e2031a0d --- /dev/null +++ b/python/makevars.py @@ -0,0 +1,50 @@ +# +# helper class to grab variables from FRR's Makefile +# + +import os +import subprocess + +class MakeVars(object): + ''' + makevars['FOO_CFLAGS'] gets you "FOO_CFLAGS" from Makefile + ''' + def __init__(self): + self._data = dict() + + def getvars(self, varlist): + ''' + get a batch list of variables from make. faster than individual calls. + ''' + rdfd, wrfd = os.pipe() + + shvars = ['shvar-%s' % s for s in varlist] + make = subprocess.Popen(['make', '-s', 'VARFD=%d' % wrfd] + shvars, pass_fds = [wrfd]) + os.close(wrfd) + data = b'' + + rdf = os.fdopen(rdfd, 'rb') + while True: + rdata = rdf.read() + if len(rdata) == 0: + break + data += rdata + + del rdf + make.wait() + + data = data.decode('US-ASCII').strip().split('\n') + for row in data: + k, v = row.split('=', 1) + v = v[1:-1] + self._data[k] = v + + def __getitem__(self, k): + if k not in self._data: + self.getvars([k]) + return self._data[k] + + def get(self, k, defval = None): + if k not in self._data: + self.getvars([k]) + return self._data[k] or defval diff --git a/ripd/subdir.am b/ripd/subdir.am index 00984672ed..9b86c65517 100644 --- a/ripd/subdir.am +++ b/ripd/subdir.am @@ -7,9 +7,9 @@ noinst_LIBRARIES += ripd/librip.a sbin_PROGRAMS += ripd/ripd dist_examples_DATA += ripd/ripd.conf.sample vtysh_scan += \ - $(top_srcdir)/ripd/rip_cli.c \ - $(top_srcdir)/ripd/rip_debug.c \ - $(top_srcdir)/ripd/ripd.c \ + ripd/rip_cli.c \ + ripd/rip_debug.c \ + ripd/ripd.c \ # end if SNMP @@ -35,8 +35,9 @@ ripd_librip_a_SOURCES = \ ripd/ripd.c \ # end -ripd/rip_cli_clippy.c: $(CLIPPY_DEPS) -ripd/rip_cli.$(OBJEXT): ripd/rip_cli_clippy.c +clippy_scan += \ + ripd/rip_cli.c \ + # end noinst_HEADERS += \ ripd/rip_debug.h \ diff --git a/ripngd/subdir.am b/ripngd/subdir.am index 4e219c9947..48ba361372 100644 --- a/ripngd/subdir.am +++ b/ripngd/subdir.am @@ -6,9 +6,9 @@ if RIPNGD noinst_LIBRARIES += ripngd/libripng.a sbin_PROGRAMS += ripngd/ripngd vtysh_scan += \ - $(top_srcdir)/ripngd/ripng_cli.c \ - $(top_srcdir)/ripngd/ripng_debug.c \ - $(top_srcdir)/ripngd/ripngd.c \ + ripngd/ripng_cli.c \ + ripngd/ripng_debug.c \ + ripngd/ripngd.c \ # end man8 += $(MANBUILD)/frr-ripngd.8 endif @@ -30,8 +30,9 @@ ripngd_libripng_a_SOURCES = \ ripngd/ripngd.c \ # end -ripngd/ripng_cli_clippy.c: $(CLIPPY_DEPS) -ripngd/ripng_cli.$(OBJEXT): ripngd/ripng_cli_clippy.c +clippy_scan += \ + ripngd/ripng_cli.c \ + # end noinst_HEADERS += \ ripngd/ripng_debug.h \ diff --git a/sharpd/subdir.am b/sharpd/subdir.am index 8b32b2370c..4c43c50d43 100644 --- a/sharpd/subdir.am +++ b/sharpd/subdir.am @@ -6,7 +6,7 @@ if SHARPD noinst_LIBRARIES += sharpd/libsharp.a sbin_PROGRAMS += sharpd/sharpd dist_examples_DATA += sharpd/sharpd.conf.sample -vtysh_scan += $(top_srcdir)/sharpd/sharp_vty.c +vtysh_scan += sharpd/sharp_vty.c man8 += $(MANBUILD)/frr-sharpd.8 endif @@ -24,8 +24,9 @@ noinst_HEADERS += \ sharpd/sharp_zebra.h \ # end -sharpd/sharp_vty_clippy.c: $(CLIPPY_DEPS) -sharpd/sharp_vty.$(OBJEXT): sharpd/sharp_vty_clippy.c +clippy_scan += \ + sharpd/sharp_vty.c \ + # end sharpd_sharpd_SOURCES = sharpd/sharp_main.c sharpd_sharpd_LDADD = sharpd/libsharp.a lib/libfrr.la $(LIBCAP) diff --git a/staticd/subdir.am b/staticd/subdir.am index 30c69231c9..f2b3d11f29 100644 --- a/staticd/subdir.am +++ b/staticd/subdir.am @@ -6,7 +6,7 @@ if STATICD noinst_LIBRARIES += staticd/libstatic.a sbin_PROGRAMS += staticd/staticd dist_examples_DATA += staticd/staticd.conf.sample -vtysh_scan += $(top_srcdir)/staticd/static_vty.c +vtysh_scan += staticd/static_vty.c man8 += $(MANBUILD)/frr-staticd.8 endif @@ -30,8 +30,9 @@ noinst_HEADERS += \ staticd/static_vrf.h \ # end -staticd/static_vty_clippy.c: $(CLIPPY_DEPS) -staticd/static_vty.$(OBJEXT): staticd/static_vty_clippy.c +clippy_scan += \ + staticd/static_vty.c \ + # end staticd_staticd_SOURCES = staticd/static_main.c staticd_staticd_LDADD = staticd/libstatic.a lib/libfrr.la $(LIBCAP) diff --git a/tests/bgpd/test_mpath.c b/tests/bgpd/test_mpath.c index 2258df9491..87c214969f 100644 --- a/tests/bgpd/test_mpath.c +++ b/tests/bgpd/test_mpath.c @@ -315,7 +315,7 @@ static int setup_bgp_path_info_mpath_update(testcase_t *t) str2prefix("42.1.1.0/24", &test_rn.p); rt_node = bgp_node_to_rnode(&test_rn); memcpy((struct route_table *)&rt_node->table, &rt->route_table, - sizeof(struct route_table)); + sizeof(struct route_table *)); setup_bgp_mp_list(t); for (i = 0; i < test_mp_list_info_count; i++) bgp_path_info_add(&test_rn, &test_mp_list_info[i]); diff --git a/tests/subdir.am b/tests/subdir.am index 5efdcbbd4c..04053a6f46 100644 --- a/tests/subdir.am +++ b/tests/subdir.am @@ -38,13 +38,10 @@ else TESTS_OSPF6D = endif -tests/lib/cli/test_cli_clippy.c: $(CLIPPY_DEPS) -tests/lib/cli/tests_lib_cli_test_cli-test_cli.$(OBJEXT): tests/lib/cli/test_cli_clippy.c -tests/lib/cli/test_cli-test_cli.$(OBJEXT): tests/lib/cli/test_cli_clippy.c - -tests/ospf6d/test_lsdb_clippy.c: $(CLIPPY_DEPS) -tests/ospf6d/tests_ospf6d_test_lsdb-test_lsdb.$(OBJEXT): tests/ospf6d/test_lsdb_clippy.c -tests/ospf6d/test_lsdb-test_lsdb.$(OBJEXT): tests/ospf6d/test_lsdb_clippy.c +clippy_scan += \ + tests/lib/cli/test_cli.c \ + tests/ospf6d/test_lsdb.c \ + # end check_PROGRAMS = \ tests/lib/cxxcompat \ diff --git a/tests/topotests/all-protocol-startup/r1/bgpd.conf b/tests/topotests/all-protocol-startup/r1/bgpd.conf index 7a7bba7ae7..e000b4e625 100644 --- a/tests/topotests/all-protocol-startup/r1/bgpd.conf +++ b/tests/topotests/all-protocol-startup/r1/bgpd.conf @@ -5,6 +5,7 @@ router bgp 100 bgp router-id 192.168.0.1 bgp log-neighbor-changes no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.7.10 remote-as 100 neighbor 192.168.7.20 remote-as 200 neighbor fc00:0:0:8::1000 remote-as 100 @@ -48,4 +49,4 @@ line vty route-map LIES deny 10 match interface notpresent -!
\ No newline at end of file +! diff --git a/tests/topotests/all-protocol-startup/r1/show_bgp_ipv6_summary.ref b/tests/topotests/all-protocol-startup/r1/show_bgp_ipv6_summary.ref index 3b140e3698..1e41263e78 100644 --- a/tests/topotests/all-protocol-startup/r1/show_bgp_ipv6_summary.ref +++ b/tests/topotests/all-protocol-startup/r1/show_bgp_ipv6_summary.ref @@ -3,6 +3,6 @@ BGP table version 1 RIB entries 1, using XXXX bytes of memory Peers 2, using XXXX KiB of memory -Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd -fc00:0:0:8::1000 4 100 0 0 0 0 0 never Active -fc00:0:0:8::2000 4 200 0 0 0 0 0 never Active +Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt +fc00:0:0:8::1000 4 100 0 0 0 0 0 never Active 0 +fc00:0:0:8::2000 4 200 0 0 0 0 0 never Active 0 diff --git a/tests/topotests/all-protocol-startup/r1/show_ip_bgp_summary.ref b/tests/topotests/all-protocol-startup/r1/show_ip_bgp_summary.ref index 7a246b1149..3ffbf3ff42 100644 --- a/tests/topotests/all-protocol-startup/r1/show_ip_bgp_summary.ref +++ b/tests/topotests/all-protocol-startup/r1/show_ip_bgp_summary.ref @@ -3,8 +3,8 @@ BGP table version 1 RIB entries 1, using XXXX bytes of memory Peers 4, using XXXX KiB of memory -Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd -192.168.7.10 4 100 0 0 0 0 0 never Active -192.168.7.20 4 200 0 0 0 0 0 never Active -fc00:0:0:8::1000 4 100 0 0 0 0 0 never Active -fc00:0:0:8::2000 4 200 0 0 0 0 0 never Active +Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt +192.168.7.10 4 100 0 0 0 0 0 never Active 0 +192.168.7.20 4 200 0 0 0 0 0 never Active 0 +fc00:0:0:8::1000 4 100 0 0 0 0 0 never Active 0 +fc00:0:0:8::2000 4 200 0 0 0 0 0 never Active 0 diff --git a/tests/topotests/bfd-bgp-cbit-topo3/r1/bgpd.conf b/tests/topotests/bfd-bgp-cbit-topo3/r1/bgpd.conf index f69b3c4ba3..82b189b292 100644 --- a/tests/topotests/bfd-bgp-cbit-topo3/r1/bgpd.conf +++ b/tests/topotests/bfd-bgp-cbit-topo3/r1/bgpd.conf @@ -2,6 +2,7 @@ debug bgp neighbor-events router bgp 101 bgp router-id 10.254.254.1 no bgp ebgp-requires-policy + no bgp network import-check timers bgp 8 24 bgp graceful-restart neighbor 2001:db8:4::1 remote-as 102 diff --git a/tests/topotests/bfd-bgp-cbit-topo3/r3/bgpd.conf b/tests/topotests/bfd-bgp-cbit-topo3/r3/bgpd.conf index 51b611b2a7..e566e08f7d 100644 --- a/tests/topotests/bfd-bgp-cbit-topo3/r3/bgpd.conf +++ b/tests/topotests/bfd-bgp-cbit-topo3/r3/bgpd.conf @@ -2,6 +2,7 @@ debug bgp neighbor-events router bgp 102 bgp router-id 10.254.254.3 no bgp ebgp-requires-policy + no bgp network import-check timers bgp 20 60 bgp graceful-restart ! simulate NSF machine diff --git a/tests/topotests/bfd-topo1/r1/bgpd.conf b/tests/topotests/bfd-topo1/r1/bgpd.conf index 87f20d29e9..25e16a6e0c 100644 --- a/tests/topotests/bfd-topo1/r1/bgpd.conf +++ b/tests/topotests/bfd-topo1/r1/bgpd.conf @@ -1,5 +1,6 @@ router bgp 101 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.0.2 remote-as 102 neighbor 192.168.0.2 bfd address-family ipv4 unicast diff --git a/tests/topotests/bfd-topo1/r2/bgpd.conf b/tests/topotests/bfd-topo1/r2/bgpd.conf index f87e12f0a7..693fb93411 100644 --- a/tests/topotests/bfd-topo1/r2/bgpd.conf +++ b/tests/topotests/bfd-topo1/r2/bgpd.conf @@ -1,5 +1,6 @@ router bgp 102 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.0.1 remote-as 101 neighbor 192.168.0.1 bfd neighbor 192.168.1.1 remote-as 103 diff --git a/tests/topotests/bfd-topo1/r3/bgpd.conf b/tests/topotests/bfd-topo1/r3/bgpd.conf index 0340e067f1..7584f98803 100644 --- a/tests/topotests/bfd-topo1/r3/bgpd.conf +++ b/tests/topotests/bfd-topo1/r3/bgpd.conf @@ -1,5 +1,6 @@ router bgp 103 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.1.2 remote-as 102 neighbor 192.168.1.2 bfd address-family ipv4 unicast diff --git a/tests/topotests/bfd-topo1/r4/bgpd.conf b/tests/topotests/bfd-topo1/r4/bgpd.conf index 980d927e97..3c68e7eec9 100644 --- a/tests/topotests/bfd-topo1/r4/bgpd.conf +++ b/tests/topotests/bfd-topo1/r4/bgpd.conf @@ -1,5 +1,6 @@ router bgp 104 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.2.2 remote-as 102 neighbor 192.168.2.2 bfd address-family ipv4 unicast diff --git a/tests/topotests/bfd-vrf-topo1/r1/bgpd.conf b/tests/topotests/bfd-vrf-topo1/r1/bgpd.conf index 136e53a43f..439c58fb2a 100644 --- a/tests/topotests/bfd-vrf-topo1/r1/bgpd.conf +++ b/tests/topotests/bfd-vrf-topo1/r1/bgpd.conf @@ -1,5 +1,6 @@ router bgp 101 vrf r1-cust1 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.0.2 remote-as 102 ! neighbor 192.168.0.2 ebgp-multihop 10 neighbor 192.168.0.2 bfd diff --git a/tests/topotests/bfd-vrf-topo1/r2/bgpd.conf b/tests/topotests/bfd-vrf-topo1/r2/bgpd.conf index 2bd13e22b2..4fac25d7bb 100644 --- a/tests/topotests/bfd-vrf-topo1/r2/bgpd.conf +++ b/tests/topotests/bfd-vrf-topo1/r2/bgpd.conf @@ -1,5 +1,6 @@ router bgp 102 vrf r2-cust1 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.0.1 remote-as 101 neighbor 192.168.0.1 bfd neighbor 192.168.1.1 remote-as 103 diff --git a/tests/topotests/bfd-vrf-topo1/r3/bgpd.conf b/tests/topotests/bfd-vrf-topo1/r3/bgpd.conf index c0cd45f7fe..052707ae1b 100644 --- a/tests/topotests/bfd-vrf-topo1/r3/bgpd.conf +++ b/tests/topotests/bfd-vrf-topo1/r3/bgpd.conf @@ -1,5 +1,6 @@ router bgp 103 vrf r3-cust1 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.1.2 remote-as 102 neighbor 192.168.1.2 bfd address-family ipv4 unicast diff --git a/tests/topotests/bfd-vrf-topo1/r4/bgpd.conf b/tests/topotests/bfd-vrf-topo1/r4/bgpd.conf index fe1185768d..bcb0a17c01 100644 --- a/tests/topotests/bfd-vrf-topo1/r4/bgpd.conf +++ b/tests/topotests/bfd-vrf-topo1/r4/bgpd.conf @@ -1,5 +1,6 @@ router bgp 104 vrf r4-cust1 no bgp ebgp-requires-policy + no bgp network import-check neighbor 192.168.2.2 remote-as 102 neighbor 192.168.2.2 bfd address-family ipv4 unicast diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/ce1/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_direct/ce1/bgpd.conf index 4ce87f773b..c1bb7e3d15 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_direct/ce1/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/ce1/bgpd.conf @@ -6,6 +6,7 @@ log stdout notifications log monitor notifications log commands router bgp 5226 + no bgp network import-check bgp router-id 99.0.0.1 no bgp ebgp-requires-policy neighbor 192.168.1.1 remote-as 5226 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/ce2/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_direct/ce2/bgpd.conf index 0d5ec148b1..c889a4c596 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_direct/ce2/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/ce2/bgpd.conf @@ -6,6 +6,7 @@ log stdout notifications log monitor notifications log commands router bgp 5226 + no bgp network import-check bgp router-id 99.0.0.2 no bgp ebgp-requires-policy neighbor 192.168.1.1 remote-as 5226 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/ce3/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_direct/ce3/bgpd.conf index d58b9b1c90..36dd97190e 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_direct/ce3/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/ce3/bgpd.conf @@ -6,6 +6,7 @@ log stdout notifications log monitor notifications log commands router bgp 5226 + no bgp network import-check bgp router-id 99.0.0.3 no bgp ebgp-requires-policy neighbor 192.168.1.1 remote-as 5226 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf index 3786350996..c3309d8c75 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce1/bgpd.conf @@ -8,6 +8,7 @@ log commands log file bgpd.log router bgp 5227 + no bgp network import-check bgp router-id 99.0.0.1 no bgp ebgp-requires-policy neighbor 192.168.1.1 remote-as 5227 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf index ffe2d54f58..54401bfb2f 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce2/bgpd.conf @@ -8,6 +8,7 @@ log commands log file bgpd.log router bgp 5227 + no bgp network import-check bgp router-id 99.0.0.2 no bgp ebgp-requires-policy neighbor 192.168.1.1 remote-as 5227 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf index 31a00b8f73..f742fede1a 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce3/bgpd.conf @@ -8,6 +8,7 @@ log commands log file bgpd.log router bgp 5227 + no bgp network import-check bgp router-id 99.0.0.3 no bgp ebgp-requires-policy neighbor 192.168.1.1 remote-as 5227 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf index f57f96bec4..91311f32c5 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/ce4/bgpd.conf @@ -8,6 +8,7 @@ log commands log file bgpd.log router bgp 5228 vrf ce4-cust2 + no bgp network import-check bgp router-id 99.0.0.4 no bgp ebgp-requires-policy neighbor 192.168.2.1 remote-as 5228 diff --git a/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py b/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py index c342b17dd2..a2020ffa55 100755 --- a/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py +++ b/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py @@ -29,19 +29,19 @@ test_bgp_multiview_topo1.py: Simple Quagga/FRR Route-Server Test | peer1 | | peer2 | | peer3 | | peer4 | | peer5 | | AS 65001 | | AS 65002 | | AS 65003 | | AS 65004 | | AS 65005 | +-----+----+ +-----+----+ +-----+----+ +-----+----+ +-----+----+ - | .1 | .2 | .3 | .4 | .5 + | .1 | .2 | .3 | .4 | .5 | ______/ / / _________/ - \ / ________________/ / / - | | / _________________________/ / +----------+ + \ / ________________/ / / + | | / _________________________/ / +----------+ | | | / __________________________/ ___| peer6 | | | | | / ____________________________/.6 | AS 65006 | | | | | | / _________________________ +----------+ - | | | | | | / __________________ \ +----------+ + | | | | | | / __________________ \ +----------+ | | | | | | | / \ \___| peer7 | | | | | | | | | \ .7 | AS 65007 | ~~~~~~~~~~~~~~~~~~~~~ \ +----------+ ~~ SW1 ~~ \ +----------+ - ~~ Switch ~~ \_____| peer8 | + ~~ Switch ~~ \_____| peer8 | ~~ 172.16.1.0/24 ~~ .8 | AS 65008 | ~~~~~~~~~~~~~~~~~~~~~ +----------+ | @@ -49,7 +49,7 @@ test_bgp_multiview_topo1.py: Simple Quagga/FRR Route-Server Test +---------+---------+ | FRR R1 | | BGP Multi-View | - | Peer 1-3 > View 1 | + | Peer 1-3 > View 1 | | Peer 4-5 > View 2 | | Peer 6-8 > View 3 | +---------+---------+ @@ -226,7 +226,7 @@ def test_bgp_converge(): for i in range(1, 2): for view in range(1, 4): notConverged = net["r%s" % i].cmd( - 'vtysh -c "show ip bgp view %s summary" 2> /dev/null | grep ^[0-9] | grep -v " 11$"' + 'vtysh -c "show ip bgp view %s summary" 2> /dev/null | grep ^[0-9] | grep -vP " 11\s+(\d+)$"' % view ) if notConverged: diff --git a/tests/topotests/lib/bgp.py b/tests/topotests/lib/bgp.py index cafba60abf..87765e4db5 100644 --- a/tests/topotests/lib/bgp.py +++ b/tests/topotests/lib/bgp.py @@ -219,6 +219,7 @@ def __create_bgp_global(tgen, input_dict, router, build=False): if router_id: config_data.append("bgp router-id {}".format(router_id)) + config_data.append("no bgp network import-check") return config_data diff --git a/tools/frr-reload.py b/tools/frr-reload.py index 45843faf13..1f9f425386 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -1077,6 +1077,13 @@ def compare_context_objects(newconf, running): add_cmd = ('no ' + running_ctx_keys[0],) lines_to_add.append((add_cmd, None)) + # if this an interface sub-subcontext in an address-family block in ldpd and + # we are already deleting the whole context, then ignore this + elif (len(running_ctx_keys) > 2 and running_ctx_keys[0].startswith('mpls ldp') and + running_ctx_keys[1].startswith('address-family') and + (running_ctx_keys[:2], None) in lines_to_del): + continue + # Non-global context elif running_ctx_keys and not any("address-family" in key for key in running_ctx_keys): lines_to_del.append((running_ctx_keys, None)) diff --git a/tools/symalyzer.py b/tools/symalyzer.py index b3b5c4e567..cff21f9f93 100755 --- a/tools/symalyzer.py +++ b/tools/symalyzer.py @@ -21,49 +21,9 @@ import sys, os, subprocess import re from collections import namedtuple -class MakeVars(object): - ''' - makevars['FOO_CFLAGS'] gets you "FOO_CFLAGS" from Makefile - ''' - def __init__(self): - self._data = dict() +sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'python')) - def getvars(self, varlist): - ''' - get a batch list of variables from make. faster than individual calls. - ''' - rdfd, wrfd = os.pipe() - - shvars = ['shvar-%s' % s for s in varlist] - make = subprocess.Popen(['make', '-s', 'VARFD=%d' % wrfd] + shvars, pass_fds = [wrfd]) - os.close(wrfd) - data = b'' - - rdf = os.fdopen(rdfd, 'rb') - while True: - rdata = rdf.read() - if len(rdata) == 0: - break - data += rdata - - del rdf - make.wait() - - data = data.decode('US-ASCII').strip().split('\n') - for row in data: - k, v = row.split('=', 1) - v = v[1:-1] - self._data[k] = v - - def __getitem__(self, k): - if k not in self._data: - self.getvars([k]) - return self._data[k] - - def get(self, k, defval = None): - if k not in self._data: - self.getvars([k]) - return self._data[k] or defval +from makevars import MakeVars SymRowBase = namedtuple('SymRow', ['target', 'object', 'name', 'address', 'klass', 'typ', 'size', 'line', 'section', 'loc']) class SymRow(SymRowBase): @@ -324,7 +284,7 @@ def write_html_report(syms): else: with open('jquery-3.4.1.min.js.tmp', 'w') as fd: fd.write(r.text) - os.rename('jquery-3.4.1.min.js.tmp', 'jquery-3.4.1.min.js.tmp') + os.rename('jquery-3.4.1.min.js.tmp', 'jquery-3.4.1.min.js') sys.stderr.write('done.\n') def automake_escape(s): diff --git a/vrrpd/subdir.am b/vrrpd/subdir.am index 07358e0383..412ee1c3cf 100644 --- a/vrrpd/subdir.am +++ b/vrrpd/subdir.am @@ -6,7 +6,7 @@ if VRRPD noinst_LIBRARIES += vrrpd/libvrrp.a sbin_PROGRAMS += vrrpd/vrrpd # dist_examples_DATA += staticd/staticd.conf.sample -vtysh_scan += $(top_srcdir)/vrrpd/vrrp_vty.c +vtysh_scan += vrrpd/vrrp_vty.c man8 += $(MANBUILD)/frr-vrrpd.8 endif @@ -31,8 +31,9 @@ noinst_HEADERS += \ vrrpd/vrrp_zebra.h \ # end -vrrpd/vrrp_vty_clippy.c: $(CLIPPY_DEPS) -vrrpd/vrrp_vty.$(OBJEXT): vrrpd/vrrp_vty_clippy.c +clippy_scan += \ + vrrpd/vrrp_vty.c \ + # end vrrpd_vrrpd_SOURCES = vrrpd/vrrp_main.c vrrpd_vrrpd_LDADD = vrrpd/libvrrp.a lib/libfrr.la @LIBCAP@ diff --git a/vtysh/extract.pl.in b/vtysh/extract.pl.in index c4f293fd3b..d5142b1b55 100755 --- a/vtysh/extract.pl.in +++ b/vtysh/extract.pl.in @@ -138,7 +138,7 @@ sub scan_file { $protocol = "VTYSH_FABRICD"; } else { - ($protocol) = ($file =~ /^.*\/([a-z0-9]+)\/[a-zA-Z0-9_\-]+\.c$/); + ($protocol) = ($file =~ /^(?:.*\/)?([a-z0-9]+)\/[a-zA-Z0-9_\-]+\.c$/); $protocol = "VTYSH_" . uc $protocol; } @@ -197,7 +197,7 @@ sub scan_file { } foreach (@ARGV) { - if (/\/isisd\//) { + if (/(^|\/)isisd\//) { # We scan all the IS-IS files twice, once for isisd, # once for fabricd. Exceptions are made for the files # that are not shared between the two. diff --git a/vtysh/subdir.am b/vtysh/subdir.am index 74595788b0..3e9b8a3dc9 100644 --- a/vtysh/subdir.am +++ b/vtysh/subdir.am @@ -31,5 +31,5 @@ am__v_EXTRACT_ = $(am__v_EXTRACT_$(AM_DEFAULT_VERBOSITY)) am__v_EXTRACT_0 = @echo " EXTRACT " $@; am__v_EXTRACT_1 = -vtysh/vtysh_cmd.c: $(vtysh_scan) vtysh/extract.pl - $(AM_V_EXTRACT) vtysh/extract.pl $(vtysh_scan) > vtysh/vtysh_cmd.c +vtysh/vtysh_cmd.c: vtysh/extract.pl $(vtysh_scan) + $(AM_V_EXTRACT) $^ > vtysh/vtysh_cmd.c diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 2ef0347651..15ec866fc9 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -492,7 +492,6 @@ static int vtysh_execute_func(const char *line, int pager) */ while (ret != CMD_SUCCESS && ret != CMD_SUCCESS_DAEMON && ret != CMD_WARNING && ret != CMD_WARNING_CONFIG_FAILED - && ret != CMD_ERR_AMBIGUOUS && ret != CMD_ERR_INCOMPLETE && vty->node > CONFIG_NODE) { vty->node = node_parent(vty->node); ret = cmd_execute(vty, line, &cmd, 1); @@ -778,7 +777,6 @@ int vtysh_mark_file(const char *filename) */ while (ret != CMD_SUCCESS && ret != CMD_SUCCESS_DAEMON && ret != CMD_WARNING && ret != CMD_WARNING_CONFIG_FAILED - && ret != CMD_ERR_AMBIGUOUS && ret != CMD_ERR_INCOMPLETE && vty->node > CONFIG_NODE) { vty->node = node_parent(vty->node); ret = cmd_execute_command_strict(vline, vty, &cmd); diff --git a/watchfrr/subdir.am b/watchfrr/subdir.am index 36af57cf82..677f85efcb 100644 --- a/watchfrr/subdir.am +++ b/watchfrr/subdir.am @@ -4,7 +4,7 @@ if WATCHFRR sbin_PROGRAMS += watchfrr/watchfrr -vtysh_scan += $(top_srcdir)/watchfrr/watchfrr_vty.c +vtysh_scan += watchfrr/watchfrr_vty.c man8 += $(MANBUILD)/frr-watchfrr.8 endif @@ -20,5 +20,6 @@ watchfrr_watchfrr_SOURCES = \ watchfrr/watchfrr_vty.c \ # end -watchfrr/watchfrr_vty_clippy.c: $(CLIPPY_DEPS) -watchfrr/watchfrr_vty.$(OBJEXT): watchfrr/watchfrr_vty_clippy.c +clippy_scan += \ + watchfrr/watchfrr_vty.c \ + # end diff --git a/zebra/dplane_fpm_nl.c b/zebra/dplane_fpm_nl.c index 9f480926ae..32b7faaad7 100644 --- a/zebra/dplane_fpm_nl.c +++ b/zebra/dplane_fpm_nl.c @@ -19,6 +19,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifdef HAVE_CONFIG_H +#include "config.h" /* Include this explicitly */ +#endif + #include <arpa/inet.h> #include <sys/types.h> @@ -27,7 +31,6 @@ #include <errno.h> #include <string.h> -#include "config.h" /* Include this explicitly */ #include "lib/zebra.h" #include "lib/json.h" #include "lib/libfrr.h" diff --git a/zebra/subdir.am b/zebra/subdir.am index aafb4abb01..5601b4c379 100644 --- a/zebra/subdir.am +++ b/zebra/subdir.am @@ -6,23 +6,23 @@ if ZEBRA sbin_PROGRAMS += zebra/zebra dist_examples_DATA += zebra/zebra.conf.sample vtysh_scan += \ - $(top_srcdir)/zebra/debug.c \ - $(top_srcdir)/zebra/interface.c \ - $(top_srcdir)/zebra/router-id.c \ - $(top_srcdir)/zebra/rtadv.c \ - $(top_srcdir)/zebra/zebra_mlag_vty.c \ - $(top_srcdir)/zebra/zebra_mpls_vty.c \ - $(top_srcdir)/zebra/zebra_ptm.c \ - $(top_srcdir)/zebra/zebra_pw.c \ - $(top_srcdir)/zebra/zebra_routemap.c \ - $(top_srcdir)/zebra/zebra_vty.c \ - $(top_srcdir)/zebra/zserv.c \ - $(top_srcdir)/zebra/zebra_gr.c \ + zebra/debug.c \ + zebra/interface.c \ + zebra/router-id.c \ + zebra/rtadv.c \ + zebra/zebra_mlag_vty.c \ + zebra/zebra_mpls_vty.c \ + zebra/zebra_ptm.c \ + zebra/zebra_pw.c \ + zebra/zebra_routemap.c \ + zebra/zebra_vty.c \ + zebra/zserv.c \ + zebra/zebra_gr.c \ # end # can be loaded as DSO - always include for vtysh -vtysh_scan += $(top_srcdir)/zebra/irdp_interface.c -vtysh_scan += $(top_srcdir)/zebra/zebra_fpm.c +vtysh_scan += zebra/irdp_interface.c +vtysh_scan += zebra/zebra_fpm.c if IRDP module_LTLIBRARIES += zebra/zebra_irdp.la @@ -109,22 +109,14 @@ zebra_zebra_SOURCES = \ zebra/zebra_gr.c \ # end -zebra/debug_clippy.c: $(CLIPPY_DEPS) -zebra/debug.$(OBJEXT): zebra/debug_clippy.c - -zebra/zebra_mlag_vty_clippy.c: $(CLIPPY_DEPS) -zebra/zebra_mlag_vty.$(OBJEXT): zebra/zebra_mlag_vty_clippy.c - -zebra/zebra_vty_clippy.c: $(CLIPPY_DEPS) -zebra/interface_clippy.c: $(CLIPPY_DEPS) -zebra/interface.$(OBJEXT): zebra/interface_clippy.c -zebra/zebra_vty.$(OBJEXT): zebra/zebra_vty_clippy.c - -zebra/zebra_routemap_clippy.c: $(CLIPPY_DEPS) -zebra/zebra_routemap.$(OBJEXT): zebra/zebra_routemap_clippy.c - -zebra/rtadv_clippy.c: $(CLIPPY_DEPS) -zebra/rtadv.$(OBJEXT): zebra/rtadv_clippy.c +clippy_scan += \ + zebra/debug.c \ + zebra/interface.c \ + zebra/rtadv.c \ + zebra/zebra_mlag_vty.c \ + zebra/zebra_routemap.c \ + zebra/zebra_vty.c \ + # end noinst_HEADERS += \ zebra/connected.h \ |
