From fdad6d5661065364b57db22ad5a1348526ca93d1 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 2 Feb 2017 13:54:47 -0500 Subject: [PATCH 01/23] bgpd: Allow vtysh to work for address-family extract.pl.in requires the lines that are ignored to be consisten with what is in the *.c file that we are ignoring from, else we get ambiguous commands. This allows vtysh to enter address-family sub mode in bgp again. Signed-off-by: Donald Sharp --- bgpd/bgp_vty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 79e5a0c332..cad5411d0a 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -6076,7 +6076,7 @@ DEFUN (address_family_ipv4, DEFUN (address_family_ipv4_safi, address_family_ipv4_safi_cmd, - "address-family ipv4 "BGP_SAFI_CMD_STR, + "address-family ipv4 (unicast|multicast)", "Enter Address Family command mode\n" "Address Family\n" BGP_SAFI_HELP_STR) @@ -6113,7 +6113,7 @@ DEFUN (address_family_ipv6, DEFUN (address_family_ipv6_safi, address_family_ipv6_safi_cmd, - "address-family ipv6 "BGP_SAFI_CMD_STR, + "address-family ipv6 (unicast|multicast)", "Enter Address Family command mode\n" "Address Family\n" BGP_SAFI_HELP_STR) From 713de0685fc0ef882c97a6cb4bd149620f4dbdf4 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 2 Feb 2017 13:56:56 -0500 Subject: [PATCH 02/23] bgpd: Put back original behavior for some show bgp commands The behavior of some show commands was switched from showing the unicast data to all safi data. This is a change in behavior and needs to be put back for 2.0 Signed-off-by: Donald Sharp --- bgpd/bgp_vty.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index cad5411d0a..14d70f668e 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -10272,7 +10272,7 @@ DEFUN (show_ip_bgp_summary, "JavaScript Object Notation\n") { u_char uj = use_json(argc, argv); - return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MAX, uj); + return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST, uj); } DEFUN (show_ip_bgp_instance_summary, @@ -10368,7 +10368,7 @@ DEFUN (show_bgp_summary, "Summary of BGP neighbor status\n" "JavaScript Object Notation\n") { - return bgp_show_summary_vty (vty, NULL, AFI_MAX, SAFI_MAX, use_json(argc, argv)); + return bgp_show_summary_vty (vty, NULL, AFI_MAX, SAFI_UNICAST, use_json(argc, argv)); } DEFUN (show_bgp_instance_summary, @@ -10380,7 +10380,7 @@ DEFUN (show_bgp_instance_summary, "Summary of BGP neighbor status\n" "JavaScript Object Notation\n") { - return bgp_show_summary_vty (vty, argv[1], AFI_MAX, SAFI_MAX, use_json(argc, argv)); + return bgp_show_summary_vty (vty, argv[1], AFI_MAX, SAFI_UNICAST, use_json(argc, argv)); } DEFUN (show_bgp_instance_all_summary, @@ -10406,7 +10406,7 @@ DEFUN (show_bgp_ipv6_summary, "Address family\n" "Summary of BGP neighbor status\n") { - return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MAX, use_json(argc, argv)); + return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, use_json(argc, argv)); } DEFUN (show_bgp_instance_ipv6__summary, @@ -10463,7 +10463,7 @@ DEFUN (show_ipv6_bgp_summary, "JavaScript Object Notation\n") { u_char uj = use_json(argc, argv); - return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MAX, uj); + return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, uj); } /* old command */ From 8f7f12f9d1ce0ec5867b0a73c1ec726cb9af684c Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Thu, 2 Feb 2017 19:50:36 -0500 Subject: [PATCH 03/23] bgpd rfapi: fix TT handling broken on Sat Jan 28 18:57:28 2017 -0500 Signed-off-by: Lou Berger --- bgpd/rfapi/vnc_import_bgp.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/bgpd/rfapi/vnc_import_bgp.c b/bgpd/rfapi/vnc_import_bgp.c index 867c27fc63..5b76d1870f 100644 --- a/bgpd/rfapi/vnc_import_bgp.c +++ b/bgpd/rfapi/vnc_import_bgp.c @@ -466,6 +466,10 @@ vnc_import_bgp_add_route_mode_resolve_nve_one_bi ( struct bgp_attr_encap_subtlv *encaptlvs; uint32_t label = 0; + struct rfapi_un_option optary[3]; + struct rfapi_un_option *opt = NULL; + int cur_opt = 0; + vnc_zlog_debug_verbose ("%s: entry", __func__); if (bi->type != ZEBRA_ROUTE_BGP && bi->type != ZEBRA_ROUTE_BGP_DIRECT) @@ -509,6 +513,16 @@ vnc_import_bgp_add_route_mode_resolve_nve_one_bi ( if (bi->attr && bi->attr->extra) { encaptlvs = bi->attr->extra->vnc_subtlvs; + if (bi->attr->extra->encap_tunneltype != BGP_ENCAP_TYPE_MPLS) + { + if (opt != NULL) + opt->next = &optary[cur_opt]; + opt = &optary[cur_opt++]; + memset (opt, 0, sizeof (struct rfapi_un_option)); + opt->type = RFAPI_UN_OPTION_TYPE_TUNNELTYPE; + opt->v.tunnel.type = bi->attr->extra->encap_tunneltype; + /* TBD parse bi->attr->extra->encap_subtlvs */ + } } else { @@ -533,7 +547,7 @@ vnc_import_bgp_add_route_mode_resolve_nve_one_bi ( local_pref, plifetime, (struct bgp_tea_options *) encaptlvs, /* RFP options */ - NULL, + opt, NULL, new_ecom, med, /* NULL => don't set med */ From f799a22aa78a8d1f1bfafdc19947f1fe0ebe42fb Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Thu, 2 Feb 2017 21:33:55 -0500 Subject: [PATCH 04/23] bgpd: cleanup/restore show ip|ipv6 bgp and show bgp ipv4 summary related commands Signed-off-by: Lou Berger --- bgpd/bgp_route.c | 10 ++++++++ bgpd/bgp_vty.c | 63 +++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 67 insertions(+), 6 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 29953cae02..3e5251a7ff 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -8208,6 +8208,15 @@ DEFUN (show_ip_bgp, return bgp_show (vty, NULL, AFI_IP, SAFI_UNICAST, bgp_show_type_normal, NULL, use_json(argc, argv)); } +ALIAS (show_ip_bgp, + show_bgp_ipv4_cmd, + "show bgp ipv4 {json}", + SHOW_STR + IP_STR + BGP_STR + "Address family\n" + "JavaScript Object Notation\n") + DEFUN (show_ip_bgp_ipv4, show_ip_bgp_ipv4_cmd, "show ip bgp ipv4 (unicast|multicast) {json}", @@ -14753,6 +14762,7 @@ bgp_route_init (void) install_element (BGP_IPV4M_NODE, &no_aggregate_address_mask_summary_as_set_cmd); install_element (VIEW_NODE, &show_ip_bgp_cmd); + install_element (VIEW_NODE, &show_bgp_ipv4_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_all_cmd); install_element (VIEW_NODE, &show_ip_bgp_ipv4_cmd); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 79e5a0c332..491a795490 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -10272,7 +10272,7 @@ DEFUN (show_ip_bgp_summary, "JavaScript Object Notation\n") { u_char uj = use_json(argc, argv); - return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MAX, uj); + return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST, uj); } DEFUN (show_ip_bgp_instance_summary, @@ -10286,7 +10286,7 @@ DEFUN (show_ip_bgp_instance_summary, "JavaScript Object Notation\n") { u_char uj = use_json(argc, argv); - return bgp_show_summary_vty (vty, argv[1], AFI_IP, SAFI_MAX, uj); + return bgp_show_summary_vty (vty, argv[1], AFI_IP, SAFI_UNICAST, uj); } DEFUN (show_ip_bgp_instance_all_summary, @@ -10301,7 +10301,7 @@ DEFUN (show_ip_bgp_instance_all_summary, { u_char uj = use_json(argc, argv); - bgp_show_all_instances_summary_vty (vty, AFI_IP, SAFI_MAX, uj); + bgp_show_all_instances_summary_vty (vty, AFI_IP, SAFI_UNICAST, uj); return CMD_SUCCESS; } @@ -10359,7 +10359,6 @@ ALIAS (show_ip_bgp_instance_ipv4_summary, BGP_AFI_SAFI_HELP_STR "Summary of BGP neighbor status\n") -#ifdef HAVE_IPV6 DEFUN (show_bgp_summary, show_bgp_summary_cmd, "show bgp summary {json}", @@ -10398,6 +10397,42 @@ DEFUN (show_bgp_instance_all_summary, return CMD_SUCCESS; } +DEFUN (show_bgp_ipv4_summary, + show_bgp_ipv4_summary_cmd, + "show bgp ipv4 summary {json}", + SHOW_STR + BGP_STR + "Address family\n" + "Summary of BGP neighbor status\n") +{ + return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MAX, use_json(argc, argv)); +} + +DEFUN (show_bgp_instance_ipv4_summary, + show_bgp_instance_ipv4_summary_cmd, + "show bgp " BGP_INSTANCE_CMD " ipv4 summary {json}", + SHOW_STR + BGP_STR + BGP_INSTANCE_HELP_STR + "Address family\n" + "Summary of BGP neighbor status\n") +{ + return bgp_show_summary_vty (vty, argv[1], AFI_IP, SAFI_MAX, use_json(argc, argv)); +} + +DEFUN (show_bgp_instance_ipv4_all_summary, + show_bgp_instance_ipv4_all_summary_cmd, + "show bgp " BGP_INSTANCE_ALL_CMD " ipv4 summary {json}", + SHOW_STR + BGP_STR + BGP_INSTANCE_ALL_HELP_STR + "Address family\n" + "Summary of BGP neighbor status\n") +{ + return bgp_show_summary_vty (vty, argv[1], AFI_IP, SAFI_MAX, use_json(argc, argv)); +} + +#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_summary, show_bgp_ipv6_summary_cmd, "show bgp ipv6 summary {json}", @@ -10409,7 +10444,7 @@ DEFUN (show_bgp_ipv6_summary, return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MAX, use_json(argc, argv)); } -DEFUN (show_bgp_instance_ipv6__summary, +DEFUN (show_bgp_instance_ipv6_summary, show_bgp_instance_ipv6_summary_cmd, "show bgp " BGP_INSTANCE_CMD " ipv6 summary {json}", SHOW_STR @@ -10421,6 +10456,18 @@ DEFUN (show_bgp_instance_ipv6__summary, return bgp_show_summary_vty (vty, argv[1], AFI_IP6, SAFI_MAX, use_json(argc, argv)); } +DEFUN (show_bgp_instance_ipv6_all_summary, + show_bgp_instance_ipv6_all_summary_cmd, + "show bgp " BGP_INSTANCE_ALL_CMD " ipv6 summary {json}", + SHOW_STR + BGP_STR + BGP_INSTANCE_ALL_HELP_STR + "Address family\n" + "Summary of BGP neighbor status\n") +{ + return bgp_show_summary_vty (vty, argv[1], AFI_IP6, SAFI_MAX, use_json(argc, argv)); +} + DEFUN (show_bgp_ipv6_safi_summary, show_bgp_ipv6_safi_summary_cmd, "show bgp ipv6 "BGP_SAFI_CMD_STR" summary {json}", @@ -10463,7 +10510,7 @@ DEFUN (show_ipv6_bgp_summary, "JavaScript Object Notation\n") { u_char uj = use_json(argc, argv); - return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MAX, uj); + return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, uj); } /* old command */ @@ -15425,6 +15472,9 @@ bgp_vty_init (void) install_element (VIEW_NODE, &show_bgp_ipv4_safi_summary_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_ipv4_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_ipv4_safi_summary_cmd); + install_element (VIEW_NODE, &show_bgp_ipv4_summary_cmd); + install_element (VIEW_NODE, &show_bgp_instance_ipv4_summary_cmd); + install_element (VIEW_NODE, &show_bgp_instance_ipv4_all_summary_cmd); #ifdef HAVE_IPV6 install_element (VIEW_NODE, &show_bgp_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_summary_cmd); @@ -15432,6 +15482,7 @@ bgp_vty_init (void) install_element (VIEW_NODE, &show_bgp_ipv6_summary_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_safi_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_ipv6_summary_cmd); + install_element (VIEW_NODE, &show_bgp_instance_ipv6_all_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_ipv6_safi_summary_cmd); #endif /* HAVE_IPV6 */ From d08aa468d7bf2f1473497c1504482308744a8f87 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Thu, 2 Feb 2017 21:35:24 -0500 Subject: [PATCH 05/23] bgpd: get rid of 'unknown' in show safi (broken in earlier merge) Signed-off-by: Lou Berger --- bgpd/bgp_vty.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 491a795490..309e9077dc 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -10170,7 +10170,9 @@ bgp_show_summary_afi_safi (struct vty *vty, struct bgp *bgp, int afi, int safi, if (safi == SAFI_MPLS_VPN) /* handle special cases to match zebra.h */ safi = SAFI_ENCAP; else - safi++; + safi++; + if (safi == SAFI_RESERVED_3) /* handle special cases to match zebra.h */ + safi++; if (! safi_wildcard) safi = SAFI_MAX; } From 55c728031529910cd8358bedb90f75d363afeb4b Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 3 Feb 2017 07:59:04 -0500 Subject: [PATCH 06/23] *: Convert libzebra -> libfrr The library libzebra that is installed with FRR will conflict with Quagga. So let's rename it to libfrr. Signed-off-by: Donald Sharp --- bgpd/Makefile.am | 4 +- bgpd/rfp-example/rfptest/Makefile.am | 2 +- configure.ac | 2 +- debian/frr.lintian-overrides | 4 +- isisd/Makefile.am | 2 +- ldpd/Makefile.am | 2 +- lib/Makefile.am | 8 ++-- lib/linklist.h | 2 +- lib/memory.c | 2 +- lib/thread.h | 2 +- ospf6d/Makefile.am | 2 +- ospfclient/Makefile.am | 4 +- ospfclient/ospfclient.c | 2 +- ospfd/Makefile.am | 4 +- pimd/Makefile.am | 4 +- pimd/TODO | 2 +- ripd/Makefile.am | 2 +- ripngd/Makefile.am | 2 +- solaris/prototype.dev.in | 4 +- solaris/prototype.libs.in | 6 +-- tests/Makefile.am | 48 +++++++++---------- tests/lib/{libzebra.exp => libfrr.exp} | 0 .../Makefile.am | 0 .../tabletest.exp | 0 .../test-timer-correctness.exp | 0 .../testcli.exp | 0 .../testcommands.exp | 0 .../testnexthopiter.exp | 0 .../teststream.exp | 0 tests/test-commands.c | 2 +- vtysh/Makefile.am | 2 +- watchfrr/Makefile.am | 2 +- watchfrr/watchfrr.c | 2 +- zebra/Makefile.am | 6 +-- zebra/main.c | 2 +- zebra/test_main.c | 2 +- 36 files changed, 64 insertions(+), 64 deletions(-) rename tests/lib/{libzebra.exp => libfrr.exp} (100%) rename tests/{libzebra.tests => libfrr.tests}/Makefile.am (100%) rename tests/{libzebra.tests => libfrr.tests}/tabletest.exp (100%) rename tests/{libzebra.tests => libfrr.tests}/test-timer-correctness.exp (100%) rename tests/{libzebra.tests => libfrr.tests}/testcli.exp (100%) rename tests/{libzebra.tests => libfrr.tests}/testcommands.exp (100%) rename tests/{libzebra.tests => libfrr.tests}/testnexthopiter.exp (100%) rename tests/{libzebra.tests => libfrr.tests}/teststream.exp (100%) diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am index 69c0504af4..b91d23baf6 100644 --- a/bgpd/Makefile.am +++ b/bgpd/Makefile.am @@ -91,11 +91,11 @@ noinst_HEADERS = \ $(BGP_VNC_RFAPI_HD) bgpd_SOURCES = bgp_main.c -bgpd_LDADD = libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ @LIBM@ +bgpd_LDADD = libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ @LIBM@ bgpd_LDFLAGS = $(BGP_VNC_RFP_LD_FLAGS) bgp_btoa_SOURCES = bgp_btoa.c -bgp_btoa_LDADD = libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ @LIBM@ +bgp_btoa_LDADD = libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ @LIBM@ bgp_btoa_LDFLAGS = $(BGP_VNC_RFP_LD_FLAGS) examplesdir = $(exampledir) diff --git a/bgpd/rfp-example/rfptest/Makefile.am b/bgpd/rfp-example/rfptest/Makefile.am index a1001e4ef1..f5db852dbb 100644 --- a/bgpd/rfp-example/rfptest/Makefile.am +++ b/bgpd/rfp-example/rfptest/Makefile.am @@ -48,5 +48,5 @@ sbin_PROGRAMS = $(RFPTEST_BIN) examplesdir = $(exampledir) -rfptest_LDADD = $(top_builddir)/lib/libzebra.la $(BGP_VNC_RFP_LIB) +rfptest_LDADD = $(top_builddir)/lib/libfrr.la $(BGP_VNC_RFP_LIB) dist_examples_DATA = diff --git a/configure.ac b/configure.ac index da22962577..cd88e30c78 100755 --- a/configure.ac +++ b/configure.ac @@ -1611,7 +1611,7 @@ AC_CONFIG_FILES([Makefile lib/Makefile qpb/Makefile zebra/Makefile ripd/Makefile doc/Makefile ospfclient/Makefile tests/Makefile m4/Makefile pimd/Makefile tests/bgpd.tests/Makefile - tests/libzebra.tests/Makefile + tests/libfrr.tests/Makefile redhat/Makefile tools/Makefile cumulus/Makefile diff --git a/debian/frr.lintian-overrides b/debian/frr.lintian-overrides index 42a51b5e69..027fc2a1d6 100644 --- a/debian/frr.lintian-overrides +++ b/debian/frr.lintian-overrides @@ -1,4 +1,4 @@ frr: non-dev-pkg-with-shlib-symlink usr/lib/libospfapiclient.so.0.0.0 usr/lib/libospfapiclient.so frr: non-dev-pkg-with-shlib-symlink usr/lib/libospf.so.0.0.0 usr/lib/libospf.so -frr: non-dev-pkg-with-shlib-symlink usr/lib/libzebra.so.0.0.0 usr/lib/libzebra.so -frr: package-name-doesnt-match-sonames libospf0 libospfapiclient0 libzebra0 +frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrr.so.0.0.0 usr/lib/libfrr.so +frr: package-name-doesnt-match-sonames libospf0 libospfapiclient0 libfrr0 diff --git a/isisd/Makefile.am b/isisd/Makefile.am index 05f96c3807..334107a2a0 100644 --- a/isisd/Makefile.am +++ b/isisd/Makefile.am @@ -32,7 +32,7 @@ isisd_SOURCES = \ isis_main.c $(libisis_a_SOURCES) \ isis_bpf.c isis_dlpi.c isis_pfpacket.c -isisd_LDADD = ../lib/libzebra.la @LIBCAP@ +isisd_LDADD = ../lib/libfrr.la @LIBCAP@ examplesdir = $(exampledir) dist_examples_DATA = isisd.conf.sample diff --git a/ldpd/Makefile.am b/ldpd/Makefile.am index 1f4d910192..bf3147d579 100644 --- a/ldpd/Makefile.am +++ b/ldpd/Makefile.am @@ -21,7 +21,7 @@ noinst_HEADERS = \ control.h lde.h ldpd.h ldpe.h ldp.h log.h ldp_debug.h ldp_vty.h ldpd_SOURCES = ldpd.c -ldpd_LDADD = libldp.a ../lib/libzebra.la @LIBCAP@ +ldpd_LDADD = libldp.a ../lib/libfrr.la @LIBCAP@ examplesdir = $(exampledir) dist_examples_DATA = ldpd.conf.sample diff --git a/lib/Makefile.am b/lib/Makefile.am index 7239506813..f393836cc0 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -5,10 +5,10 @@ AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib \ AM_CFLAGS = $(WERROR) DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -lib_LTLIBRARIES = libzebra.la -libzebra_la_LDFLAGS = -version-info 0:0:0 +lib_LTLIBRARIES = libfrr.la +libfrr_la_LDFLAGS = -version-info 0:0:0 -libzebra_la_SOURCES = \ +libfrr_la_SOURCES = \ network.c pid_output.c getopt.c getopt1.c \ checksum.c vector.c linklist.c vty.c command.c \ sockunion.c prefix.c thread.c if.c buffer.c table.c hash.c \ @@ -24,7 +24,7 @@ libzebra_la_SOURCES = \ BUILT_SOURCES = route_types.h gitversion.h -libzebra_la_LIBADD = @LIBCAP@ +libfrr_la_LIBADD = @LIBCAP@ pkginclude_HEADERS = \ buffer.h checksum.h command.h filter.h getopt.h hash.h \ diff --git a/lib/linklist.h b/lib/linklist.h index e99e50f4fa..052025a86c 100644 --- a/lib/linklist.h +++ b/lib/linklist.h @@ -137,7 +137,7 @@ extern void list_add_list (struct list *, struct list *); /* Deprecated: 20050406 */ #if !defined(QUAGGA_NO_DEPRECATED_INTERFACES) -#warning "Using deprecated libzebra interfaces" +#warning "Using deprecated libfrr interfaces" #define LISTNODE_ADD(L,N) LISTNODE_ATTACH(L,N) #define LISTNODE_DELETE(L,N) LISTNODE_DETACH(L,N) #define nextnode(X) ((X) = (X)->next) diff --git a/lib/memory.c b/lib/memory.c index f17915486c..45aaf7d797 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -23,7 +23,7 @@ static struct memgroup *mg_first = NULL; struct memgroup **mg_insert = &mg_first; -DEFINE_MGROUP(LIB, "libzebra") +DEFINE_MGROUP(LIB, "libfrr") DEFINE_MTYPE(LIB, TMP, "Temporary memory") static inline void diff --git a/lib/thread.h b/lib/thread.h index e41e96dec2..3440a92999 100644 --- a/lib/thread.h +++ b/lib/thread.h @@ -242,7 +242,7 @@ extern unsigned long timeval_elapsed (struct timeval a, struct timeval b); /* set yield time for thread */ extern void thread_set_yield_time (struct thread *, unsigned long); -/* Internal libzebra exports */ +/* Internal libfrr exports */ extern void thread_getrusage (RUSAGE_T *); extern struct cmd_element show_thread_cpu_cmd; extern struct cmd_element clear_thread_cpu_cmd; diff --git a/ospf6d/Makefile.am b/ospf6d/Makefile.am index 7551503dae..06fc7a30af 100644 --- a/ospf6d/Makefile.am +++ b/ospf6d/Makefile.am @@ -28,7 +28,7 @@ noinst_HEADERS = \ ospf6d_SOURCES = \ ospf6_main.c $(libospf6_a_SOURCES) -ospf6d_LDADD = ../lib/libzebra.la @LIBCAP@ +ospf6d_LDADD = ../lib/libfrr.la @LIBCAP@ examplesdir = $(exampledir) dist_examples_DATA = ospf6d.conf.sample diff --git a/ospfclient/Makefile.am b/ospfclient/Makefile.am index 1fca431a10..003918ffc7 100644 --- a/ospfclient/Makefile.am +++ b/ospfclient/Makefile.am @@ -5,7 +5,7 @@ AM_CFLAGS = $(WERROR) lib_LTLIBRARIES = libospfapiclient.la libospfapiclient_la_LDFLAGS = -version-info 0:0:0 -libospfapiclient_la_LIBADD = ../ospfd/libospf.la ../lib/libzebra.la +libospfapiclient_la_LIBADD = ../ospfd/libospf.la ../lib/libfrr.la sbin_PROGRAMS = ospfclient @@ -21,7 +21,7 @@ ospfclient_SOURCES = \ ospfclient.c ospfclient_LDADD = libospfapiclient.la \ - ../ospfd/libospf.la ../lib/libzebra.la @LIBCAP@ + ../ospfd/libospf.la ../lib/libfrr.la @LIBCAP@ ospfclient_CFLAGS = $(AM_CFLAGS) ospfclient_LDFLAGS = $(AM_LDFLAGS) diff --git a/ospfclient/ospfclient.c b/ospfclient/ospfclient.c index 1716ebeca7..9a77a64cc4 100644 --- a/ospfclient/ospfclient.c +++ b/ospfclient/ospfclient.c @@ -52,7 +52,7 @@ struct zebra_privs_t ospfd_privs = }; /* The following includes are specific to this application. For - example it uses threads from libzebra, however your application is + example it uses threads from libfrr, however your application is free to use any thread library (like pthreads). */ #include "ospfd/ospf_dump.h" /* for ospf_lsa_header_dump */ diff --git a/ospfd/Makefile.am b/ospfd/Makefile.am index 62db350c5b..23c69b6f8f 100644 --- a/ospfd/Makefile.am +++ b/ospfd/Makefile.am @@ -7,7 +7,7 @@ INSTALL_SDATA=@INSTALL@ -m 600 lib_LTLIBRARIES = libospf.la libospf_la_LDFLAGS = -version-info 0:0:0 -libospf_la_LIBADD = ../lib/libzebra.la +libospf_la_LIBADD = ../lib/libfrr.la sbin_PROGRAMS = ospfd @@ -33,7 +33,7 @@ noinst_HEADERS = \ ospfd_SOURCES = ospf_main.c -ospfd_LDADD = libospf.la ../lib/libzebra.la @LIBCAP@ @LIBM@ +ospfd_LDADD = libospf.la ../lib/libfrr.la @LIBCAP@ @LIBM@ EXTRA_DIST = OSPF-MIB.txt OSPF-TRAP-MIB.txt ChangeLog.opaque.txt diff --git a/pimd/Makefile.am b/pimd/Makefile.am index bc28aa1e92..14c4a76ac9 100644 --- a/pimd/Makefile.am +++ b/pimd/Makefile.am @@ -72,8 +72,8 @@ pimd_SOURCES = \ test_igmpv3_join_SOURCES = \ test_igmpv3_join.c -pimd_LDADD = ../lib/libzebra.la @LIBCAP@ -test_igmpv3_join_LDADD = ../lib/libzebra.la +pimd_LDADD = ../lib/libfrr.la @LIBCAP@ +test_igmpv3_join_LDADD = ../lib/libfrr.la examplesdir = $(exampledir) dist_examples_DATA = pimd.conf.sample diff --git a/pimd/TODO b/pimd/TODO index 4c0f183100..57d2a17b5f 100644 --- a/pimd/TODO +++ b/pimd/TODO @@ -144,7 +144,7 @@ T22 DONE IGMP must be protected against adding looped MFC entries created by both source and receiver attached to the same interface. -T23 DONE libzebra crash after zclient_lookup_nexthop. +T23 DONE libfrr crash after zclient_lookup_nexthop. See mailing list post: http://lists.nongnu.org/archive/html/qpimd-users/2009-04/msg00008.html diff --git a/ripd/Makefile.am b/ripd/Makefile.am index e7073a7902..7967ff1535 100644 --- a/ripd/Makefile.am +++ b/ripd/Makefile.am @@ -21,7 +21,7 @@ noinst_HEADERS = \ ripd_SOURCES = \ rip_main.c $(librip_a_SOURCES) -ripd_LDADD = ../lib/libzebra.la @LIBCAP@ +ripd_LDADD = ../lib/libfrr.la @LIBCAP@ examplesdir = $(exampledir) dist_examples_DATA = ripd.conf.sample diff --git a/ripngd/Makefile.am b/ripngd/Makefile.am index c08e58a90c..3a4be999a7 100644 --- a/ripngd/Makefile.am +++ b/ripngd/Makefile.am @@ -21,7 +21,7 @@ noinst_HEADERS = \ ripngd_SOURCES = \ ripng_main.c $(libripng_a_SOURCES) -ripngd_LDADD = ../lib/libzebra.la @LIBCAP@ +ripngd_LDADD = ../lib/libfrr.la @LIBCAP@ examplesdir = $(exampledir) dist_examples_DATA = ripngd.conf.sample diff --git a/solaris/prototype.dev.in b/solaris/prototype.dev.in index dd3ae399ae..8bc3b3156a 100644 --- a/solaris/prototype.dev.in +++ b/solaris/prototype.dev.in @@ -1,8 +1,8 @@ i pkginfo=$abs_builddir/pkginfo.dev.full i depend=$abs_builddir/depend.dev i copying=$abs_top_srcdir/COPYING -f none @libdir@/libzebra.la=$DESTDIR/@libdir@/libzebra.la 0755 root bin -f none @libdir@/libzebra.a=$DESTDIR/@libdir@/libzebra.a 0644 root bin +f none @libdir@/libfrr.la=$DESTDIR/@libdir@/libfrr.la 0755 root bin +f none @libdir@/libfrr.a=$DESTDIR/@libdir@/libfrr.a 0644 root bin f none @libdir@/libospf.la=$DESTDIR/@libdir@/libospf.la 0755 root bin f none @libdir@/libospf.a=$DESTDIR/@libdir@/libospf.a 0644 root bin f none @libdir@/libospfapiclient.la=$DESTDIR/@libdir@/libospfapiclient.la 0755 root bin diff --git a/solaris/prototype.libs.in b/solaris/prototype.libs.in index 71f4fd5cfc..20aba05e49 100644 --- a/solaris/prototype.libs.in +++ b/solaris/prototype.libs.in @@ -2,9 +2,9 @@ i pkginfo=$abs_builddir/pkginfo.libs.full i depend=$abs_builddir/depend.libs i copying=$abs_top_srcdir/COPYING d none @libdir@=$DESTDIR/@libdir@ 0755 root bin -s none @libdir@/libzebra.so.0=libzebra.so.0.0.0 -f none @libdir@/libzebra.so.0.0.0=$DESTDIR/@libdir@/libzebra.so.0.0.0 0755 root bin -s none @libdir@/libzebra.so=libzebra.so.0.0.0 +s none @libdir@/libfrr.so.0=libfrr.so.0.0.0 +f none @libdir@/libfrr.so.0.0.0=$DESTDIR/@libdir@/libfrr.so.0.0.0 0755 root bin +s none @libdir@/libfrr.so=libfrr.so.0.0.0 s none @libdir@/libospf.so.0=libospf.so.0.0.0 f none @libdir@/libospf.so.0.0.0=$DESTDIR/@libdir@/libospf.so.0.0.0 0755 root bin s none @libdir@/libospf.so=libospf.so.0.0.0 diff --git a/tests/Makefile.am b/tests/Makefile.am index 76280f7189..442635fb79 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,14 +1,14 @@ AUTOMAKE_OPTIONS = dejagnu -DEJATOOL = libzebra +DEJATOOL = libfrr SUBDIRS = \ bgpd.tests \ - libzebra.tests + libfrr.tests EXTRA_DIST = \ config/unix.exp \ lib/bgpd.exp \ - lib/libzebra.exp \ + lib/libfrr.exp \ global-conf.exp \ testcommands.in \ testcommands.refout \ @@ -73,24 +73,24 @@ testcommands_SOURCES = test-commands-defun.c test-commands.c prng.c test_timer_correctness_SOURCES = test-timer-correctness.c prng.c test_timer_performance_SOURCES = test-timer-performance.c prng.c -testcli_LDADD = ../lib/libzebra.la @LIBCAP@ -testsig_LDADD = ../lib/libzebra.la @LIBCAP@ -testsegv_LDADD = ../lib/libzebra.la @LIBCAP@ -testbuffer_LDADD = ../lib/libzebra.la @LIBCAP@ -testmemory_LDADD = ../lib/libzebra.la @LIBCAP@ -testprivs_LDADD = ../lib/libzebra.la @LIBCAP@ -teststream_LDADD = ../lib/libzebra.la @LIBCAP@ -heavy_LDADD = ../lib/libzebra.la @LIBCAP@ -lm -heavywq_LDADD = ../lib/libzebra.la @LIBCAP@ -lm -heavythread_LDADD = ../lib/libzebra.la @LIBCAP@ -lm -aspathtest_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ -lm -testbgpcap_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ -lm -ecommtest_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ -lm -testbgpmpattr_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ -lm -testchecksum_LDADD = ../lib/libzebra.la @LIBCAP@ -testbgpmpath_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libzebra.la @LIBCAP@ -lm -tabletest_LDADD = ../lib/libzebra.la @LIBCAP@ -lm -testnexthopiter_LDADD = ../lib/libzebra.la @LIBCAP@ -testcommands_LDADD = ../lib/libzebra.la @LIBCAP@ -test_timer_correctness_LDADD = ../lib/libzebra.la @LIBCAP@ -test_timer_performance_LDADD = ../lib/libzebra.la @LIBCAP@ +testcli_LDADD = ../lib/libfrr.la @LIBCAP@ +testsig_LDADD = ../lib/libfrr.la @LIBCAP@ +testsegv_LDADD = ../lib/libfrr.la @LIBCAP@ +testbuffer_LDADD = ../lib/libfrr.la @LIBCAP@ +testmemory_LDADD = ../lib/libfrr.la @LIBCAP@ +testprivs_LDADD = ../lib/libfrr.la @LIBCAP@ +teststream_LDADD = ../lib/libfrr.la @LIBCAP@ +heavy_LDADD = ../lib/libfrr.la @LIBCAP@ -lm +heavywq_LDADD = ../lib/libfrr.la @LIBCAP@ -lm +heavythread_LDADD = ../lib/libfrr.la @LIBCAP@ -lm +aspathtest_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ -lm +testbgpcap_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ -lm +ecommtest_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ -lm +testbgpmpattr_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ -lm +testchecksum_LDADD = ../lib/libfrr.la @LIBCAP@ +testbgpmpath_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ -lm +tabletest_LDADD = ../lib/libfrr.la @LIBCAP@ -lm +testnexthopiter_LDADD = ../lib/libfrr.la @LIBCAP@ +testcommands_LDADD = ../lib/libfrr.la @LIBCAP@ +test_timer_correctness_LDADD = ../lib/libfrr.la @LIBCAP@ +test_timer_performance_LDADD = ../lib/libfrr.la @LIBCAP@ diff --git a/tests/lib/libzebra.exp b/tests/lib/libfrr.exp similarity index 100% rename from tests/lib/libzebra.exp rename to tests/lib/libfrr.exp diff --git a/tests/libzebra.tests/Makefile.am b/tests/libfrr.tests/Makefile.am similarity index 100% rename from tests/libzebra.tests/Makefile.am rename to tests/libfrr.tests/Makefile.am diff --git a/tests/libzebra.tests/tabletest.exp b/tests/libfrr.tests/tabletest.exp similarity index 100% rename from tests/libzebra.tests/tabletest.exp rename to tests/libfrr.tests/tabletest.exp diff --git a/tests/libzebra.tests/test-timer-correctness.exp b/tests/libfrr.tests/test-timer-correctness.exp similarity index 100% rename from tests/libzebra.tests/test-timer-correctness.exp rename to tests/libfrr.tests/test-timer-correctness.exp diff --git a/tests/libzebra.tests/testcli.exp b/tests/libfrr.tests/testcli.exp similarity index 100% rename from tests/libzebra.tests/testcli.exp rename to tests/libfrr.tests/testcli.exp diff --git a/tests/libzebra.tests/testcommands.exp b/tests/libfrr.tests/testcommands.exp similarity index 100% rename from tests/libzebra.tests/testcommands.exp rename to tests/libfrr.tests/testcommands.exp diff --git a/tests/libzebra.tests/testnexthopiter.exp b/tests/libfrr.tests/testnexthopiter.exp similarity index 100% rename from tests/libzebra.tests/testnexthopiter.exp rename to tests/libfrr.tests/testnexthopiter.exp diff --git a/tests/libzebra.tests/teststream.exp b/tests/libfrr.tests/teststream.exp similarity index 100% rename from tests/libzebra.tests/teststream.exp rename to tests/libfrr.tests/teststream.exp diff --git a/tests/test-commands.c b/tests/test-commands.c index b4613a567d..802002e861 100644 --- a/tests/test-commands.c +++ b/tests/test-commands.c @@ -44,7 +44,7 @@ extern vector cmdvec; extern struct cmd_node vty_node; extern void test_init_cmd(void); /* provided in test-commands-defun.c */ -struct thread_master *master; /* dummy for libzebra*/ +struct thread_master *master; /* dummy for libfrr*/ static vector test_cmds; static char test_buf[32768]; diff --git a/vtysh/Makefile.am b/vtysh/Makefile.am index 090382b99b..b85723aa05 100644 --- a/vtysh/Makefile.am +++ b/vtysh/Makefile.am @@ -30,7 +30,7 @@ vtysh_SOURCES = vtysh_main.c vtysh.c vtysh_user.c vtysh_config.c nodist_vtysh_SOURCES = vtysh_cmd.c CLEANFILES = vtysh_cmd.c noinst_HEADERS = vtysh.h vtysh_user.h -vtysh_LDADD = ../lib/libzebra.la @LIBCAP@ @LIBREADLINE@ +vtysh_LDADD = ../lib/libfrr.la @LIBCAP@ @LIBREADLINE@ examplesdir = $(exampledir) dist_examples_DATA = vtysh.conf.sample diff --git a/watchfrr/Makefile.am b/watchfrr/Makefile.am index 51851b0165..abe2266f20 100644 --- a/watchfrr/Makefile.am +++ b/watchfrr/Makefile.am @@ -10,4 +10,4 @@ sbin_PROGRAMS = watchfrr noinst_HEADERS = watchfrr.h watchfrr_SOURCES = watchfrr.c watchfrr_vty.c -watchfrr_LDADD = ../lib/libzebra.la @LIBCAP@ +watchfrr_LDADD = ../lib/libfrr.la @LIBCAP@ diff --git a/watchfrr/watchfrr.c b/watchfrr/watchfrr.c index 903e2bbe91..83f00252c8 100644 --- a/watchfrr/watchfrr.c +++ b/watchfrr/watchfrr.c @@ -62,7 +62,7 @@ #define PING_TOKEN "PING" -/* Needs to be global, referenced somewhere inside libzebra. */ +/* Needs to be global, referenced somewhere inside libfrr. */ struct thread_master *master; typedef enum diff --git a/zebra/Makefile.am b/zebra/Makefile.am index d1c160ade6..f6a056e3f0 100644 --- a/zebra/Makefile.am +++ b/zebra/Makefile.am @@ -63,9 +63,9 @@ noinst_HEADERS = \ zebra_ns.h zebra_vrf.h ioctl_solaris.h zebra_static.h zebra_mpls.h \ kernel_netlink.h if_netlink.h -zebra_LDADD = $(otherobj) ../lib/libzebra.la $(LIBCAP) $(Q_FPM_PB_CLIENT_LDOPTS) +zebra_LDADD = $(otherobj) ../lib/libfrr.la $(LIBCAP) $(Q_FPM_PB_CLIENT_LDOPTS) -testzebra_LDADD = ../lib/libzebra.la $(LIBCAP) +testzebra_LDADD = ../lib/libfrr.la $(LIBCAP) zebra_DEPENDENCIES = $(otherobj) @@ -78,7 +78,7 @@ EXTRA_DIST = if_ioctl.c if_ioctl_solaris.c if_netlink.c \ zebra_mpls_netlink.c zebra_mpls_openbsd.c \ GNOME-SMI GNOME-PRODUCT-ZEBRA-MIB -client : client_main.o ../lib/libzebra.la +client : client_main.o ../lib/libfrr.la $(CC) -g -o client client_main.o ../liblzebra.la $(LIBS) $(LIB_IPV6) quaggaconfdir = $(sysconfdir) diff --git a/zebra/main.c b/zebra/main.c index a68e8adeb6..79c9ea7023 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -63,7 +63,7 @@ pid_t pid; /* VTY Socket prefix */ char vty_sock_path[MAXPATHLEN] = ZEBRA_VTYSH_PATH; -/* Pacify zclient.o in libzebra, which expects this variable. */ +/* Pacify zclient.o in libfrr, which expects this variable. */ struct thread_master *master; /* Route retain mode flag. */ diff --git a/zebra/test_main.c b/zebra/test_main.c index 76ce92c370..0f7e1a22be 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -56,7 +56,7 @@ int allow_delete = 0; /* zebra_rib's workqueue hold time. Private export for use by test code only */ extern int rib_process_hold_time; -/* Pacify zclient.o in libzebra, which expects this variable. */ +/* Pacify zclient.o in libfrr, which expects this variable. */ struct thread_master *master; /* Command line options. */ From d904a9fc0971a626a0ffc09e40bf2e4a9e2ff138 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 3 Feb 2017 08:20:14 -0500 Subject: [PATCH 07/23] ripd: Fix compile warning This issue was found compiling with ./buildtest.sh on fedora 25 Signed-off-by: Donald Sharp --- ripd/ripd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ripd/ripd.c b/ripd/ripd.c index e9d610cea7..a99de3876b 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -2281,8 +2281,8 @@ rip_output_process (struct connected *ifc, struct sockaddr_in *to, { if (IS_RIP_DEBUG_PACKET) zlog_debug ("RIP %s/%d is filtered by route-map out", - inet_ntoa (p->prefix), p->prefixlen); - continue; + inet_ntoa (p->prefix), p->prefixlen); + continue; } } From a707247eff542e2874aec49cb9214d27c5755766 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 3 Feb 2017 08:22:15 -0500 Subject: [PATCH 08/23] ospfd: Fix compile warnings These compile issues were found w/ gcc and running ./buildtest.sh on a fedora 25 box. Signed-off-by: Donald Sharp --- ospfd/ospf_abr.c | 12 ++++++------ ospfd/ospfd.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c index 4c31bad0a8..a54170e048 100644 --- a/ospfd/ospf_abr.c +++ b/ospfd/ospf_abr.c @@ -701,7 +701,7 @@ ospf_abr_translate_nssa (struct ospf_area *area, struct ospf_lsa *lsa) zlog_debug ("ospf_abr_translate_nssa(): Could not translate " "Type-7 for %s to Type-5", inet_ntoa (lsa->data->id)); - return 1; + return 1; } } @@ -948,11 +948,11 @@ ospf_abr_announce_network (struct ospf *ospf, zlog_debug ("ospf_abr_announce_network(): " "this is intra-area route to %s/%d", inet_ntoa (p->prefix), p->prefixlen); - if ((range = ospf_area_range_match (or_area, p)) - && !ospf_area_is_transit (area)) - ospf_abr_update_aggregate (range, or, area); - else - ospf_abr_announce_network_to_area (p, or->cost, area); + if ((range = ospf_area_range_match (or_area, p)) + && !ospf_area_is_transit (area)) + ospf_abr_update_aggregate (range, or, area); + else + ospf_abr_announce_network_to_area (p, or->cost, area); } } } diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 1a7691c529..b83093db3c 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -113,8 +113,8 @@ ospf_router_id_update (struct ospf *ospf) else router_id = router_id_zebra; - - if (!IPV4_ADDR_SAME (&router_id_old, &router_id)) + + if (!IPV4_ADDR_SAME (&router_id_old, &router_id)) { for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi)) From 285a775ac7c3c42f9ddded27bab3fa991d0e75c4 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 3 Feb 2017 08:26:33 -0500 Subject: [PATCH 09/23] ospf6d: Fix compile warnings These compile issues were found by running ./buildtest.sh on a fedora 25 box. Signed-off-by: Donald Sharp --- ospf6d/ospf6_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index cd3b171a61..65fff1b16c 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -712,7 +712,7 @@ interface_up (struct thread *thread) if (IS_OSPF6_DEBUG_INTERFACE) zlog_debug ("Interface %s has no link local address, can't execute [InterfaceUp]", oi->interface->name); - return 0; + return 0; } /* Recompute cost */ From dfe1deea024131ced4d7d02931b10245b821a873 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 3 Feb 2017 08:43:09 -0500 Subject: [PATCH 10/23] *: Convert libfpm -> libfrrfpm Convert the libfpm to libfrrfpm to prevent namespace collision with Quagga. Signed-off-by: Donald Sharp --- common.am | 2 +- fpm/Makefile.am | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common.am b/common.am index c6da3d75e8..d01d673ae6 100644 --- a/common.am +++ b/common.am @@ -32,7 +32,7 @@ Q_PROTOBUF_SRCS = $(Q_PROTOBUF_CFILES) $(Q_PROTOBUF_HFILES) # Q_FRR_PB_CLIENT_LDOPTS = $(top_srcdir)/qpb/libfrr_pb.la $(Q_PROTOBUF_C_CLIENT_LDOPTS) -Q_FPM_PB_CLIENT_LDOPTS = $(top_srcdir)/fpm/libfpm_pb.la $(Q_FRR_PB_CLIENT_LDOPTS) +Q_FPM_PB_CLIENT_LDOPTS = $(top_srcdir)/fpm/libfrrfpm_pb.la $(Q_FRR_PB_CLIENT_LDOPTS) endif # HAVE_PROTOBUF diff --git a/fpm/Makefile.am b/fpm/Makefile.am index 83ab31ce3f..1f46ac6db2 100644 --- a/fpm/Makefile.am +++ b/fpm/Makefile.am @@ -5,8 +5,8 @@ AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib $(Q PROTOBUF_INCLUDES=-I$(top_srcdir) PROTOBUF_PACKAGE = fpm -lib_LTLIBRARIES = libfpm_pb.la -libfpm_pb_la_LDFLAGS = -version-info 0:0:0 +lib_LTLIBRARIES = libfrrfpm_pb.la +libfrrfpm_pb_la_LDFLAGS = -version-info 0:0:0 if HAVE_PROTOBUF protobuf_srcs = @@ -15,13 +15,13 @@ protobuf_srcs_nodist = \ fpm.pb-c.c endif -libfpm_pb_la_SOURCES = \ +libfrrfpm_pb_la_SOURCES = \ fpm.h \ fpm_pb.h \ fpm_pb.c \ $(protobuf_srcs) -nodist_libfpm_pb_la_SOURCES = $(protobuf_srcs_nodist) +nodist_libfrrfpm_pb_la_SOURCES = $(protobuf_srcs_nodist) CLEANFILES = $(Q_CLEANFILES) From 50b05f3c3dc197c0ba6f795b99b351b890a568ee Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 3 Feb 2017 08:43:55 -0500 Subject: [PATCH 11/23] *: Convert libospf -> libfrrospf Convert the libospfapiclient -> libfrrospfapiclient and libospf -> libfrrospf to prevent namespace collision with Quagga. Signed-off-by: Donald Sharp --- debian/frr.lintian-overrides | 6 +++--- ospfclient/Makefile.am | 12 ++++++------ ospfd/Makefile.am | 10 +++++----- solaris/prototype.dev.in | 8 ++++---- solaris/prototype.libs.in | 12 ++++++------ 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/debian/frr.lintian-overrides b/debian/frr.lintian-overrides index 027fc2a1d6..01c623eb22 100644 --- a/debian/frr.lintian-overrides +++ b/debian/frr.lintian-overrides @@ -1,4 +1,4 @@ -frr: non-dev-pkg-with-shlib-symlink usr/lib/libospfapiclient.so.0.0.0 usr/lib/libospfapiclient.so -frr: non-dev-pkg-with-shlib-symlink usr/lib/libospf.so.0.0.0 usr/lib/libospf.so +frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrrospfapiclient.so.0.0.0 usr/lib/libfrrospfapiclient.so +frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrrospf.so.0.0.0 usr/lib/libfrrospf.so frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrr.so.0.0.0 usr/lib/libfrr.so -frr: package-name-doesnt-match-sonames libospf0 libospfapiclient0 libfrr0 +frr: package-name-doesnt-match-sonames libfrrospf0 libfrrospfapiclient0 libfrr0 diff --git a/ospfclient/Makefile.am b/ospfclient/Makefile.am index 003918ffc7..482de287d9 100644 --- a/ospfclient/Makefile.am +++ b/ospfclient/Makefile.am @@ -3,13 +3,13 @@ AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib AM_CFLAGS = $(WERROR) -lib_LTLIBRARIES = libospfapiclient.la -libospfapiclient_la_LDFLAGS = -version-info 0:0:0 -libospfapiclient_la_LIBADD = ../ospfd/libospf.la ../lib/libfrr.la +lib_LTLIBRARIES = libfrrospfapiclient.la +libfrrospfapiclient_la_LDFLAGS = -version-info 0:0:0 +libfrrospfapiclient_la_LIBADD = ../ospfd/libfrrospf.la ../lib/libfrr.la sbin_PROGRAMS = ospfclient -libospfapiclient_la_SOURCES = \ +libfrrospfapiclient_la_SOURCES = \ ospf_apiclient.c ospfapiheaderdir = $(pkgincludedir)/ospfapi @@ -20,8 +20,8 @@ ospfapiheader_HEADERS = \ ospfclient_SOURCES = \ ospfclient.c -ospfclient_LDADD = libospfapiclient.la \ - ../ospfd/libospf.la ../lib/libfrr.la @LIBCAP@ +ospfclient_LDADD = libfrrospfapiclient.la \ + ../ospfd/libfrrospf.la ../lib/libfrr.la @LIBCAP@ ospfclient_CFLAGS = $(AM_CFLAGS) ospfclient_LDFLAGS = $(AM_LDFLAGS) diff --git a/ospfd/Makefile.am b/ospfd/Makefile.am index 23c69b6f8f..14b01551b1 100644 --- a/ospfd/Makefile.am +++ b/ospfd/Makefile.am @@ -5,13 +5,13 @@ AM_CFLAGS = $(WERROR) DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 -lib_LTLIBRARIES = libospf.la -libospf_la_LDFLAGS = -version-info 0:0:0 -libospf_la_LIBADD = ../lib/libfrr.la +lib_LTLIBRARIES = libfrrospf.la +libfrrospf_la_LDFLAGS = -version-info 0:0:0 +libfrrospf_la_LIBADD = ../lib/libfrr.la sbin_PROGRAMS = ospfd -libospf_la_SOURCES = \ +libfrrospf_la_SOURCES = \ ospfd.c ospf_zebra.c ospf_interface.c ospf_ism.c ospf_neighbor.c \ ospf_nsm.c ospf_dump.c ospf_network.c ospf_packet.c ospf_lsa.c \ ospf_spf.c ospf_route.c ospf_ase.c ospf_abr.c ospf_ia.c ospf_flood.c \ @@ -33,7 +33,7 @@ noinst_HEADERS = \ ospfd_SOURCES = ospf_main.c -ospfd_LDADD = libospf.la ../lib/libfrr.la @LIBCAP@ @LIBM@ +ospfd_LDADD = libfrrospf.la ../lib/libfrr.la @LIBCAP@ @LIBM@ EXTRA_DIST = OSPF-MIB.txt OSPF-TRAP-MIB.txt ChangeLog.opaque.txt diff --git a/solaris/prototype.dev.in b/solaris/prototype.dev.in index 8bc3b3156a..f40fbdcd52 100644 --- a/solaris/prototype.dev.in +++ b/solaris/prototype.dev.in @@ -3,10 +3,10 @@ i depend=$abs_builddir/depend.dev i copying=$abs_top_srcdir/COPYING f none @libdir@/libfrr.la=$DESTDIR/@libdir@/libfrr.la 0755 root bin f none @libdir@/libfrr.a=$DESTDIR/@libdir@/libfrr.a 0644 root bin -f none @libdir@/libospf.la=$DESTDIR/@libdir@/libospf.la 0755 root bin -f none @libdir@/libospf.a=$DESTDIR/@libdir@/libospf.a 0644 root bin -f none @libdir@/libospfapiclient.la=$DESTDIR/@libdir@/libospfapiclient.la 0755 root bin -f none @libdir@/libospfapiclient.a=$DESTDIR/@libdir@/libospfapiclient.a 0644 root bin +f none @libdir@/libfrrospf.la=$DESTDIR/@libdir@/libfrrospf.la 0755 root bin +f none @libdir@/libfrrospf.a=$DESTDIR/@libdir@/libfrrospf.a 0644 root bin +f none @libdir@/libfrrospfapiclient.la=$DESTDIR/@libdir@/libfrrospfapiclient.la 0755 root bin +f none @libdir@/libfrrospfapiclient.a=$DESTDIR/@libdir@/libfrrospfapiclient.a 0644 root bin d none @includedir@=$DESTDIR/@includedir@ 0755 root bin d none @includedir@/frr=$DESTDIR/@includedir@/frr 0755 root bin d none @includedir@/frr/ospfd=$DESTDIR/@includedir@/frr/ospfd 0755 root bin diff --git a/solaris/prototype.libs.in b/solaris/prototype.libs.in index 20aba05e49..07fe333bad 100644 --- a/solaris/prototype.libs.in +++ b/solaris/prototype.libs.in @@ -5,9 +5,9 @@ d none @libdir@=$DESTDIR/@libdir@ 0755 root bin s none @libdir@/libfrr.so.0=libfrr.so.0.0.0 f none @libdir@/libfrr.so.0.0.0=$DESTDIR/@libdir@/libfrr.so.0.0.0 0755 root bin s none @libdir@/libfrr.so=libfrr.so.0.0.0 -s none @libdir@/libospf.so.0=libospf.so.0.0.0 -f none @libdir@/libospf.so.0.0.0=$DESTDIR/@libdir@/libospf.so.0.0.0 0755 root bin -s none @libdir@/libospf.so=libospf.so.0.0.0 -f none @libdir@/libospfapiclient.so.0.0.0=$DESTDIR/@libdir@/libospfapiclient.so.0.0.0 0755 root bin -s none @libdir@/libospfapiclient.so.0=libospfapiclient.so.0.0.0 -s none @libdir@/libospfapiclient.so=libospfapiclient.so.0.0.0 +s none @libdir@/libfrrospf.so.0=libfrrospf.so.0.0.0 +f none @libdir@/libfrrospf.so.0.0.0=$DESTDIR/@libdir@/libfrrospf.so.0.0.0 0755 root bin +s none @libdir@/libfrrospf.so=libfrrospf.so.0.0.0 +f none @libdir@/libfrrospfapiclient.so.0.0.0=$DESTDIR/@libdir@/libfrrospfapiclient.so.0.0.0 0755 root bin +s none @libdir@/libfrrospfapiclient.so.0=libfrrospfapiclient.so.0.0.0 +s none @libdir@/libfrrospfapiclient.so=libfrrospfapiclient.so.0.0.0 From 0114461b5e7eaf7a4d10eae8016ee1d63521334b Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Fri, 3 Feb 2017 10:04:19 -0500 Subject: [PATCH 12/23] bgpd: add missing json strings Signed-off-by: Lou Berger --- bgpd/bgp_vty.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 309e9077dc..a57d000952 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -10330,7 +10330,8 @@ ALIAS (show_ip_bgp_ipv4_summary, BGP_STR "Address family\n" BGP_SAFI_HELP_STR - "Summary of BGP neighbor status\n") + "Summary of BGP neighbor status\n" + "JavaScript Object Notation\n") DEFUN (show_ip_bgp_instance_ipv4_summary, show_ip_bgp_instance_ipv4_summary_cmd, @@ -10405,7 +10406,8 @@ DEFUN (show_bgp_ipv4_summary, SHOW_STR BGP_STR "Address family\n" - "Summary of BGP neighbor status\n") + "Summary of BGP neighbor status\n" + "JavaScript Object Notation\n") { return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MAX, use_json(argc, argv)); } @@ -10417,7 +10419,8 @@ DEFUN (show_bgp_instance_ipv4_summary, BGP_STR BGP_INSTANCE_HELP_STR "Address family\n" - "Summary of BGP neighbor status\n") + "Summary of BGP neighbor status\n" + "JavaScript Object Notation\n") { return bgp_show_summary_vty (vty, argv[1], AFI_IP, SAFI_MAX, use_json(argc, argv)); } @@ -10429,7 +10432,8 @@ DEFUN (show_bgp_instance_ipv4_all_summary, BGP_STR BGP_INSTANCE_ALL_HELP_STR "Address family\n" - "Summary of BGP neighbor status\n") + "Summary of BGP neighbor status\n" + "JavaScript Object Notation\n") { return bgp_show_summary_vty (vty, argv[1], AFI_IP, SAFI_MAX, use_json(argc, argv)); } @@ -10441,7 +10445,8 @@ DEFUN (show_bgp_ipv6_summary, SHOW_STR BGP_STR "Address family\n" - "Summary of BGP neighbor status\n") + "Summary of BGP neighbor status\n" + "JavaScript Object Notation\n") { return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MAX, use_json(argc, argv)); } @@ -10453,7 +10458,8 @@ DEFUN (show_bgp_instance_ipv6_summary, BGP_STR BGP_INSTANCE_HELP_STR "Address family\n" - "Summary of BGP neighbor status\n") + "Summary of BGP neighbor status\n" + "JavaScript Object Notation\n") { return bgp_show_summary_vty (vty, argv[1], AFI_IP6, SAFI_MAX, use_json(argc, argv)); } @@ -10465,7 +10471,8 @@ DEFUN (show_bgp_instance_ipv6_all_summary, BGP_STR BGP_INSTANCE_ALL_HELP_STR "Address family\n" - "Summary of BGP neighbor status\n") + "Summary of BGP neighbor status\n" + "JavaScript Object Notation\n") { return bgp_show_summary_vty (vty, argv[1], AFI_IP6, SAFI_MAX, use_json(argc, argv)); } From efe9a9a62a9658d660ed092e2b11d88e9af6eee8 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Fri, 3 Feb 2017 10:16:01 -0500 Subject: [PATCH 13/23] bgp: remove HAVE_IPV6 from file (again!) Signed-off-by: Lou Berger --- bgpd/bgp_vty.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index a57d000952..1a025b2911 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -115,11 +115,9 @@ bgp_vty_afi_from_arg(const char *afi_str) if (!strcmp(afi_str, "ipv4")) { afi = AFI_IP; } -#ifdef HAVE_IPV6 else if (!strcmp(afi_str, "ipv6")) { afi = AFI_IP6; } -#endif /* HAVE_IPV6 */ return afi; } @@ -167,11 +165,9 @@ peer_address_self_check (struct bgp *bgp, union sockunion *su) if (su->sa.sa_family == AF_INET) ifp = if_lookup_by_ipv4_exact (&su->sin.sin_addr, bgp->vrf_id); -#ifdef HAVE_IPV6 else if (su->sa.sa_family == AF_INET6) ifp = if_lookup_by_ipv6_exact (&su->sin6.sin6_addr, su->sin6.sin6_scope_id, bgp->vrf_id); -#endif /* HAVE IPV6 */ if (ifp) return 1; @@ -2601,14 +2597,12 @@ DEFUN (bgp_listen_range, afi = family2afi(range.family); -#ifdef HAVE_IPV6 if (afi == AFI_IP6 && IN6_IS_ADDR_LINKLOCAL (&range.u.prefix6)) { vty_out (vty, "%% Malformed listen range (link-local address)%s", VTY_NEWLINE); return CMD_WARNING; } -#endif /* HAVE_IPV6 */ apply_mask (&range); @@ -2673,14 +2667,12 @@ DEFUN (no_bgp_listen_range, afi = family2afi(range.family); -#ifdef HAVE_IPV6 if (afi == AFI_IP6 && IN6_IS_ADDR_LINKLOCAL (&range.u.prefix6)) { vty_out (vty, "%% Malformed listen range (link-local address)%s", VTY_NEWLINE); return CMD_WARNING; } -#endif /* HAVE_IPV6 */ apply_mask (&range); @@ -10438,7 +10430,6 @@ DEFUN (show_bgp_instance_ipv4_all_summary, return bgp_show_summary_vty (vty, argv[1], AFI_IP, SAFI_MAX, use_json(argc, argv)); } -#ifdef HAVE_IPV6 DEFUN (show_bgp_ipv6_summary, show_bgp_ipv6_summary_cmd, "show bgp ipv6 summary {json}", @@ -10535,7 +10526,6 @@ DEFUN (show_ipv6_mbgp_summary, u_char uj = use_json(argc, argv); return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MULTICAST, uj); } -#endif /* HAVE_IPV6 */ const char * afi_safi_print (afi_t afi, safi_t safi) @@ -11363,7 +11353,6 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js || p->afc_recv[AFI_IP][SAFI_UNICAST] || p->afc_adv[AFI_IP][SAFI_MULTICAST] || p->afc_recv[AFI_IP][SAFI_MULTICAST] -#ifdef HAVE_IPV6 || p->afc_adv[AFI_IP6][SAFI_UNICAST] || p->afc_recv[AFI_IP6][SAFI_UNICAST] || p->afc_adv[AFI_IP6][SAFI_MULTICAST] @@ -11372,7 +11361,6 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js || p->afc_recv[AFI_IP6][SAFI_MPLS_VPN] || p->afc_adv[AFI_IP6][SAFI_ENCAP] || p->afc_recv[AFI_IP6][SAFI_ENCAP] -#endif /* HAVE_IPV6 */ || p->afc_adv[AFI_IP][SAFI_ENCAP] || p->afc_recv[AFI_IP][SAFI_ENCAP] || p->afc_adv[AFI_IP][SAFI_MPLS_VPN] @@ -12130,21 +12118,18 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js if (use_json) { json_object_string_add(json_neigh, "nexthop", inet_ntop (AF_INET, &p->nexthop.v4, buf1, BUFSIZ)); -#ifdef HAVE_IPV6 json_object_string_add(json_neigh, "nexthopGlobal", inet_ntop (AF_INET6, &p->nexthop.v6_global, buf1, BUFSIZ)); json_object_string_add(json_neigh, "nexthopLocal", inet_ntop (AF_INET6, &p->nexthop.v6_local, buf1, BUFSIZ)); if (p->shared_network) json_object_string_add(json_neigh, "bgpConnection", "sharedNetwork"); else json_object_string_add(json_neigh, "bgpConnection", "nonSharedNetwork"); -#endif /* HAVE_IPV6 */ } else { vty_out (vty, "Nexthop: %s%s", inet_ntop (AF_INET, &p->nexthop.v4, buf1, BUFSIZ), VTY_NEWLINE); -#ifdef HAVE_IPV6 vty_out (vty, "Nexthop global: %s%s", inet_ntop (AF_INET6, &p->nexthop.v6_global, buf1, BUFSIZ), VTY_NEWLINE); @@ -12154,7 +12139,6 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js vty_out (vty, "BGP connection: %s%s", p->shared_network ? "shared network" : "non shared network", VTY_NEWLINE); -#endif /* HAVE_IPV6 */ } } @@ -13705,7 +13689,6 @@ ALIAS (no_bgp_redistribute_ipv4, "Route map reference\n" "Pointer to route-map entries\n") -#ifdef HAVE_IPV6 DEFUN (bgp_redistribute_ipv6, bgp_redistribute_ipv6_cmd, "redistribute " FRR_IP6_REDIST_STR_BGPD, @@ -13887,7 +13870,6 @@ ALIAS (no_bgp_redistribute_ipv6, "Default metric\n" "Route map reference\n" "Pointer to route-map entries\n") -#endif /* HAVE_IPV6 */ int bgp_config_write_redistribute (struct vty *vty, struct bgp *bgp, afi_t afi, @@ -15164,17 +15146,13 @@ bgp_vty_init (void) /* address-family commands. */ install_element (BGP_NODE, &address_family_ipv4_cmd); install_element (BGP_NODE, &address_family_ipv4_safi_cmd); -#ifdef HAVE_IPV6 install_element (BGP_NODE, &address_family_ipv6_cmd); install_element (BGP_NODE, &address_family_ipv6_safi_cmd); -#endif /* HAVE_IPV6 */ install_element (BGP_NODE, &address_family_vpnv4_cmd); install_element (BGP_NODE, &address_family_vpnv6_cmd); install_element (BGP_NODE, &address_family_encap_cmd); install_element (BGP_NODE, &address_family_encapv4_cmd); -#ifdef HAVE_IPV6 install_element (BGP_NODE, &address_family_encapv6_cmd); -#endif /* "exit-address-family" command. */ install_element (BGP_IPV4_NODE, &exit_address_family_cmd); @@ -15484,7 +15462,6 @@ bgp_vty_init (void) install_element (VIEW_NODE, &show_bgp_ipv4_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_ipv4_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_ipv4_all_summary_cmd); -#ifdef HAVE_IPV6 install_element (VIEW_NODE, &show_bgp_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_all_summary_cmd); @@ -15493,7 +15470,6 @@ bgp_vty_init (void) install_element (VIEW_NODE, &show_bgp_instance_ipv6_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_ipv6_all_summary_cmd); install_element (VIEW_NODE, &show_bgp_instance_ipv6_safi_summary_cmd); -#endif /* HAVE_IPV6 */ /* "show ip bgp neighbors" commands. */ install_element (VIEW_NODE, &show_ip_bgp_neighbors_cmd); @@ -15504,7 +15480,6 @@ bgp_vty_init (void) install_element (VIEW_NODE, &show_ip_bgp_instance_all_neighbors_cmd); install_element (VIEW_NODE, &show_ip_bgp_instance_neighbors_peer_cmd); -#ifdef HAVE_IPV6 install_element (VIEW_NODE, &show_bgp_neighbors_cmd); install_element (VIEW_NODE, &show_bgp_ipv6_neighbors_cmd); install_element (VIEW_NODE, &show_bgp_neighbors_peer_cmd); @@ -15517,7 +15492,6 @@ bgp_vty_init (void) /* Old commands. */ install_element (VIEW_NODE, &show_ipv6_bgp_summary_cmd); install_element (VIEW_NODE, &show_ipv6_mbgp_summary_cmd); -#endif /* HAVE_IPV6 */ /* "show ip bgp peer-group" commands. */ install_element (VIEW_NODE, &show_ip_bgp_peer_groups_cmd); @@ -15576,7 +15550,6 @@ bgp_vty_init (void) install_element (BGP_IPV4_NODE, &no_bgp_redistribute_ipv4_ospf_rmap_metric_cmd); install_element (BGP_IPV4_NODE, &bgp_redistribute_ipv4_ospf_metric_rmap_cmd); install_element (BGP_IPV4_NODE, &no_bgp_redistribute_ipv4_ospf_metric_rmap_cmd); -#ifdef HAVE_IPV6 install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_cmd); install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_cmd); install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_rmap_cmd); @@ -15587,7 +15560,6 @@ bgp_vty_init (void) install_element (BGP_IPV6_NODE, &bgp_redistribute_ipv6_metric_rmap_cmd); install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_rmap_metric_cmd); install_element (BGP_IPV6_NODE, &no_bgp_redistribute_ipv6_metric_rmap_cmd); -#endif /* HAVE_IPV6 */ /* ttl_security commands */ install_element (BGP_NODE, &neighbor_ttl_security_cmd); From fd420a3275a622846858e56460fe9e04ddef3f7f Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 3 Feb 2017 10:29:53 -0500 Subject: [PATCH 14/23] bgpd, vtysh: Fix vtysh able to handle some safi modes for bgp This adds the ability for vtysh to handle v4 and v6 safi modes besides unicast and multicast. Signed-off-by: Donald Sharp " " (view|vrf) WORD"'} = "ignore"; $ignore{'"router isis WORD"'} = "ignore"; $ignore{'"router zebra"'} = "ignore"; $ignore{'"address-family ipv4"'} = "ignore"; -$ignore{'"address-family ipv4 (unicast|multicast)"'} = "ignore"; +$ignore{'"address-family ipv4 (unicast|multicast|vpn|encap)"'} = "ignore"; $ignore{'"address-family ipv6"'} = "ignore"; -$ignore{'"address-family ipv6 (unicast|multicast)"'} = "ignore"; +$ignore{'"address-family ipv6 (unicast|multicast|vpn|encap)"'} = "ignore"; $ignore{'"address-family ipv4 vpn"'} = "ignore"; $ignore{'"address-family vpnv4"'} = "ignore"; $ignore{'"address-family vpnv4 unicast"'} = "ignore"; diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 17f6bfa5a5..6f9273e889 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1215,6 +1215,31 @@ DEFUNSH (VTYSH_BGPD, return CMD_SUCCESS; } +DEFUNSH (VTYSH_BGPD, + address_family_ipv4_encap, + address_family_ipv4_encap_cmd, + "address-family ipv4 encap", + "Enter Address Family command mode\n" + "Address family\n" + "Address Family Modifier\n") +{ + vty->node = BGP_ENCAP_NODE; + return CMD_SUCCESS; +} + +DEFUNSH (VTYSH_BGPD, + address_family_ipv4_vpn, + address_family_ipv4_vpn_cmd, + "address-family ipv4 vpn", + "Enter Address Family command mode\n" + "Address family\n" + "Address Family Modifier\n") +{ + vty->node = BGP_VPNV4_NODE; + return CMD_SUCCESS; +} + + DEFUNSH (VTYSH_BGPD, address_family_ipv6, address_family_ipv6_cmd, @@ -1250,6 +1275,30 @@ DEFUNSH (VTYSH_BGPD, return CMD_SUCCESS; } +DEFUNSH (VTYSH_BGPD, + address_family_ipv6_encap, + address_family_ipv6_encap_cmd, + "address-family ipv6 encap", + "Enter Address Family command mode\n" + "Address family\n" + "Address Family Modifier\n") +{ + vty->node = BGP_ENCAPV6_NODE; + return CMD_SUCCESS; +} + +DEFUNSH (VTYSH_BGPD, + address_family_ipv6_vpn, + address_family_ipv6_vpn_cmd, + "address-family ipv6 vpn", + "Enter Address Family command mode\n" + "Address family\n" + "Address Family Modifier\n") +{ + vty->node = BGP_VPNV6_NODE; + return CMD_SUCCESS; +} + #if defined (ENABLE_BGP_VNC) DEFUNSH (VTYSH_BGPD, vnc_defaults, @@ -3373,11 +3422,13 @@ vtysh_init_vty (void) #endif install_element (BGP_NODE, &address_family_ipv4_unicast_cmd); install_element (BGP_NODE, &address_family_ipv4_multicast_cmd); -#ifdef HAVE_IPV6 + install_element (BGP_NODE, &address_family_ipv4_encap_cmd); + install_element (BGP_NODE, &address_family_ipv4_vpn_cmd); install_element (BGP_NODE, &address_family_ipv6_cmd); install_element (BGP_NODE, &address_family_ipv6_unicast_cmd); install_element (BGP_NODE, &address_family_ipv6_multicast_cmd); -#endif + install_element (BGP_NODE, &address_family_ipv6_encap_cmd); + install_element (BGP_NODE, &address_family_ipv6_vpn_cmd); install_element (BGP_VPNV4_NODE, &exit_address_family_cmd); install_element (BGP_VPNV6_NODE, &exit_address_family_cmd); install_element (BGP_ENCAP_NODE, &exit_address_family_cmd); From 848ac646bd5ed6125af7238c7480ec1ed0cee3c8 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 3 Feb 2017 10:33:14 -0500 Subject: [PATCH 15/23] Revert "bgpd: Put back original behavior for some show bgp commands" This reverts commit 713de0685fc0ef882c97a6cb4bd149620f4dbdf4. During Discussions with Lou, it was decided that his code changes would handle this part, and my code changes would fix up vtysh and bgp to be in sync again. Signed-off-by: Donald Sharp --- bgpd/bgp_vty.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 641f4f9092..147b12eb0d 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -10272,7 +10272,7 @@ DEFUN (show_ip_bgp_summary, "JavaScript Object Notation\n") { u_char uj = use_json(argc, argv); - return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_UNICAST, uj); + return bgp_show_summary_vty (vty, NULL, AFI_IP, SAFI_MAX, uj); } DEFUN (show_ip_bgp_instance_summary, @@ -10368,7 +10368,7 @@ DEFUN (show_bgp_summary, "Summary of BGP neighbor status\n" "JavaScript Object Notation\n") { - return bgp_show_summary_vty (vty, NULL, AFI_MAX, SAFI_UNICAST, use_json(argc, argv)); + return bgp_show_summary_vty (vty, NULL, AFI_MAX, SAFI_MAX, use_json(argc, argv)); } DEFUN (show_bgp_instance_summary, @@ -10380,7 +10380,7 @@ DEFUN (show_bgp_instance_summary, "Summary of BGP neighbor status\n" "JavaScript Object Notation\n") { - return bgp_show_summary_vty (vty, argv[1], AFI_MAX, SAFI_UNICAST, use_json(argc, argv)); + return bgp_show_summary_vty (vty, argv[1], AFI_MAX, SAFI_MAX, use_json(argc, argv)); } DEFUN (show_bgp_instance_all_summary, @@ -10406,7 +10406,7 @@ DEFUN (show_bgp_ipv6_summary, "Address family\n" "Summary of BGP neighbor status\n") { - return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, use_json(argc, argv)); + return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MAX, use_json(argc, argv)); } DEFUN (show_bgp_instance_ipv6__summary, @@ -10463,7 +10463,7 @@ DEFUN (show_ipv6_bgp_summary, "JavaScript Object Notation\n") { u_char uj = use_json(argc, argv); - return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_UNICAST, uj); + return bgp_show_summary_vty (vty, NULL, AFI_IP6, SAFI_MAX, uj); } /* old command */ From a0b4b67e80d41f013267b86dad632b5f6114f7e8 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 1 Feb 2017 22:01:17 +0000 Subject: [PATCH 16/23] vtysh: Quagga.conf -> Frr.conf Signed-off-by: Quentin Young --- vtysh/vtysh.h | 2 +- vtysh/vtysh_main.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vtysh/vtysh.h b/vtysh/vtysh.h index 537f944a7a..39bf64f307 100644 --- a/vtysh/vtysh.h +++ b/vtysh/vtysh.h @@ -49,7 +49,7 @@ DECLARE_MGROUP(MVTYSH) /* vtysh local configuration file. */ #define VTYSH_DEFAULT_CONFIG "vtysh.conf" -#define QUAGGA_DEFAULT_CONFIG "Quagga.conf" +#define FRR_DEFAULT_CONFIG "Frr.conf" enum vtysh_write_integrated { WRITE_INTEGRATED_UNSPECIFIED, diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index 78b17be058..127cb70ad5 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -46,7 +46,7 @@ char *progname; /* Configuration file name and directory. */ static char vtysh_config_always[MAXPATHLEN] = SYSCONFDIR VTYSH_DEFAULT_CONFIG; -static char quagga_config_default[MAXPATHLEN] = SYSCONFDIR QUAGGA_DEFAULT_CONFIG; +static char quagga_config_default[MAXPATHLEN] = SYSCONFDIR FRR_DEFAULT_CONFIG; char *quagga_config = quagga_config_default; char history_file[MAXPATHLEN]; @@ -357,17 +357,17 @@ main (int argc, char **argv, char **env) /* * Overwrite location for Quagga.conf */ - vtysh_configfile_name = strrchr(QUAGGA_DEFAULT_CONFIG, '/'); + vtysh_configfile_name = strrchr(FRR_DEFAULT_CONFIG, '/'); if (vtysh_configfile_name) /* skip '/' */ vtysh_configfile_name++; else /* - * QUAGGA_DEFAULT_CONFIG configured with relative path + * FRR_DEFAULT_CONFIG configured with relative path * during config? Should really never happen for * sensible config */ - vtysh_configfile_name = (char *) QUAGGA_DEFAULT_CONFIG; + vtysh_configfile_name = (char *) FRR_DEFAULT_CONFIG; strlcpy(quagga_config_default, optarg, sizeof(vtysh_config_always)); strlcat(quagga_config_default, "/", sizeof(vtysh_config_always)); strlcat(quagga_config_default, vtysh_configfile_name, From f96872f001495b6ba8cd6e8ff0e4ea37f2ff0199 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 6 Feb 2017 12:52:28 -0500 Subject: [PATCH 17/23] lib: Don't use malloc! thread.c was using malloc. This was found by the assert added to memory.c. Fixes issues #170 Signed-off-by: Donald Sharp --- lib/thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/thread.c b/lib/thread.c index 6ada7cd96a..e4b83eaf86 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -489,8 +489,8 @@ thread_master_create (void) #if defined(HAVE_POLL) rv->handler.pfdsize = rv->fd_limit; rv->handler.pfdcount = 0; - rv->handler.pfds = (struct pollfd *) malloc (sizeof (struct pollfd) * rv->handler.pfdsize); - memset (rv->handler.pfds, 0, sizeof (struct pollfd) * rv->handler.pfdsize); + rv->handler.pfds = (struct pollfd *) XCALLOC (MTYPE_THREAD_MASTER, + sizeof (struct pollfd) * rv->handler.pfdsize); #endif return rv; } From f0d975f752df74385fd268427d5f5cfef7ea9049 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 7 Feb 2017 04:54:40 -0500 Subject: [PATCH 18/23] lib: Fixup CR comment Signed-off-by: Donald Sharp --- lib/thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/thread.c b/lib/thread.c index e4b83eaf86..5b8778b717 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -489,8 +489,8 @@ thread_master_create (void) #if defined(HAVE_POLL) rv->handler.pfdsize = rv->fd_limit; rv->handler.pfdcount = 0; - rv->handler.pfds = (struct pollfd *) XCALLOC (MTYPE_THREAD_MASTER, - sizeof (struct pollfd) * rv->handler.pfdsize); + rv->handler.pfds = XCALLOC (MTYPE_THREAD_MASTER, + sizeof (struct pollfd) * rv->handler.pfdsize); #endif return rv; } From c65742c79174a388f7340b83395fd7b2a19b80a8 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Mon, 6 Feb 2017 21:29:43 -0500 Subject: [PATCH 19/23] bgpd rfapi: advertise encap attribute when TT is valid and not MPLS. Ensure tunnel type set based on rx'ed Ignore bad/mpls encap types. Signed-off-by: Lou Berger --- bgpd/bgp_attr.c | 16 ++++++++-------- bgpd/rfapi/vnc_import_bgp.c | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index b1b245d42c..7741f76a75 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -2171,8 +2171,10 @@ bgp_attr_encap( stlv_last = tlv; } - if (attre && (BGP_ATTR_ENCAP == type)) { - attre->encap_tunneltype = tunneltype; + if (BGP_ATTR_ENCAP == type) { + if (!attre) + attre = bgp_attr_extra_get(attr); + attre->encap_tunneltype = tunneltype; } if (length) { @@ -2777,7 +2779,10 @@ bgp_packet_mpattr_tea( struct bgp_attr_encap_subtlv *st; const char *attrname; - if (!attr || !attr->extra) + if (!attr || !attr->extra || + (attrtype == BGP_ATTR_ENCAP && + (!attr->extra->encap_tunneltype || + attr->extra->encap_tunneltype == BGP_ENCAP_TYPE_MPLS))) return; switch (attrtype) { @@ -2808,11 +2813,6 @@ bgp_packet_mpattr_tea( assert(0); } - - /* if no tlvs, don't make attr */ - if (subtlvs == NULL) - return; - /* compute attr length */ for (st = subtlvs; st; st = st->next) { attrlenfield += (attrhdrlen + st->length); diff --git a/bgpd/rfapi/vnc_import_bgp.c b/bgpd/rfapi/vnc_import_bgp.c index 5b76d1870f..d5ca965465 100644 --- a/bgpd/rfapi/vnc_import_bgp.c +++ b/bgpd/rfapi/vnc_import_bgp.c @@ -513,7 +513,8 @@ vnc_import_bgp_add_route_mode_resolve_nve_one_bi ( if (bi->attr && bi->attr->extra) { encaptlvs = bi->attr->extra->vnc_subtlvs; - if (bi->attr->extra->encap_tunneltype != BGP_ENCAP_TYPE_MPLS) + if (bi->attr->extra->encap_tunneltype != BGP_ENCAP_TYPE_RESERVED && + bi->attr->extra->encap_tunneltype != BGP_ENCAP_TYPE_MPLS) { if (opt != NULL) opt->next = &optary[cur_opt]; From f65e2d40cc394b716d53ba80c846237c84a68cf0 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 7 Feb 2017 16:23:38 +0100 Subject: [PATCH 20/23] lib: print backtrace on MTYPE count underflow Signed-off-by: David Lamparter --- lib/memory.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/memory.c b/lib/memory.c index f17915486c..5fc0088105 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -19,6 +19,7 @@ #include #include "memory.h" +#include "log.h" static struct memgroup *mg_first = NULL; struct memgroup **mg_insert = &mg_first; @@ -40,6 +41,11 @@ mt_count_alloc (struct memtype *mt, size_t size) static inline void mt_count_free (struct memtype *mt) { + if (mt->n_alloc == 0) + { + zlog_err ("memory allocation count underflow for \"%s\"", mt->name); + zlog_backtrace (LOG_ERR); + } mt->n_alloc--; } From 3f3971a911668ab1d60a090ba1fff92f6ab8ce44 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 1 Feb 2017 10:31:40 -0500 Subject: [PATCH 21/23] bgpd: Allow views to 'pretend' resolve nexthops Views are supposed to be independent tables that have no connection to routing tables. Since View's are 'independent' there is no way to do 'real' nexthop resolution since connected routes and interfaces are associated with a particular table (or really vrf). So when we have a bgp instance assume that nexthops specified are actually valid, since we are propagating what our neighbors are telling us. Signed-off-by: Donald Sharp [cherry-picked from master 6fa1ab2eecb39b35256739f7083196d6f556f639] Signed-off-by: David Lamparter --- bgpd/bgp_nht.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index 1ca0483678..4c4fbc09b5 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -69,6 +69,14 @@ bgp_find_nexthop (struct bgp_info *path, int connected) if (!bnc) return 0; + /* + * We are cheating here. Views have no associated underlying + * ability to detect nexthops. So when we have a view + * just tell everyone the nexthop is valid + */ + if (path->peer && path->peer->bgp->inst_type == BGP_INSTANCE_TYPE_VIEW) + return 1; + if (connected && !(CHECK_FLAG(bnc->flags, BGP_NEXTHOP_CONNECTED))) return 0; @@ -196,7 +204,6 @@ bgp_find_or_add_nexthop (struct bgp *bgp, afi_t afi, struct bgp_info *ri, bnc = rn->info; bgp_unlock_node (rn); - if (is_bgp_static_route) { SET_FLAG(bnc->flags, BGP_STATIC_ROUTE); @@ -239,10 +246,13 @@ bgp_find_or_add_nexthop (struct bgp *bgp, afi_t afi, struct bgp_info *ri, UNSET_FLAG(bnc->flags, BGP_NEXTHOP_REGISTERED); UNSET_FLAG(bnc->flags, BGP_NEXTHOP_VALID); } - - if (!CHECK_FLAG(bnc->flags, BGP_NEXTHOP_REGISTERED)) + if (bgp->inst_type == BGP_INSTANCE_TYPE_VIEW) + { + bnc->flags |= BGP_NEXTHOP_REGISTERED; + bnc->flags |= BGP_NEXTHOP_VALID; + } + else if (!CHECK_FLAG(bnc->flags, BGP_NEXTHOP_REGISTERED)) register_zebra_rnh(bnc, is_bgp_static_route); - if (ri && ri->nexthop != bnc) { /* Unlink from existing nexthop cache, if any. This will also free @@ -260,7 +270,15 @@ bgp_find_or_add_nexthop (struct bgp *bgp, afi_t afi, struct bgp_info *ri, else if (peer) bnc->nht_info = (void *)peer; /* NHT peer reference */ - return (bgp_isvalid_nexthop(bnc)); + /* + * We are cheating here. Views have no associated underlying + * ability to detect nexthops. So when we have a view + * just tell everyone the nexthop is valid + */ + if (bgp->inst_type == BGP_INSTANCE_TYPE_VIEW) + return 1; + else + return (bgp_isvalid_nexthop(bnc)); } void From 0a3fc2a5df0d7896471a7daf2fcad2f9cd64d686 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 24 Jan 2017 21:35:08 +0100 Subject: [PATCH 22/23] ospfd: isolate ospfapiclient lib from ospf lib The OSPF API-client library doesn't really use anything from libospf except some small dumping tools. Isolate these into a separate file and detangle the ospfapiclient library. Signed-off-by: David Lamparter --- ospfclient/Makefile.am | 7 +- ospfclient/ospf_apiclient.c | 3 +- ospfd/Makefile.am | 5 +- ospfd/ospf_dump.c | 120 ---------------------------- ospfd/ospf_dump.h | 4 - ospfd/ospf_dump_api.c | 151 ++++++++++++++++++++++++++++++++++++ ospfd/ospf_dump_api.h | 43 ++++++++++ ospfd/ospfd.h | 11 +-- 8 files changed, 204 insertions(+), 140 deletions(-) create mode 100644 ospfd/ospf_dump_api.c create mode 100644 ospfd/ospf_dump_api.h diff --git a/ospfclient/Makefile.am b/ospfclient/Makefile.am index 482de287d9..28dc65d165 100644 --- a/ospfclient/Makefile.am +++ b/ospfclient/Makefile.am @@ -1,16 +1,17 @@ ## Automake.am for OSPF API client +AUTOMAKE_OPTIONS = subdir-objects AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib AM_CFLAGS = $(WERROR) lib_LTLIBRARIES = libfrrospfapiclient.la libfrrospfapiclient_la_LDFLAGS = -version-info 0:0:0 -libfrrospfapiclient_la_LIBADD = ../ospfd/libfrrospf.la ../lib/libfrr.la +libfrrospfapiclient_la_LIBADD = ../lib/libfrr.la sbin_PROGRAMS = ospfclient libfrrospfapiclient_la_SOURCES = \ - ospf_apiclient.c + ospf_apiclient.c ../ospfd/ospf_dump_api.c ../ospfd/ospf_api.c ospfapiheaderdir = $(pkgincludedir)/ospfapi @@ -21,7 +22,7 @@ ospfclient_SOURCES = \ ospfclient.c ospfclient_LDADD = libfrrospfapiclient.la \ - ../ospfd/libfrrospf.la ../lib/libfrr.la @LIBCAP@ + ../lib/libfrr.la @LIBCAP@ ospfclient_CFLAGS = $(AM_CFLAGS) ospfclient_LDFLAGS = $(AM_LDFLAGS) diff --git a/ospfclient/ospf_apiclient.c b/ospfclient/ospf_apiclient.c index 453e05ce2e..1590b65384 100644 --- a/ospfclient/ospf_apiclient.c +++ b/ospfclient/ospf_apiclient.c @@ -49,7 +49,8 @@ #include "ospf_apiclient.h" -DEFINE_MTYPE_STATIC(OSPFD, OSPF_APICLIENT, "OSPF-API client") +DEFINE_MGROUP(OSPFCLIENT, "libospfapiclient") +DEFINE_MTYPE_STATIC(OSPFCLIENT, OSPF_APICLIENT, "OSPF-API client") /* Backlog for listen */ #define BACKLOG 5 diff --git a/ospfd/Makefile.am b/ospfd/Makefile.am index 14b01551b1..fec7503619 100644 --- a/ospfd/Makefile.am +++ b/ospfd/Makefile.am @@ -17,13 +17,14 @@ libfrrospf_la_SOURCES = \ ospf_spf.c ospf_route.c ospf_ase.c ospf_abr.c ospf_ia.c ospf_flood.c \ ospf_lsdb.c ospf_asbr.c ospf_routemap.c ospf_snmp.c \ ospf_opaque.c ospf_te.c ospf_ri.c ospf_vty.c ospf_api.c ospf_apiserver.c \ - ospf_bfd.c ospf_memory.c + ospf_bfd.c ospf_memory.c ospf_dump_api.c ospfdheaderdir = $(pkgincludedir)/ospfd ospfdheader_HEADERS = \ ospf_api.h ospf_asbr.h ospf_dump.h ospf_lsa.h ospf_lsdb.h \ - ospf_nsm.h ospf_ism.h ospf_opaque.h ospfd.h + ospf_nsm.h ospf_ism.h ospf_opaque.h ospfd.h \ + ospf_dump_api.h noinst_HEADERS = \ ospf_interface.h ospf_neighbor.h ospf_network.h ospf_packet.h \ diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 8fa2258f4f..5535261195 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -42,89 +42,6 @@ #include "ospfd/ospf_packet.h" #include "ospfd/ospf_network.h" -const struct message ospf_ism_state_msg[] = -{ - { ISM_DependUpon, "DependUpon" }, - { ISM_Down, "Down" }, - { ISM_Loopback, "Loopback" }, - { ISM_Waiting, "Waiting" }, - { ISM_PointToPoint, "Point-To-Point" }, - { ISM_DROther, "DROther" }, - { ISM_Backup, "Backup" }, - { ISM_DR, "DR" }, -}; -const int ospf_ism_state_msg_max = OSPF_ISM_STATE_MAX; - -const struct message ospf_nsm_state_msg[] = -{ - { NSM_DependUpon, "DependUpon" }, - { NSM_Deleted, "Deleted" }, - { NSM_Down, "Down" }, - { NSM_Attempt, "Attempt" }, - { NSM_Init, "Init" }, - { NSM_TwoWay, "2-Way" }, - { NSM_ExStart, "ExStart" }, - { NSM_Exchange, "Exchange" }, - { NSM_Loading, "Loading" }, - { NSM_Full, "Full" }, -}; -const int ospf_nsm_state_msg_max = OSPF_NSM_STATE_MAX; - -const struct message ospf_lsa_type_msg[] = -{ - { OSPF_UNKNOWN_LSA, "unknown" }, - { OSPF_ROUTER_LSA, "router-LSA" }, - { OSPF_NETWORK_LSA, "network-LSA" }, - { OSPF_SUMMARY_LSA, "summary-LSA" }, - { OSPF_ASBR_SUMMARY_LSA, "summary-LSA" }, - { OSPF_AS_EXTERNAL_LSA, "AS-external-LSA" }, - { OSPF_GROUP_MEMBER_LSA, "GROUP MEMBER LSA" }, - { OSPF_AS_NSSA_LSA, "NSSA-LSA" }, - { 8, "Type-8 LSA" }, - { OSPF_OPAQUE_LINK_LSA, "Link-Local Opaque-LSA" }, - { OSPF_OPAQUE_AREA_LSA, "Area-Local Opaque-LSA" }, - { OSPF_OPAQUE_AS_LSA, "AS-external Opaque-LSA" }, -}; -const int ospf_lsa_type_msg_max = OSPF_MAX_LSA; - -const struct message ospf_link_state_id_type_msg[] = -{ - { OSPF_UNKNOWN_LSA, "(unknown)" }, - { OSPF_ROUTER_LSA, "" }, - { OSPF_NETWORK_LSA, "(address of Designated Router)" }, - { OSPF_SUMMARY_LSA, "(summary Network Number)" }, - { OSPF_ASBR_SUMMARY_LSA, "(AS Boundary Router address)" }, - { OSPF_AS_EXTERNAL_LSA, "(External Network Number)" }, - { OSPF_GROUP_MEMBER_LSA, "(Group membership information)" }, - { OSPF_AS_NSSA_LSA, "(External Network Number for NSSA)" }, - { 8, "(Type-8 LSID)" }, - { OSPF_OPAQUE_LINK_LSA, "(Link-Local Opaque-Type/ID)" }, - { OSPF_OPAQUE_AREA_LSA, "(Area-Local Opaque-Type/ID)" }, - { OSPF_OPAQUE_AS_LSA, "(AS-external Opaque-Type/ID)" }, -}; -const int ospf_link_state_id_type_msg_max = OSPF_MAX_LSA; - -const struct message ospf_network_type_msg[] = -{ - { OSPF_IFTYPE_NONE, "NONE" }, - { OSPF_IFTYPE_POINTOPOINT, "Point-to-Point" }, - { OSPF_IFTYPE_BROADCAST, "Broadcast" }, - { OSPF_IFTYPE_NBMA, "NBMA" }, - { OSPF_IFTYPE_POINTOMULTIPOINT, "Point-to-MultiPoint" }, - { OSPF_IFTYPE_VIRTUALLINK, "Virtual-Link" }, -}; -const int ospf_network_type_msg_max = OSPF_IFTYPE_MAX; - -/* AuType */ -const struct message ospf_auth_type_str[] = -{ - { OSPF_AUTH_NULL, "Null" }, - { OSPF_AUTH_SIMPLE, "Simple" }, - { OSPF_AUTH_CRYPTOGRAPHIC, "Cryptographic" }, -}; -const size_t ospf_auth_type_str_max = sizeof (ospf_auth_type_str) / - sizeof (ospf_auth_type_str[0]); - /* Configuration debug option variables. */ unsigned long conf_debug_ospf_packet[5] = {0, 0, 0, 0, 0}; unsigned long conf_debug_ospf_event = 0; @@ -322,25 +239,6 @@ ospf_timer_dump (struct thread *t, char *buf, size_t size) return ospf_timeval_dump (&result, buf, size); } -#define OSPF_OPTION_STR_MAXLEN 24 - -char * -ospf_options_dump (u_char options) -{ - static char buf[OSPF_OPTION_STR_MAXLEN]; - - snprintf (buf, OSPF_OPTION_STR_MAXLEN, "*|%s|%s|%s|%s|%s|%s|%s", - (options & OSPF_OPTION_O) ? "O" : "-", - (options & OSPF_OPTION_DC) ? "DC" : "-", - (options & OSPF_OPTION_EA) ? "EA" : "-", - (options & OSPF_OPTION_NP) ? "N/P" : "-", - (options & OSPF_OPTION_MC) ? "MC" : "-", - (options & OSPF_OPTION_E) ? "E" : "-", - (options & OSPF_OPTION_MT) ? "M/T" : "-"); - - return buf; -} - static void ospf_packet_hello_dump (struct stream *s, u_int16_t length) { @@ -378,24 +276,6 @@ ospf_dd_flags_dump (u_char flags, char *buf, size_t size) return buf; } -void -ospf_lsa_header_dump (struct lsa_header *lsah) -{ - const char *lsah_type = LOOKUP (ospf_lsa_type_msg, lsah->type); - - zlog_debug (" LSA Header"); - zlog_debug (" LS age %d", ntohs (lsah->ls_age)); - zlog_debug (" Options %d (%s)", lsah->options, - ospf_options_dump (lsah->options)); - zlog_debug (" LS type %d (%s)", lsah->type, - (lsah->type ? lsah_type : "unknown type")); - zlog_debug (" Link State ID %s", inet_ntoa (lsah->id)); - zlog_debug (" Advertising Router %s", inet_ntoa (lsah->adv_router)); - zlog_debug (" LS sequence number 0x%lx", (u_long)ntohl (lsah->ls_seqnum)); - zlog_debug (" LS checksum 0x%x", ntohs (lsah->checksum)); - zlog_debug (" length %d", ntohs (lsah->length)); -} - static char * ospf_router_lsa_flags_dump (u_char flags, char *buf, size_t size) { diff --git a/ospfd/ospf_dump.h b/ospfd/ospf_dump.h index f843df03ae..9bed853eed 100644 --- a/ospfd/ospf_dump.h +++ b/ospfd/ospf_dump.h @@ -126,20 +126,16 @@ extern unsigned long term_debug_ospf_te; /* Message Strings. */ extern char *ospf_lsa_type_str[]; -extern const struct message ospf_auth_type_str[]; -extern const size_t ospf_auth_type_str_max; /* Prototypes. */ extern const char *ospf_area_name_string (struct ospf_area *); extern const char *ospf_area_desc_string (struct ospf_area *); extern const char *ospf_if_name_string (struct ospf_interface *); extern void ospf_nbr_state_message (struct ospf_neighbor *, char *, size_t); -extern char *ospf_options_dump (u_char); extern const char *ospf_timer_dump (struct thread *, char *, size_t); extern const char *ospf_timeval_dump (struct timeval *, char *, size_t); extern void ospf_ip_header_dump (struct ip *); extern void ospf_packet_dump (struct stream *); -extern void ospf_lsa_header_dump (struct lsa_header *); extern void debug_init (void); /* Appropriate buffer size to use with ospf_timer_dump and ospf_timeval_dump: */ diff --git a/ospfd/ospf_dump_api.c b/ospfd/ospf_dump_api.c new file mode 100644 index 0000000000..20e7740d32 --- /dev/null +++ b/ospfd/ospf_dump_api.c @@ -0,0 +1,151 @@ +/* + * OSPFd dump routine (parts used by ospfclient). + * Copyright (C) 1999, 2000 Toshiaki Takada + * + * This file is part of FreeRangeRouting (FRR). + * + * FRR is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2, or (at your option) any later version. + * + * FRR is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with FRR; see the file COPYING. If not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include + +#include "log.h" +#include "prefix.h" + +#include "ospf_dump_api.h" +#include "ospfd.h" +#include "ospf_asbr.h" +#include "ospf_lsa.h" +#include "ospf_nsm.h" +#include "ospf_ism.h" + +const struct message ospf_ism_state_msg[] = +{ + { ISM_DependUpon, "DependUpon" }, + { ISM_Down, "Down" }, + { ISM_Loopback, "Loopback" }, + { ISM_Waiting, "Waiting" }, + { ISM_PointToPoint, "Point-To-Point" }, + { ISM_DROther, "DROther" }, + { ISM_Backup, "Backup" }, + { ISM_DR, "DR" }, +}; +const int ospf_ism_state_msg_max = OSPF_ISM_STATE_MAX; + +const struct message ospf_nsm_state_msg[] = +{ + { NSM_DependUpon, "DependUpon" }, + { NSM_Deleted, "Deleted" }, + { NSM_Down, "Down" }, + { NSM_Attempt, "Attempt" }, + { NSM_Init, "Init" }, + { NSM_TwoWay, "2-Way" }, + { NSM_ExStart, "ExStart" }, + { NSM_Exchange, "Exchange" }, + { NSM_Loading, "Loading" }, + { NSM_Full, "Full" }, +}; +const int ospf_nsm_state_msg_max = OSPF_NSM_STATE_MAX; + +const struct message ospf_lsa_type_msg[] = +{ + { OSPF_UNKNOWN_LSA, "unknown" }, + { OSPF_ROUTER_LSA, "router-LSA" }, + { OSPF_NETWORK_LSA, "network-LSA" }, + { OSPF_SUMMARY_LSA, "summary-LSA" }, + { OSPF_ASBR_SUMMARY_LSA, "summary-LSA" }, + { OSPF_AS_EXTERNAL_LSA, "AS-external-LSA" }, + { OSPF_GROUP_MEMBER_LSA, "GROUP MEMBER LSA" }, + { OSPF_AS_NSSA_LSA, "NSSA-LSA" }, + { 8, "Type-8 LSA" }, + { OSPF_OPAQUE_LINK_LSA, "Link-Local Opaque-LSA" }, + { OSPF_OPAQUE_AREA_LSA, "Area-Local Opaque-LSA" }, + { OSPF_OPAQUE_AS_LSA, "AS-external Opaque-LSA" }, +}; +const int ospf_lsa_type_msg_max = OSPF_MAX_LSA; + +const struct message ospf_link_state_id_type_msg[] = +{ + { OSPF_UNKNOWN_LSA, "(unknown)" }, + { OSPF_ROUTER_LSA, "" }, + { OSPF_NETWORK_LSA, "(address of Designated Router)" }, + { OSPF_SUMMARY_LSA, "(summary Network Number)" }, + { OSPF_ASBR_SUMMARY_LSA, "(AS Boundary Router address)" }, + { OSPF_AS_EXTERNAL_LSA, "(External Network Number)" }, + { OSPF_GROUP_MEMBER_LSA, "(Group membership information)" }, + { OSPF_AS_NSSA_LSA, "(External Network Number for NSSA)" }, + { 8, "(Type-8 LSID)" }, + { OSPF_OPAQUE_LINK_LSA, "(Link-Local Opaque-Type/ID)" }, + { OSPF_OPAQUE_AREA_LSA, "(Area-Local Opaque-Type/ID)" }, + { OSPF_OPAQUE_AS_LSA, "(AS-external Opaque-Type/ID)" }, +}; +const int ospf_link_state_id_type_msg_max = OSPF_MAX_LSA; + +const struct message ospf_network_type_msg[] = +{ + { OSPF_IFTYPE_NONE, "NONE" }, + { OSPF_IFTYPE_POINTOPOINT, "Point-to-Point" }, + { OSPF_IFTYPE_BROADCAST, "Broadcast" }, + { OSPF_IFTYPE_NBMA, "NBMA" }, + { OSPF_IFTYPE_POINTOMULTIPOINT, "Point-to-MultiPoint" }, + { OSPF_IFTYPE_VIRTUALLINK, "Virtual-Link" }, +}; +const int ospf_network_type_msg_max = OSPF_IFTYPE_MAX; + +/* AuType */ +const struct message ospf_auth_type_str[] = +{ + { OSPF_AUTH_NULL, "Null" }, + { OSPF_AUTH_SIMPLE, "Simple" }, + { OSPF_AUTH_CRYPTOGRAPHIC, "Cryptographic" }, +}; +const size_t ospf_auth_type_str_max = sizeof (ospf_auth_type_str) / + sizeof (ospf_auth_type_str[0]); + +#define OSPF_OPTION_STR_MAXLEN 24 + +char * +ospf_options_dump (u_char options) +{ + static char buf[OSPF_OPTION_STR_MAXLEN]; + + snprintf (buf, OSPF_OPTION_STR_MAXLEN, "*|%s|%s|%s|%s|%s|%s|%s", + (options & OSPF_OPTION_O) ? "O" : "-", + (options & OSPF_OPTION_DC) ? "DC" : "-", + (options & OSPF_OPTION_EA) ? "EA" : "-", + (options & OSPF_OPTION_NP) ? "N/P" : "-", + (options & OSPF_OPTION_MC) ? "MC" : "-", + (options & OSPF_OPTION_E) ? "E" : "-", + (options & OSPF_OPTION_MT) ? "M/T" : "-"); + + return buf; +} + +void +ospf_lsa_header_dump (struct lsa_header *lsah) +{ + const char *lsah_type = LOOKUP (ospf_lsa_type_msg, lsah->type); + + zlog_debug (" LSA Header"); + zlog_debug (" LS age %d", ntohs (lsah->ls_age)); + zlog_debug (" Options %d (%s)", lsah->options, + ospf_options_dump (lsah->options)); + zlog_debug (" LS type %d (%s)", lsah->type, + (lsah->type ? lsah_type : "unknown type")); + zlog_debug (" Link State ID %s", inet_ntoa (lsah->id)); + zlog_debug (" Advertising Router %s", inet_ntoa (lsah->adv_router)); + zlog_debug (" LS sequence number 0x%lx", (u_long)ntohl (lsah->ls_seqnum)); + zlog_debug (" LS checksum 0x%x", ntohs (lsah->checksum)); + zlog_debug (" length %d", ntohs (lsah->length)); +} diff --git a/ospfd/ospf_dump_api.h b/ospfd/ospf_dump_api.h new file mode 100644 index 0000000000..c3ff1e3f54 --- /dev/null +++ b/ospfd/ospf_dump_api.h @@ -0,0 +1,43 @@ +/* + * OSPFd dump routine (parts used by ospfclient). + * Copyright (C) 1999 Toshiaki Takada + * + * This file is part of FreeRangeRouting (FRR). + * + * FRR is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2, or (at your option) any later version. + * + * FRR is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with FRR; see the file COPYING. If not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef _ZEBRA_OSPF_DUMP_API_H +#define _ZEBRA_OSPF_DUMP_API_H + +#include "log.h" +struct lsa_header; + +extern const struct message ospf_ism_state_msg[]; +extern const struct message ospf_nsm_state_msg[]; +extern const struct message ospf_lsa_type_msg[]; +extern const struct message ospf_link_state_id_type_msg[]; +extern const struct message ospf_network_type_msg[]; +extern const struct message ospf_auth_type_str[]; +extern const int ospf_ism_state_msg_max; +extern const int ospf_nsm_state_msg_max; +extern const int ospf_lsa_type_msg_max; +extern const int ospf_link_state_id_type_msg_max; +extern const int ospf_network_type_msg_max; +extern const size_t ospf_auth_type_str_max; + +extern char *ospf_options_dump (u_char); +extern void ospf_lsa_header_dump (struct lsa_header *); + +#endif /* _ZEBRA_OSPF_DUMP_API_H */ diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h index 41a7a30d85..01395ff985 100644 --- a/ospfd/ospfd.h +++ b/ospfd/ospfd.h @@ -30,6 +30,7 @@ #include "log.h" #include "ospf_memory.h" +#include "ospf_dump_api.h" #define OSPF_VERSION 2 @@ -506,17 +507,7 @@ struct ospf_nbr_nbma /* Extern variables. */ extern struct ospf_master *om; -extern const struct message ospf_ism_state_msg[]; -extern const struct message ospf_nsm_state_msg[]; -extern const struct message ospf_lsa_type_msg[]; -extern const struct message ospf_link_state_id_type_msg[]; -extern const struct message ospf_network_type_msg[]; -extern const int ospf_ism_state_msg_max; -extern const int ospf_nsm_state_msg_max; -extern const int ospf_lsa_type_msg_max; -extern const int ospf_link_state_id_type_msg_max; extern const int ospf_redistributed_proto_max; -extern const int ospf_network_type_msg_max; extern struct zclient *zclient; extern struct thread_master *master; extern int ospf_zlog; From 3d04dc3854bf4c9a54fe1f30cc65d6eefd4b41c4 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 24 Jan 2017 23:26:20 +0100 Subject: [PATCH 23/23] ospfd: make libfrrospf a private non-dynamic lib There's no point in installing libospf anymore, now that libfrrospfclient doesn't link it. Signed-off-by: David Lamparter --- debian/frr.lintian-overrides | 1 - ospfd/Makefile.am | 9 +++------ solaris/prototype.dev.in | 2 -- solaris/prototype.libs.in | 3 --- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/debian/frr.lintian-overrides b/debian/frr.lintian-overrides index 01c623eb22..e21bd9256d 100644 --- a/debian/frr.lintian-overrides +++ b/debian/frr.lintian-overrides @@ -1,4 +1,3 @@ frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrrospfapiclient.so.0.0.0 usr/lib/libfrrospfapiclient.so -frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrrospf.so.0.0.0 usr/lib/libfrrospf.so frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrr.so.0.0.0 usr/lib/libfrr.so frr: package-name-doesnt-match-sonames libfrrospf0 libfrrospfapiclient0 libfrr0 diff --git a/ospfd/Makefile.am b/ospfd/Makefile.am index fec7503619..71e0df0dc5 100644 --- a/ospfd/Makefile.am +++ b/ospfd/Makefile.am @@ -5,13 +5,10 @@ AM_CFLAGS = $(WERROR) DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\" INSTALL_SDATA=@INSTALL@ -m 600 -lib_LTLIBRARIES = libfrrospf.la -libfrrospf_la_LDFLAGS = -version-info 0:0:0 -libfrrospf_la_LIBADD = ../lib/libfrr.la - +noinst_LIBRARIES = libfrrospf.a sbin_PROGRAMS = ospfd -libfrrospf_la_SOURCES = \ +libfrrospf_a_SOURCES = \ ospfd.c ospf_zebra.c ospf_interface.c ospf_ism.c ospf_neighbor.c \ ospf_nsm.c ospf_dump.c ospf_network.c ospf_packet.c ospf_lsa.c \ ospf_spf.c ospf_route.c ospf_ase.c ospf_abr.c ospf_ia.c ospf_flood.c \ @@ -34,7 +31,7 @@ noinst_HEADERS = \ ospfd_SOURCES = ospf_main.c -ospfd_LDADD = libfrrospf.la ../lib/libfrr.la @LIBCAP@ @LIBM@ +ospfd_LDADD = libfrrospf.a ../lib/libfrr.la @LIBCAP@ @LIBM@ EXTRA_DIST = OSPF-MIB.txt OSPF-TRAP-MIB.txt ChangeLog.opaque.txt diff --git a/solaris/prototype.dev.in b/solaris/prototype.dev.in index f40fbdcd52..40d20515c3 100644 --- a/solaris/prototype.dev.in +++ b/solaris/prototype.dev.in @@ -3,8 +3,6 @@ i depend=$abs_builddir/depend.dev i copying=$abs_top_srcdir/COPYING f none @libdir@/libfrr.la=$DESTDIR/@libdir@/libfrr.la 0755 root bin f none @libdir@/libfrr.a=$DESTDIR/@libdir@/libfrr.a 0644 root bin -f none @libdir@/libfrrospf.la=$DESTDIR/@libdir@/libfrrospf.la 0755 root bin -f none @libdir@/libfrrospf.a=$DESTDIR/@libdir@/libfrrospf.a 0644 root bin f none @libdir@/libfrrospfapiclient.la=$DESTDIR/@libdir@/libfrrospfapiclient.la 0755 root bin f none @libdir@/libfrrospfapiclient.a=$DESTDIR/@libdir@/libfrrospfapiclient.a 0644 root bin d none @includedir@=$DESTDIR/@includedir@ 0755 root bin diff --git a/solaris/prototype.libs.in b/solaris/prototype.libs.in index 07fe333bad..bd8e3e4fe7 100644 --- a/solaris/prototype.libs.in +++ b/solaris/prototype.libs.in @@ -5,9 +5,6 @@ d none @libdir@=$DESTDIR/@libdir@ 0755 root bin s none @libdir@/libfrr.so.0=libfrr.so.0.0.0 f none @libdir@/libfrr.so.0.0.0=$DESTDIR/@libdir@/libfrr.so.0.0.0 0755 root bin s none @libdir@/libfrr.so=libfrr.so.0.0.0 -s none @libdir@/libfrrospf.so.0=libfrrospf.so.0.0.0 -f none @libdir@/libfrrospf.so.0.0.0=$DESTDIR/@libdir@/libfrrospf.so.0.0.0 0755 root bin -s none @libdir@/libfrrospf.so=libfrrospf.so.0.0.0 f none @libdir@/libfrrospfapiclient.so.0.0.0=$DESTDIR/@libdir@/libfrrospfapiclient.so.0.0.0 0755 root bin s none @libdir@/libfrrospfapiclient.so.0=libfrrospfapiclient.so.0.0.0 s none @libdir@/libfrrospfapiclient.so=libfrrospfapiclient.so.0.0.0