]> git.proxmox.com Git - mirror_frr.git/commitdiff
bfdd: wire to the build process
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 27 Jun 2018 15:24:51 +0000 (12:24 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 8 Aug 2018 21:24:58 +0000 (18:24 -0300)
Add BFD daemon to the build process and packaging instructions.

Currently the bfdd daemon does nothing, this is just to document how the
daemon insertion step occured.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
12 files changed:
Makefile.am
configure.ac
debianpkg/backports/ubuntu12.04/debian/rules
debianpkg/backports/ubuntu14.04/debian/rules
debianpkg/rules
redhat/daemons
redhat/frr.init
redhat/frr.logrotate
redhat/frr.spec.in
tools/etc/frr/daemons
tools/etc/frr/daemons.conf
tools/frr

index 8c96f39f397a23586eddf7635161cb48b6123410..3e268f703da3beb8bac5fae4171962db2e04c075 100644 (file)
@@ -56,6 +56,7 @@ include sharpd/subdir.am
 include pimd/subdir.am
 include pbrd/subdir.am
 include staticd/subdir.am
+include bfdd/subdir.am
 
 SUBDIRS = . @LIBRFP@ @RFPTEST@ \
         @BGPD@ \
index f65b1640d2054a8b7a4885af20628af4bc9ece53..9e7ca2f7e1eadf0baca022fb7140f5d9583db830 100755 (executable)
@@ -452,6 +452,8 @@ AC_ARG_ENABLE([numeric_version],
   AS_HELP_STRING([--enable-numeric-version], [Only numeric digits allowed in version (for Alpine)]))
 AC_ARG_ENABLE([gcov],
   AS_HELP_STRING([--enable-gcov], [Add code coverage information]))
+AC_ARG_ENABLE(bfdd,
+  AS_HELP_STRING([--disable-bfdd], [do not build bfdd]))
 
 AS_IF([test "${enable_clippy_only}" != "yes"], [
 AC_CHECK_HEADERS(json-c/json.h)
@@ -1368,6 +1370,30 @@ AS_IF([test "${enable_ldpd}" != "no"], [
   AC_DEFINE(HAVE_LDPD, 1, ldpd)
 ])
 
+if test "$enable_bfdd" = "no"; then
+  AC_DEFINE(HAVE_BFDD, 0, bfdd)
+  BFDD=""
+else
+  AC_DEFINE(HAVE_BFDD, 1, bfdd)
+  BFDD="bfdd"
+
+  case $host_os in
+    linux*)
+      AC_DEFINE(BFD_LINUX, 1, bfdd)
+      ;;
+
+    *)
+      AC_DEFINE(BFD_BSD, 1, bfdd)
+      ;;
+  esac
+fi
+
+AM_CONDITIONAL(BFDD, [test "x$BFDD" = "xbfdd"])
+
+if test $ac_cv_lib_json_c_json_object_get = no -a "x$BFDD" = "xbfdd"; then
+  AC_MSG_ERROR(["you must use json-c library to use bfdd"])
+fi
+
 NHRPD=""
 case "$host_os" in
   linux*)
@@ -1880,6 +1906,7 @@ AC_SUBST(frr_statedir)
 
 AC_DEFINE_UNQUOTED(LDPD_SOCKET, "$frr_statedir/ldpd.sock",ldpd control socket)
 AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$frr_statedir/zserv.api",zebra api socket)
+AC_DEFINE_UNQUOTED(BFDD_CONTROL_SOCKET, "$frr_statedir/bfdd.sock", bfdd control socket)
 AC_DEFINE_UNQUOTED(DAEMON_VTY_DIR, "$frr_statedir",daemon vty directory)
 
 dnl autoconf does this, but it does it too late...
index 01ad81d371a86e8024fb4cc4cd351432fe29b1a6..3a6c80297eb5a929e895a38f36e701755dbbb9e0 100755 (executable)
@@ -134,6 +134,7 @@ override_dh_auto_configure:
                --enable-poll=yes \
                $(USE_CUMULUS) \
                $(USE_PIM) \
+               --disable-bfdd \
                --enable-dependency-tracking \
                $(USE_BGP_VNC) \
                $(shell dpkg-buildflags --export=configure); \
index f7b9428658bcfec5034e8b47f96f2b78e8d134de..f7468d6f791fc16218dcc9e1d86e78af2a957f30 100755 (executable)
@@ -16,6 +16,7 @@ WANT_CUMULUS_MODE ?= 0
 WANT_MULTIPATH ?= 1
 WANT_SNMP ?= 0
 WANT_RPKI ?= 0
+WANT_BFD ?= 1
 
 # NOTES:
 #
@@ -108,6 +109,12 @@ else
   USE_RPKI=--disable-rpki
 endif
 
+ifeq ($(WANT_BFD), 1)
+  USE_BFD=--enable-bfdd
+else
+  USE_BFD=--disable-bfdd
+endif
+
 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
   DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 endif
@@ -159,6 +166,7 @@ override_dh_auto_configure:
                --enable-dependency-tracking \
                $(USE_BGP_VNC) \
                $(USE_RPKI) \
+               $(USE_BFD) \
                $(shell dpkg-buildflags --export=configure); \
        fi
 
index 9c84c065161fa136add2d5080f8524a60681dfba..c1cb865490f3a2bad277cb66e1226e3019c57a1b 100755 (executable)
@@ -16,6 +16,7 @@ WANT_CUMULUS_MODE ?= 0
 WANT_MULTIPATH ?= 1
 WANT_SNMP ?= 0
 WANT_RPKI ?= 0
+WANT_BFD ?= 1
 
 # NOTES:
 #
@@ -108,6 +109,12 @@ else
   USE_RPKI=--disable-rpki
 endif
 
+ifeq ($(WANT_BFD), 1)
+  USE_BFD=--enable-bfdd
+else
+  USE_BFD=--disable-bfdd
+endif
+
 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
   DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 endif
@@ -160,6 +167,7 @@ override_dh_auto_configure:
                --enable-dependency-tracking \
                $(USE_BGP_VNC) \
                $(USE_RPKI) \
+               $(USE_BFD) \
                $(shell dpkg-buildflags --export=configure); \
        fi
 
index f9dbffea4d8e43420813fba7c7900ce9fdca7f51..de708cf4fd7e313f6866c97543641cec8527bdd3 100644 (file)
@@ -52,6 +52,8 @@ babeld=no
 sharpd=no
 pbrd=no
 staticd=no
+bfdd=no
+
 #
 # Command line options for the daemons
 #
@@ -70,6 +72,7 @@ babeld_options=("-A 127.0.0.1")
 sharpd_options=("-A 127.0.0.1")
 pbrd_options=("-A 127.0.0.1")
 staticd_options=("-A 127.0.0.1")
+bfdd_options=("-A 127.0.0.1")
 
 #
 # If the vtysh_enable is yes, then the unified config is read
index 740aa5b64dfb70d4de4dbdc4c84ab9b4c5d6ae09..2e33aee1730c84c70afef20d9e4f83315c6ecfe0 100755 (executable)
@@ -7,7 +7,7 @@
 #
 # chkconfig: 2345 15 85
 #
-# description: FRRouting (FRR) is a routing suite for IP routing protocols 
+# description: FRRouting (FRR) is a routing suite for IP routing protocols
 #              like BGP, OSPF, RIP and others. This script contols the main
 #              daemon "frr" as well as the individual protocol daemons.
 #
@@ -20,7 +20,7 @@
 # Default-Start: 2 3 4 5
 # Default-Stop: 0 1 6
 # Short-Description: Start/Stop the FRR Routing daemons
-# Description: FRRouting (FRR) is a routing suite for IP routing protocols 
+# Description: FRRouting (FRR) is a routing suite for IP routing protocols
 #              like BGP, OSPF, RIP and others. This script contols the main
 #              daemon "frr" as well as the individual protocol daemons.
 ### END INIT INFO
@@ -33,7 +33,7 @@ V_PATH=/var/run/frr
 # Local Daemon selection may be done by using /etc/frr/daemons.
 # See /usr/share/doc/frr/README.Debian.gz for further information.
 # Keep zebra first and do not list watchfrr!
-DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd pbrd ldpd nhrpd eigrpd babeld staticd sharpd"
+DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd pimd pbrd ldpd nhrpd eigrpd babeld staticd sharpd bfdd"
 MAX_INSTANCES=5
 RELOAD_SCRIPT=/usr/lib/frr/frr-reload.py
 
index 25a5587787f07f70e5091e6d5eb3957dbd7cf96a..654d355fd7ea94cbeb6e79a9620c96d0b2a34afe 100644 (file)
     endscript
 }
 
+/var/log/frr/bfdd.log {
+    notifempty
+    missingok
+    postrotate
+    /bin/kill -USR1 `cat /var/run/frr/bfdd.pid 2> /dev/null` 2> /dev/null || true
+    endscript
+}
index f5b116978e4e27660d81ba3a414996732169523a..25b48506a6ed7b22d5660b2f19642e08c5fe1441 100644 (file)
@@ -11,6 +11,7 @@
 #################### FRRouting (FRR) configure options #####################
 # with-feature options
 %{!?with_babeld:        %global  with_babeld        1 }
+%{!?with_bfdd:          %global  with_bfdd          1 }
 %{!?with_bgp_vnc:       %global  with_bgp_vnc       0 }
 %{!?with_cumulus:       %global  with_cumulus       0 }
 %{!?with_eigrpd:        %global  with_eigrpd        1 }
@@ -85,7 +86,7 @@
 %{!?frr_gid:            %global  frr_gid            92 }
 %{!?vty_gid:            %global  vty_gid            85 }
 
-%define daemon_list zebra ripd ospfd bgpd isisd ripngd ospf6d pbrd staticd
+%define daemon_list zebra ripd ospfd bgpd isisd ripngd ospf6d pbrd staticd bfdd
 
 %if %{with_ldpd}
     %define daemon_ldpd ldpd
     %define daemon_watchfrr ""
 %endif
 
-%define all_daemons %{daemon_list} %{daemon_ldpd} %{daemon_pimd} %{daemon_nhrpd} %{daemon_eigrpd} %{daemon_babeld} %{daemon_watchfrr} %{daemon_pbrd}
+%if %{with_bfdd}
+    %define daemon_bfdd bfdd
+%else
+    %define daemon_bfdd ""
+%endif
+
+%define all_daemons %{daemon_list} %{daemon_ldpd} %{daemon_pimd} %{daemon_nhrpd} %{daemon_eigrpd} %{daemon_babeld} %{daemon_watchfrr} %{daemon_pbrd} %{daemon_bfdd}
 
 #release sub-revision (the two digits after the CONFDATE)
 %{!?release_rev:        %global  release_rev        01 }
@@ -193,7 +200,7 @@ protocol. It takes multi-server and multi-thread approach to resolve
 the current complexity of the Internet.
 
 FRRouting supports BGP4, OSPFv2, OSPFv3, ISIS, RIP, RIPng, PIM, LDP
-NHRP, Babel, PBR and EIGRP.
+NHRP, Babel, PBR, EIGRP and BFD.
 
 FRRouting is a fork of Quagga.
 
@@ -331,9 +338,14 @@ developing OSPF-API and frr applications.
     --enable-systemd \
 %endif
 %if %{with_rpki}
-    --enable-rpki
+    --enable-rpki \
+%else
+    --disable-rpki \
+%endif
+%if %{with_bfdd}
+    --enable-bfdd
 %else
-    --disable-rpki
+    --disable-bfdd
 %endif
 
 make %{?_smp_mflags} MAKEINFO="makeinfo --no-split" SPHINXBUILD=%{sphinx}
@@ -444,6 +456,9 @@ zebra_spec_add_service isisd    2608/tcp "ISISd vty"
 %if %{with_eigrpd}
     zebra_spec_add_service eigrpd   2613/tcp "EIGRPd vty"
 %endif
+%if %{with_bfdd}
+    zebra_spec_add_service bfdd     2617/tcp "BFDd vty"
+%endif
 
 %if "%{initsystem}" == "systemd"
     for daemon in %all_daemons ; do
@@ -591,6 +606,9 @@ fi
 %if %{with_babeld}
     %{_sbindir}/babeld
 %endif
+%if %{with_bfdd}
+    %{_sbindir}/bfdd
+%endif
 %{_libdir}/lib*.so.0
 %{_libdir}/lib*.so.0.*
 %if %{with_fpm}
@@ -644,6 +662,9 @@ fi
 
 
 %changelog
+* Sun May 28 2018 Rafael Zalamena <rzalamena@opensourcerouting.org> - %{version}
+- Add BFDd support
+
 * Sun May 20 2018 Martin Winter <mwinter@opensourcerouting.org>
 - Fixed RPKI RPM build
 
index 9a96c0490ae0f41ccfae6f345c5866b560e2ea11..474b299d90003c5baef343c86166270e8a5532d9 100644 (file)
@@ -35,3 +35,4 @@ eigrpd=no
 babeld=no
 sharpd=no
 pbrd=no
+bfdd=no
index 04a857f47d26dc2ba8f0d08a447b33c55bd23e2d..640437f441ce1fe0bef1021bb5ae6b4356c0669d 100644 (file)
@@ -19,6 +19,7 @@ babeld_options="  --daemon -A 127.0.0.1"
 sharpd_options="  --daemon -A 127.0.0.1"
 pbrd_options="  --daemon -A 127.0.0.1"
 staticd_options="  --daemon -A 127.0.0.1"
+bfdd_options="  --daemon -A 127.0.0.1"
 
 # The list of daemons to watch is automatically generated by the init script.
 watchfrr_enable=yes
index 91c9091448a42d33306d3b114c95415cf811efcf..0b170d33fd62f386728a177aea0946741113abb7 100755 (executable)
--- a/tools/frr
+++ b/tools/frr
@@ -21,7 +21,7 @@ V_PATH=/var/run/frr
 # Local Daemon selection may be done by using /etc/frr/daemons.
 # See /usr/share/doc/frr/README.Debian.gz for further information.
 # Keep zebra first and do not list watchfrr!
-DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld pimd ldpd nhrpd eigrpd sharpd pbrd staticd"
+DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld pimd ldpd nhrpd eigrpd sharpd pbrd staticd bfdd"
 MAX_INSTANCES=5
 RELOAD_SCRIPT=/usr/lib/frr/frr-reload.py