diff --git a/Makefile.am b/Makefile.am index ae586d1ccc..b4a0e02e76 100644 --- a/Makefile.am +++ b/Makefile.am @@ -51,16 +51,16 @@ include nhrpd/subdir.am include ldpd/subdir.am include babeld/subdir.am include eigrpd/subdir.am +include pimd/subdir.am SUBDIRS = . @LIBRFP@ @RFPTEST@ \ @BGPD@ \ - @PIMD@ \ @VTYSH@ @DOC@ \ @SOLARIS@ tests DIST_SUBDIRS = . bgpd \ vtysh doc tests \ - solaris pimd bgpd/rfp-example/librfp \ + solaris bgpd/rfp-example/librfp \ bgpd/rfp-example/rfptest \ # end diff --git a/configure.ac b/configure.ac index 5b78e6accf..63bde5fcda 100755 --- a/configure.ac +++ b/configure.ac @@ -1298,12 +1298,7 @@ AM_CONDITIONAL(RIPNGD, test "${enable_ripngd}" != "no") AM_CONDITIONAL(BABELD, test "${enable_babeld}" != "no") AM_CONDITIONAL(OSPF6D, test "${enable_ospf6d}" != "no") AM_CONDITIONAL(ISISD, test "${enable_isisd}" != "no") - -case "${enable_pimd}" in - "no" ) PIMD="";; - * ) PIMD="pimd";; -esac -AM_CONDITIONAL(PIMD, test "x$PIMD" = "xpimd") +AM_CONDITIONAL(PIMD, test "${enable_pimd}" != "no") if test "${enable_bgp_announce}" = "no";then AC_DEFINE(DISABLE_BGP_ANNOUNCE,1,Disable BGP installation to zebra) @@ -1337,7 +1332,6 @@ AC_SUBST(RFPTEST) AC_SUBST(LIBRFP) AC_SUBST(RFPINC) AC_SUBST(BGPD) -AC_SUBST(PIMD) AC_SUBST(SOLARIS) AC_SUBST(VTYSH) AC_SUBST(CURSES) @@ -1814,7 +1808,6 @@ AC_CONFIG_FILES([Makefile vtysh/Makefile doc/Makefile tests/Makefile bgpd/rfp-example/rfptest/Makefile bgpd/rfp-example/librfp/Makefile - pimd/Makefile redhat/frr.spec snapcraft/snapcraft.yaml lib/version.h diff --git a/pimd/.gitignore b/pimd/.gitignore index 51a2ac87ee..e23216b058 100644 --- a/pimd/.gitignore +++ b/pimd/.gitignore @@ -1,4 +1,4 @@ -Makefile +!Makefile Makefile.in libpim.a pimd diff --git a/pimd/Makefile b/pimd/Makefile new file mode 100644 index 0000000000..87a5388572 --- /dev/null +++ b/pimd/Makefile @@ -0,0 +1,10 @@ +all: ALWAYS + @$(MAKE) -s -C .. pimd/pimd +%: ALWAYS + @$(MAKE) -s -C .. pimd/$@ + +Makefile: + #nothing +ALWAYS: +.PHONY: ALWAYS makefiles +.SUFFIXES: diff --git a/pimd/Makefile.am b/pimd/Makefile.am deleted file mode 100644 index f440221d42..0000000000 --- a/pimd/Makefile.am +++ /dev/null @@ -1,82 +0,0 @@ -## Process this file with automake to produce Makefile.in. - -# qpimd - pimd for quagga -# Copyright (C) 2008 Everton da Silva Marques -# -# qpimd 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. -# -# qpimd 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 qpimd; see the file COPYING. If not, write -# to the Free Software Foundation, Inc., 59 Temple Place - Suite -# 330, Boston, MA 02111-1307, USA. - -# PIM_DEBUG_BYDEFAULT: Automatically enables all pimd "debug ..." commands -# PIM_CHECK_RECV_IFINDEX_SANITY: Compare socket ifindex with recv ifindex -# PIM_REPORT_RECV_IFINDEX_MISMATCH: Report sock/recv ifindex mismatch -# PIM_ENFORCE_LOOPFREE_MFC: Refuse adding looping MFC entries -# PIM_UNEXPECTED_KERNEL_UPCALL: Report unexpected kernel upcall - -PIM_DEFS = -#PIM_DEFS += -DPIM_DEBUG_BYDEFAULT -#PIM_DEFS += -DPIM_CHECK_RECV_IFINDEX_SANITY -#PIM_DEFS += -DPIM_REPORT_RECV_IFINDEX_MISMATCH -PIM_DEFS += -DPIM_ENFORCE_LOOPFREE_MFC -#PIM_DEFS += -DPIM_UNEXPECTED_KERNEL_UPCALL - -AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib -DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" $(PIM_DEFS) -INSTALL_SDATA=@INSTALL@ -m 600 -LIBS = @LIBS@ - -AM_CFLAGS = $(WERROR) - -noinst_LIBRARIES = libpim.a -sbin_PROGRAMS = pimd -noinst_PROGRAMS = test_igmpv3_join - -libpim_a_SOURCES = \ - pim_memory.c \ - pimd.c pim_version.c pim_cmd.c pim_signals.c pim_iface.c \ - pim_vty.c pim_igmp.c pim_sock.c pim_zebra.c pim_igmpv2.c \ - pim_igmpv3.c pim_str.c pim_mroute.c pim_util.c pim_time.c \ - pim_oil.c pim_zlookup.c pim_pim.c pim_tlv.c pim_neighbor.c \ - pim_hello.c pim_ifchannel.c pim_join.c pim_assert.c \ - pim_msg.c pim_upstream.c pim_rpf.c pim_macro.c \ - pim_ssmpingd.c pim_int.c pim_rp.c \ - pim_static.c pim_br.c pim_register.c pim_routemap.c \ - pim_msdp.c pim_msdp_socket.c pim_msdp_packet.c \ - pim_jp_agg.c pim_nht.c pim_ssm.c pim_bfd.c \ - pim_instance.c - -noinst_HEADERS = \ - pim_memory.h \ - pimd.h pim_version.h pim_cmd.h pim_signals.h pim_iface.h \ - pim_vty.h pim_igmp.h pim_sock.h pim_zebra.h pim_igmpv2.h \ - pim_igmpv3.h pim_str.h pim_mroute.h pim_util.h pim_time.h \ - pim_oil.h pim_zlookup.h pim_pim.h pim_tlv.h pim_neighbor.h \ - pim_hello.h pim_ifchannel.h pim_join.h pim_assert.h \ - pim_msg.h pim_upstream.h pim_rpf.h pim_macro.h \ - pim_igmp_join.h pim_ssmpingd.h pim_int.h pim_rp.h \ - pim_static.h pim_br.h pim_register.h \ - pim_msdp.h pim_msdp_socket.h pim_msdp_packet.h pim_nht.h \ - pim_jp_agg.h pim_ssm.h pim_bfd.h pim_instance.h - -pimd_SOURCES = \ - pim_main.c $(libpim_a_SOURCES) - -test_igmpv3_join_SOURCES = \ - test_igmpv3_join.c - -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/pimd.h b/pimd/pimd.h index ed51db3dee..c4431651ed 100644 --- a/pimd/pimd.h +++ b/pimd/pimd.h @@ -40,6 +40,8 @@ #define PIM_IP_PROTO_PIM (103) #define PIM_IGMP_MIN_LEN (8) +#define PIM_ENFORCE_LOOPFREE_MFC + /* * PIM MSG Header Format * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 diff --git a/pimd/subdir.am b/pimd/subdir.am new file mode 100644 index 0000000000..2fcb061576 --- /dev/null +++ b/pimd/subdir.am @@ -0,0 +1,110 @@ +# +# pimd +# + +if PIMD +noinst_LIBRARIES += pimd/libpim.a +sbin_PROGRAMS += pimd/pimd +noinst_PROGRAMS += pimd/test_igmpv3_join +dist_examples_DATA += pimd/pimd.conf.sample +endif + +pimd_libpim_a_SOURCES = \ + pimd/pim_assert.c \ + pimd/pim_bfd.c \ + pimd/pim_br.c \ + pimd/pim_cmd.c \ + pimd/pim_hello.c \ + pimd/pim_iface.c \ + pimd/pim_ifchannel.c \ + pimd/pim_igmp.c \ + pimd/pim_igmpv2.c \ + pimd/pim_igmpv3.c \ + pimd/pim_instance.c \ + pimd/pim_int.c \ + pimd/pim_join.c \ + pimd/pim_jp_agg.c \ + pimd/pim_macro.c \ + pimd/pim_memory.c \ + pimd/pim_mroute.c \ + pimd/pim_msdp.c \ + pimd/pim_msdp_packet.c \ + pimd/pim_msdp_socket.c \ + pimd/pim_msg.c \ + pimd/pim_neighbor.c \ + pimd/pim_nht.c \ + pimd/pim_oil.c \ + pimd/pim_pim.c \ + pimd/pim_register.c \ + pimd/pim_routemap.c \ + pimd/pim_rp.c \ + pimd/pim_rpf.c \ + pimd/pim_signals.c \ + pimd/pim_sock.c \ + pimd/pim_ssm.c \ + pimd/pim_ssmpingd.c \ + pimd/pim_static.c \ + pimd/pim_str.c \ + pimd/pim_time.c \ + pimd/pim_tlv.c \ + pimd/pim_upstream.c \ + pimd/pim_util.c \ + pimd/pim_version.c \ + pimd/pim_vty.c \ + pimd/pim_zebra.c \ + pimd/pim_zlookup.c \ + pimd/pimd.c \ + # end + +noinst_HEADERS += \ + pimd/pim_assert.h \ + pimd/pim_bfd.h \ + pimd/pim_br.h \ + pimd/pim_cmd.h \ + pimd/pim_hello.h \ + pimd/pim_iface.h \ + pimd/pim_ifchannel.h \ + pimd/pim_igmp.h \ + pimd/pim_igmp_join.h \ + pimd/pim_igmpv2.h \ + pimd/pim_igmpv3.h \ + pimd/pim_instance.h \ + pimd/pim_int.h \ + pimd/pim_join.h \ + pimd/pim_jp_agg.h \ + pimd/pim_macro.h \ + pimd/pim_memory.h \ + pimd/pim_mroute.h \ + pimd/pim_msdp.h \ + pimd/pim_msdp_packet.h \ + pimd/pim_msdp_socket.h \ + pimd/pim_msg.h \ + pimd/pim_neighbor.h \ + pimd/pim_nht.h \ + pimd/pim_oil.h \ + pimd/pim_pim.h \ + pimd/pim_register.h \ + pimd/pim_rp.h \ + pimd/pim_rpf.h \ + pimd/pim_signals.h \ + pimd/pim_sock.h \ + pimd/pim_ssm.h \ + pimd/pim_ssmpingd.h \ + pimd/pim_static.h \ + pimd/pim_str.h \ + pimd/pim_time.h \ + pimd/pim_tlv.h \ + pimd/pim_upstream.h \ + pimd/pim_util.h \ + pimd/pim_version.h \ + pimd/pim_vty.h \ + pimd/pim_zebra.h \ + pimd/pim_zlookup.h \ + pimd/pimd.h \ + # end + +pimd_pimd_LDADD = pimd/libpim.a lib/libfrr.la @LIBCAP@ +pimd_pimd_SOURCES = pimd/pim_main.c + +pimd_test_igmpv3_join_LDADD = lib/libfrr.la +pimd_test_igmpv3_join_SOURCES = pimd/test_igmpv3_join.c