summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/.cvsignore1
-rw-r--r--bgpd/ChangeLog5
-rw-r--r--bgpd/Makefile.am2
-rw-r--r--bgpd/Makefile.in463
-rw-r--r--bgpd/bgp_advertise.h33
-rw-r--r--bgpd/bgp_aspath.c2
-rw-r--r--bgpd/bgp_clist.c48
-rw-r--r--bgpd/bgp_clist.h1
-rw-r--r--bgpd/bgp_dump.c33
-rw-r--r--bgpd/bgp_ecommunity.c39
-rw-r--r--bgpd/bgp_ecommunity.h2
-rw-r--r--bgpd/bgp_main.c26
-rw-r--r--bgpd/bgp_network.c25
-rw-r--r--bgpd/bgp_nexthop.c8
-rw-r--r--bgpd/bgp_packet.c1
-rw-r--r--bgpd/bgp_route.c21
-rw-r--r--bgpd/bgp_routemap.c13
-rw-r--r--bgpd/bgp_snmp.c3
-rw-r--r--bgpd/bgp_zebra.c4
-rw-r--r--bgpd/bgpd.c16
-rw-r--r--bgpd/bgpd.h1
21 files changed, 94 insertions, 653 deletions
diff --git a/bgpd/.cvsignore b/bgpd/.cvsignore
index 8edffb6e..838b5a47 100644
--- a/bgpd/.cvsignore
+++ b/bgpd/.cvsignore
@@ -1,4 +1,5 @@
Makefile
+Makefile.in
*.o
bgpd
bgp_btoa
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index 39e6185e..9a201ed4 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-19 Hasso Tepper <hasso@estpak.ee>
+
+ * rip_routemap.c: sync daemon's route-map commands to have same
+ syntax
+
2003-01-09 Akihiro Mizutani <mizutani@net-chef.net>
* bgp_routemap.c: Add match extcommunity command.
diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am
index 0e549cc0..7f739f6e 100644
--- a/bgpd/Makefile.am
+++ b/bgpd/Makefile.am
@@ -24,7 +24,7 @@ noinst_HEADERS = \
bgpd_SOURCES = \
bgp_main.c $(libbgp_a_SOURCES)
-bgpd_LDADD = ../lib/libzebra.a @LIBCAP@
+bgpd_LDADD = ../lib/libzebra.a
sysconf_DATA = bgpd.conf.sample bgpd.conf.sample2
diff --git a/bgpd/Makefile.in b/bgpd/Makefile.in
deleted file mode 100644
index f6cceec4..00000000
--- a/bgpd/Makefile.in
+++ /dev/null
@@ -1,463 +0,0 @@
-# Makefile.in generated by automake 1.6.3 from Makefile.am.
-# @configure_input@
-
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = @program_transform_name@
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-host_alias = @host_alias@
-host_triplet = @host@
-
-EXEEXT = @EXEEXT@
-OBJEXT = @OBJEXT@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-AMTAR = @AMTAR@
-AR = @AR@
-AWK = @AWK@
-BGPD = @BGPD@
-CC = @CC@
-CPP = @CPP@
-CURSES = @CURSES@
-DEPDIR = @DEPDIR@
-IF_METHOD = @IF_METHOD@
-IF_PROC = @IF_PROC@
-
-INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPFORWARD = @IPFORWARD@
-KERNEL_METHOD = @KERNEL_METHOD@
-LIBPAM = @LIBPAM@
-LIB_IPV6 = @LIB_IPV6@
-LIB_REGEX = @LIB_REGEX@
-MULTIPATH_NUM = @MULTIPATH_NUM@
-OSPF6D = @OSPF6D@
-OSPFD = @OSPFD@
-OTHER_METHOD = @OTHER_METHOD@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-RIPD = @RIPD@
-RIPNGD = @RIPNGD@
-RTREAD_METHOD = @RTREAD_METHOD@
-RT_METHOD = @RT_METHOD@
-STRIP = @STRIP@
-VERSION = @VERSION@
-VTYSH = @VTYSH@
-ZEBRA = @ZEBRA@
-am__include = @am__include@
-am__quote = @am__quote@
-install_sh = @install_sh@
-DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
-INSTALL_SDATA = @INSTALL@ -m 600
-
-noinst_LIBRARIES = libbgp.a
-sbin_PROGRAMS = bgpd
-
-libbgp_a_SOURCES = \
- bgpd.c bgp_fsm.c bgp_aspath.c bgp_community.c bgp_attr.c \
- bgp_debug.c bgp_route.c bgp_zebra.c bgp_open.c bgp_routemap.c \
- bgp_packet.c bgp_network.c bgp_filter.c bgp_regex.c bgp_clist.c \
- bgp_dump.c bgp_snmp.c bgp_ecommunity.c bgp_mplsvpn.c bgp_nexthop.c \
- bgp_damp.c bgp_table.c bgp_advertise.c bgp_vty.c
-
-
-noinst_HEADERS = \
- bgp_aspath.h bgp_attr.h bgp_community.h bgp_debug.h bgp_fsm.h \
- bgp_network.h bgp_open.h bgp_packet.h bgp_regex.h bgp_route.h \
- bgpd.h bgp_filter.h bgp_clist.h bgp_dump.h bgp_zebra.h \
- bgp_ecommunity.h bgp_mplsvpn.h bgp_nexthop.h bgp_damp.h bgp_table.h \
- bgp_advertise.h bgp_snmp.h bgp_vty.h
-
-
-bgpd_SOURCES = \
- bgp_main.c $(libbgp_a_SOURCES)
-
-
-bgpd_LDADD = ../lib/libzebra.a
-
-sysconf_DATA = bgpd.conf.sample bgpd.conf.sample2
-
-EXTRA_DIST = $(sysconf_DATA) BGP4-MIB.txt
-subdir = bgpd
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-libbgp_a_AR = $(AR) cru
-libbgp_a_LIBADD =
-am_libbgp_a_OBJECTS = bgpd.$(OBJEXT) bgp_fsm.$(OBJEXT) \
- bgp_aspath.$(OBJEXT) bgp_community.$(OBJEXT) bgp_attr.$(OBJEXT) \
- bgp_debug.$(OBJEXT) bgp_route.$(OBJEXT) bgp_zebra.$(OBJEXT) \
- bgp_open.$(OBJEXT) bgp_routemap.$(OBJEXT) bgp_packet.$(OBJEXT) \
- bgp_network.$(OBJEXT) bgp_filter.$(OBJEXT) bgp_regex.$(OBJEXT) \
- bgp_clist.$(OBJEXT) bgp_dump.$(OBJEXT) bgp_snmp.$(OBJEXT) \
- bgp_ecommunity.$(OBJEXT) bgp_mplsvpn.$(OBJEXT) \
- bgp_nexthop.$(OBJEXT) bgp_damp.$(OBJEXT) bgp_table.$(OBJEXT) \
- bgp_advertise.$(OBJEXT) bgp_vty.$(OBJEXT)
-libbgp_a_OBJECTS = $(am_libbgp_a_OBJECTS)
-sbin_PROGRAMS = bgpd$(EXEEXT)
-PROGRAMS = $(sbin_PROGRAMS)
-
-am__objects_1 = bgpd.$(OBJEXT) bgp_fsm.$(OBJEXT) bgp_aspath.$(OBJEXT) \
- bgp_community.$(OBJEXT) bgp_attr.$(OBJEXT) bgp_debug.$(OBJEXT) \
- bgp_route.$(OBJEXT) bgp_zebra.$(OBJEXT) bgp_open.$(OBJEXT) \
- bgp_routemap.$(OBJEXT) bgp_packet.$(OBJEXT) \
- bgp_network.$(OBJEXT) bgp_filter.$(OBJEXT) bgp_regex.$(OBJEXT) \
- bgp_clist.$(OBJEXT) bgp_dump.$(OBJEXT) bgp_snmp.$(OBJEXT) \
- bgp_ecommunity.$(OBJEXT) bgp_mplsvpn.$(OBJEXT) \
- bgp_nexthop.$(OBJEXT) bgp_damp.$(OBJEXT) bgp_table.$(OBJEXT) \
- bgp_advertise.$(OBJEXT) bgp_vty.$(OBJEXT)
-am_bgpd_OBJECTS = bgp_main.$(OBJEXT) $(am__objects_1)
-bgpd_OBJECTS = $(am_bgpd_OBJECTS)
-bgpd_DEPENDENCIES = ../lib/libzebra.a
-bgpd_LDFLAGS =
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/bgp_advertise.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_aspath.Po ./$(DEPDIR)/bgp_attr.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_clist.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_community.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_damp.Po ./$(DEPDIR)/bgp_debug.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_dump.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_ecommunity.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_filter.Po ./$(DEPDIR)/bgp_fsm.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_main.Po ./$(DEPDIR)/bgp_mplsvpn.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_network.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_nexthop.Po ./$(DEPDIR)/bgp_open.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_packet.Po ./$(DEPDIR)/bgp_regex.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_route.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_routemap.Po ./$(DEPDIR)/bgp_snmp.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_table.Po ./$(DEPDIR)/bgp_vty.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/bgp_zebra.Po ./$(DEPDIR)/bgpd.Po
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-CFLAGS = @CFLAGS@
-DIST_SOURCES = $(libbgp_a_SOURCES) $(bgpd_SOURCES)
-DATA = $(sysconf_DATA)
-
-HEADERS = $(noinst_HEADERS)
-
-DIST_COMMON = $(noinst_HEADERS) ChangeLog Makefile.am Makefile.in
-SOURCES = $(libbgp_a_SOURCES) $(bgpd_SOURCES)
-
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign bgpd/Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libbgp.a: $(libbgp_a_OBJECTS) $(libbgp_a_DEPENDENCIES)
- -rm -f libbgp.a
- $(libbgp_a_AR) libbgp.a $(libbgp_a_OBJECTS) $(libbgp_a_LIBADD)
- $(RANLIB) libbgp.a
-sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-install-sbinPROGRAMS: $(sbin_PROGRAMS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(sbindir)
- @list='$(sbin_PROGRAMS)'; for p in $$list; do \
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) $$p $(DESTDIR)$(sbindir)/$$f"; \
- $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) $$p $(DESTDIR)$(sbindir)/$$f; \
- else :; fi; \
- done
-
-uninstall-sbinPROGRAMS:
- @$(NORMAL_UNINSTALL)
- @list='$(sbin_PROGRAMS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f $(DESTDIR)$(sbindir)/$$f"; \
- rm -f $(DESTDIR)$(sbindir)/$$f; \
- done
-
-clean-sbinPROGRAMS:
- -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
-bgpd$(EXEEXT): $(bgpd_OBJECTS) $(bgpd_DEPENDENCIES)
- @rm -f bgpd$(EXEEXT)
- $(LINK) $(bgpd_LDFLAGS) $(bgpd_OBJECTS) $(bgpd_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_advertise.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_aspath.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_attr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_clist.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_community.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_damp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_debug.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_dump.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_ecommunity.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_filter.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_fsm.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_mplsvpn.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_network.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_nexthop.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_open.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_packet.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_regex.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_route.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_routemap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_snmp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_table.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_vty.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgp_zebra.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bgpd.Po@am__quote@
-
-distclean-depend:
- -rm -rf ./$(DEPDIR)
-
-.c.o:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
-
-.c.obj:
-@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- $(COMPILE) -c `cygpath -w $<`
-CCDEPMODE = @CCDEPMODE@
-uninstall-info-am:
-sysconfDATA_INSTALL = $(INSTALL_DATA)
-
-uninstall-sysconfDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(sysconf_DATA)'; for p in $$list; do \
- f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " rm -f $(DESTDIR)$(sysconfdir)/$$f"; \
- rm -f $(DESTDIR)$(sysconfdir)/$$f; \
- done
-
-ETAGS = etags
-ETAGSFLAGS =
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$tags$$unique" \
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
-top_distdir = ..
-distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-
-distdir: $(DISTFILES)
- @list='$(DISTFILES)'; for file in $$list; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkinstalldirs) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS)
-
-installdirs:
- $(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(sysconfdir)
-
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-noinstLIBRARIES clean-sbinPROGRAMS \
- mostlyclean-am
-
-distclean: distclean-am
-
-distclean-am: clean-am distclean-compile distclean-depend \
- distclean-generic distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am: install-sbinPROGRAMS install-sysconfDATA
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
-
-uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS \
- uninstall-sysconfDATA
-
-.PHONY: GTAGS all all-am check check-am clean clean-generic \
- clean-noinstLIBRARIES clean-sbinPROGRAMS distclean \
- distclean-compile distclean-depend distclean-generic \
- distclean-tags distdir dvi dvi-am info info-am install \
- install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-sbinPROGRAMS install-strip install-sysconfDATA \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic tags uninstall uninstall-am \
- uninstall-info-am uninstall-sbinPROGRAMS uninstall-sysconfDATA
-
-
-install-sysconfDATA: $(sysconf_DATA)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
- @list='$(sysconf_DATA)'; for p in $$list; do \
- if test -f $(srcdir)/$$p; then \
- echo " $(INSTALL_SDATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p"; \
- $(INSTALL_SDATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$p; \
- else if test -f $$p; then \
- echo " $(INSTALL_SDATA) $$p $(DESTDIR)$(sysconfdir)/$$p"; \
- $(INSTALL_SDATA) $$p $(DESTDIR)$(sysconfdir)/$$p; \
- fi; fi; \
- done
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/bgpd/bgp_advertise.h b/bgpd/bgp_advertise.h
index 798cf0fd..e2ae0104 100644
--- a/bgpd/bgp_advertise.h
+++ b/bgpd/bgp_advertise.h
@@ -99,6 +99,39 @@ struct bgp_synchronize
struct bgp_advertise_fifo withdraw_low;
};
+/* FIFO -- first in first out structure and macros. */
+struct fifo
+{
+ struct fifo *next;
+ struct fifo *prev;
+};
+
+#define FIFO_INIT(F) \
+ do { \
+ struct fifo *Xfifo = (struct fifo *)(F); \
+ Xfifo->next = Xfifo->prev = Xfifo; \
+ } while (0)
+
+#define FIFO_ADD(F,N) \
+ do { \
+ struct fifo *Xfifo = (struct fifo *)(F); \
+ struct fifo *Xnode = (struct fifo *)(N); \
+ Xnode->next = Xfifo; \
+ Xnode->prev = Xfifo->prev; \
+ Xfifo->prev = Xfifo->prev->next = Xnode; \
+ } while (0)
+
+#define FIFO_DEL(N) \
+ do { \
+ struct fifo *Xnode = (struct fifo *)(N); \
+ Xnode->prev->next = Xnode->next; \
+ Xnode->next->prev = Xnode->prev; \
+ } while (0)
+
+#define FIFO_HEAD(F) \
+ ((((struct fifo *)(F))->next == (struct fifo *)(F)) \
+ ? NULL : (F)->next)
+
/* BGP adjacency linked list. */
#define BGP_INFO_ADD(N,A,TYPE) \
do { \
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c
index fc5efb19..d30ef4cc 100644
--- a/bgpd/bgp_aspath.c
+++ b/bgpd/bgp_aspath.c
@@ -1170,7 +1170,7 @@ aspath_show_all_iterator (struct hash_backet *backet, struct vty *vty)
as = (struct aspath *) backet->data;
- vty_out (vty, "[%p:%d] (%ld) ", backet, backet->key, as->refcnt);
+ vty_out (vty, "[%p:%u] (%ld) ", backet, backet->key, as->refcnt);
vty_out (vty, "%s%s", as->str, VTY_NEWLINE);
}
diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c
index 2e03f48d..0b6a2e8c 100644
--- a/bgpd/bgp_clist.c
+++ b/bgpd/bgp_clist.c
@@ -269,7 +269,7 @@ community_list_delete (struct community_list *list)
community_list_free (list);
}
-int
+int
community_list_empty_p (struct community_list *list)
{
return (list->head == NULL && list->tail == NULL) ? 1 : 0;
@@ -364,26 +364,6 @@ community_regexp_match (struct community *com, regex_t *reg)
return 0;
}
-static int
-ecommunity_regexp_match (struct ecommunity *ecom, regex_t *reg)
-{
- char *str;
-
- /* When there is no communities attribute it is treated as empty
- string. */
- if (ecom == NULL || ecom->size == 0)
- str = "";
- else
- str = ecommunity_str (ecom);
-
- /* Regular expression match. */
- if (regexec (reg, str, 0, NULL, 0) == 0)
- return 1;
-
- /* No match. */
- return 0;
-}
-
/* Delete community attribute using regular expression match. Return
modified communites attribute. */
static struct community *
@@ -461,30 +441,6 @@ community_list_match (struct community *com, struct community_list *list)
return 0;
}
-int
-ecommunity_list_match (struct ecommunity *ecom, struct community_list *list)
-{
- struct community_entry *entry;
-
- for (entry = list->head; entry; entry = entry->next)
- {
- if (entry->any)
- return entry->direct == COMMUNITY_PERMIT ? 1 : 0;
-
- if (entry->style == EXTCOMMUNITY_LIST_STANDARD)
- {
- if (ecommunity_match (ecom, entry->u.ecom))
- return entry->direct == COMMUNITY_PERMIT ? 1 : 0;
- }
- else if (entry->style == EXTCOMMUNITY_LIST_EXPANDED)
- {
- if (ecommunity_regexp_match (ecom, entry->reg))
- return entry->direct == COMMUNITY_PERMIT ? 1 : 0;
- }
- }
- return 0;
-}
-
/* Perform exact matching. In case of expanded community-list, do
same thing as community_list_match(). */
int
@@ -514,7 +470,7 @@ community_list_exact_match (struct community *com, struct community_list *list)
return 0;
}
-/* Delete all permitted communities in the list from com. */
+/* Delete all permitted communities in the list from com1 */
struct community *
community_list_match_delete (struct community *com,
struct community_list *list)
diff --git a/bgpd/bgp_clist.h b/bgpd/bgp_clist.h
index 50b43ab4..ffc707c2 100644
--- a/bgpd/bgp_clist.h
+++ b/bgpd/bgp_clist.h
@@ -137,7 +137,6 @@ struct community_list *
community_list_lookup (struct community_list_handler *, char *, int);
int community_list_match (struct community *, struct community_list *);
-int ecommunity_list_match (struct ecommunity *, struct community_list *);
int community_list_exact_match (struct community *, struct community_list *);
struct community *
community_list_match_delete (struct community *,
diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c
index fca51edc..8ee367be 100644
--- a/bgpd/bgp_dump.c
+++ b/bgpd/bgp_dump.c
@@ -130,8 +130,13 @@ bgp_dump_interval_add (struct bgp_dump *bgp_dump, int interval)
{
int bgp_dump_interval_func (struct thread *);
- bgp_dump->t_interval = thread_add_timer (master, bgp_dump_interval_func,
- bgp_dump, interval);
+ if (interval > 0 )
+ bgp_dump->t_interval = thread_add_timer (master, bgp_dump_interval_func,
+ bgp_dump, interval);
+ else
+ bgp_dump->t_interval = thread_add_event (master, bgp_dump_interval_func,
+ bgp_dump, 0);
+
return 0;
}
@@ -296,7 +301,6 @@ int
bgp_dump_interval_func (struct thread *t)
{
struct bgp_dump *bgp_dump;
-
bgp_dump = THREAD_ARG (t);
bgp_dump->t_interval = NULL;
@@ -310,8 +314,11 @@ bgp_dump_interval_func (struct thread *t)
bgp_dump_routes_func (AFI_IP6);
}
- bgp_dump_interval_add (bgp_dump, bgp_dump->interval);
-
+ /* if interval is set reschedule */
+ if (bgp_dump->interval > 0)
+ bgp_dump_interval_add (bgp_dump, bgp_dump->interval);
+
+
return 0;
}
@@ -475,10 +482,11 @@ int
bgp_dump_set (struct vty *vty, struct bgp_dump *bgp_dump, int type,
char *path, char *interval_str)
{
+ unsigned int interval;
+
if (interval_str)
{
- unsigned int interval;
-
+
/* Check interval string. */
interval = bgp_dump_parse_time (interval_str);
if (interval == 0)
@@ -491,10 +499,15 @@ bgp_dump_set (struct vty *vty, struct bgp_dump *bgp_dump, int type,
if (bgp_dump->interval_str)
free (bgp_dump->interval_str);
bgp_dump->interval_str = strdup (interval_str);
-
- /* Create interval thread. */
- bgp_dump_interval_add (bgp_dump, interval);
+
}
+ else
+ {
+ interval = 0;
+ }
+
+ /* Create interval thread. */
+ bgp_dump_interval_add (bgp_dump, interval);
/* Set type. */
bgp_dump->type = type;
diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c
index aa0f1176..2f9cc945 100644
--- a/bgpd/bgp_ecommunity.c
+++ b/bgpd/bgp_ecommunity.c
@@ -158,15 +158,6 @@ ecommunity_dup (struct ecommunity *ecom)
return new;
}
-/* Retrun string representation of communities attribute. */
-char *
-ecommunity_str (struct ecommunity *ecom)
-{
- if (! ecom->str)
- ecom->str = ecommunity_ecom2str (ecom, ECOMMUNITY_FORMAT_DISPLAY);
- return ecom->str;
-}
-
/* Merge two Extended Communities Attribute structure. */
struct ecommunity *
ecommunity_merge (struct ecommunity *ecom1, struct ecommunity *ecom2)
@@ -648,33 +639,3 @@ ecommunity_ecom2str (struct ecommunity *ecom, int format)
}
return str_buf;
}
-
-int
-ecommunity_match (struct ecommunity *ecom1, struct ecommunity *ecom2)
-{
- int i = 0;
- int j = 0;
-
- if (ecom1 == NULL && ecom2 == NULL)
- return 1;
-
- if (ecom1 == NULL || ecom2 == NULL)
- return 0;
-
- if (ecom1->size < ecom2->size)
- return 0;
-
- /* Every community on com2 needs to be on com1 for this to match */
- while (i < ecom1->size && j < ecom2->size)
- {
- if (memcmp (ecom1->val + i, ecom2->val + j, ECOMMUNITY_SIZE) == 0)
- j++;
- i++;
- }
-
- if (j == ecom2->size)
- return 1;
- else
- return 0;
-}
-
diff --git a/bgpd/bgp_ecommunity.h b/bgpd/bgp_ecommunity.h
index 7bc59a69..678d1308 100644
--- a/bgpd/bgp_ecommunity.h
+++ b/bgpd/bgp_ecommunity.h
@@ -70,5 +70,3 @@ void ecommunity_unintern (struct ecommunity *);
unsigned int ecommunity_hash_make (struct ecommunity *);
struct ecommunity *ecommunity_str2com (char *, int, int);
char *ecommunity_ecom2str (struct ecommunity *, int);
-int ecommunity_match (struct ecommunity *, struct ecommunity *);
-char *ecommunity_str (struct ecommunity *);
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index 3e1d80f6..70377914 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -29,7 +29,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "memory.h"
#include "prefix.h"
#include "log.h"
-#include "privs.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_attr.h"
@@ -46,7 +45,6 @@ struct option longopts[] =
{ "vty_port", required_argument, NULL, 'P'},
{ "retain", no_argument, NULL, 'r'},
{ "no_kernel", no_argument, NULL, 'n'},
- { "user", required_argument, NULL, 'u'},
{ "version", no_argument, NULL, 'v'},
{ "help", no_argument, NULL, 'h'},
{ 0 }
@@ -72,23 +70,6 @@ char *pid_file = PATH_BGPD_PID;
int vty_port = BGP_VTY_PORT;
char *vty_addr = NULL;
-/* privileges */
-zebra_capabilities_t _caps_p [] =
-{
- ZCAP_BIND,
-};
-
-struct zebra_privs_t bgpd_privs =
-{
-#if defined(ZEBRA_USER) && defined(ZEBRA_GROUP)
- .user = ZEBRA_USER,
- .group = ZEBRA_GROUP,
-#endif
- .caps_p = _caps_p,
- .cap_num_p = sizeof(_caps_p)/sizeof(_caps_p[0]),
- .cap_num_i = 0,
-};
-
/* Help information display. */
static void
usage (char *progname, int status)
@@ -108,7 +89,6 @@ redistribution between different routing protocols.\n\n\
-P, --vty_port Set vty's port number\n\
-r, --retain When program terminates, retain added route by bgpd.\n\
-n, --no_kernel Do not install route to kernel.\n\
--u, --user User and group to run as\n\
-v, --version Print program version\n\
-h, --help Display this help and exit\n\
\n\
@@ -217,7 +197,7 @@ main (int argc, char **argv)
/* Command line argument treatment. */
while (1)
{
- opt = getopt_long (argc, argv, "df:hp:A:P:rnu:v", longopts, 0);
+ opt = getopt_long (argc, argv, "df:hp:A:P:rnv", longopts, 0);
if (opt == EOF)
break;
@@ -258,9 +238,6 @@ main (int argc, char **argv)
case 'n':
bgp_option_set (BGP_OPT_NO_FIB);
break;
- case 'u':
- bgpd_privs.user = bgpd_privs.group = optarg;
- break;
case 'v':
print_version (progname);
exit (0);
@@ -280,7 +257,6 @@ main (int argc, char **argv)
/* Initializations. */
srand (time (NULL));
signal_init ();
- zprivs_init (&bgpd_privs);
cmd_init (1);
vty_init ();
memory_init ();
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 019b78b7..40e9cdb3 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -27,16 +27,12 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "if.h"
#include "prefix.h"
#include "command.h"
-#include "privs.h"
#include "bgpd/bgpd.h"
#include "bgpd/bgp_fsm.h"
#include "bgpd/bgp_attr.h"
#include "bgpd/bgp_debug.h"
#include "bgpd/bgp_network.h"
-
-extern struct zebra_privs_t bgpd_privs;
-
/* Accept bgp connection. */
static int
@@ -157,16 +153,9 @@ bgp_bind_address (int sock, struct in_addr *addr)
#endif /* HAVE_SIN_LEN */
memcpy (&local.sin_addr, addr, sizeof (struct in_addr));
- if ( bgpd_privs.change (ZPRIVS_RAISE) )
- zlog_err ("bgp_bind_address: could not raise privs");
-
ret = bind (sock, (struct sockaddr *)&local, sizeof (struct sockaddr_in));
if (ret < 0)
;
-
- if (bgpd_privs.change (ZPRIVS_LOWER) )
- zlog_err ("bgp_bind_address: could not lower privs");
-
return 0;
}
@@ -317,9 +306,6 @@ bgp_socket (struct bgp *bgp, unsigned short port)
sockopt_reuseaddr (sock);
sockopt_reuseport (sock);
-
- if (bgpd_privs.change (ZPRIVS_RAISE) )
- zlog_err ("bgp_socket: could not raise privs");
ret = bind (sock, ainfo->ai_addr, ainfo->ai_addrlen);
if (ret < 0)
@@ -328,10 +314,6 @@ bgp_socket (struct bgp *bgp, unsigned short port)
close (sock);
continue;
}
-
- if (bgpd_privs.change (ZPRIVS_LOWER) )
- zlog_err ("bgp_bind_address: could not lower privs");
-
ret = listen (sock, 3);
if (ret < 0)
{
@@ -377,9 +359,6 @@ bgp_socket (struct bgp *bgp, unsigned short port)
sin.sin_len = socklen;
#endif /* HAVE_SIN_LEN */
- if ( bgpd_privs.change (ZPRIVS_RAISE) )
- zlog_err ("bgp_socket: could not raise privs");
-
ret = bind (sock, (struct sockaddr *) &sin, socklen);
if (ret < 0)
{
@@ -387,10 +366,6 @@ bgp_socket (struct bgp *bgp, unsigned short port)
close (sock);
return ret;
}
-
- if (bgpd_privs.change (ZPRIVS_LOWER) )
- zlog_err ("bgp_socket: could not lower privs");
-
ret = listen (sock, 3);
if (ret < 0)
{
diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c
index 3b91373b..77b024e5 100644
--- a/bgpd/bgp_nexthop.c
+++ b/bgpd/bgp_nexthop.c
@@ -663,7 +663,7 @@ bgp_connected_add (struct connected *ifc)
p.family = AF_INET;
p.prefixlen = addr->prefixlen;
- if (if_is_pointopoint (ifp))
+ if (ifc_pointopoint (ifc))
p.u.prefix4 = dest->u.prefix4;
else
p.u.prefix4 = addr->u.prefix4;
@@ -694,7 +694,7 @@ bgp_connected_add (struct connected *ifc)
p.family = AF_INET6;
p.prefixlen = addr->prefixlen;
- if (if_is_pointopoint (ifp))
+ if (ifc_pointopoint (ifc))
p.u.prefix6 = dest->u.prefix6;
else
p.u.prefix6 = addr->u.prefix6;
@@ -748,7 +748,7 @@ bgp_connected_delete (struct connected *ifc)
p.family = AF_INET;
p.prefixlen = addr->prefixlen;
- if (if_is_pointopoint (ifp))
+ if (ifc_pointopoint (ifc))
p.u.prefix4 = dest->u.prefix4;
else
p.u.prefix4 = addr->u.prefix4;
@@ -779,7 +779,7 @@ bgp_connected_delete (struct connected *ifc)
p.family = AF_INET6;
p.prefixlen = addr->prefixlen;
- if (if_is_pointopoint (ifp))
+ if (ifc_pointopoint (ifc))
p.u.prefix6 = dest->u.prefix6;
else
p.u.prefix6 = addr->u.prefix6;
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index e33137bc..48879f35 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -238,6 +238,7 @@ bgp_update_packet (struct peer *peer, afi_t afi, safi_t safi)
bgp_packet_set_size (s);
packet = bgp_packet_dup (s);
bgp_packet_add (peer, packet);
+ BGP_WRITE_ON (peer->t_write, bgp_write, peer->fd);
stream_reset (s);
return packet;
}
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index aab85eb3..87d305cb 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -620,10 +620,7 @@ bgp_announce_check (struct bgp_info *ri, struct peer *peer, struct prefix *p,
if (transparent || reflect
|| (CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_NEXTHOP_UNCHANGED)
&& ((p->family == AF_INET && attr->nexthop.s_addr)
-#ifdef HAVE_IPV6
- || (p->family == AF_INET6 && ri->peer != bgp->peer_self)
-#endif /* HAVE_IPV6 */
- )))
+ || (p->family == AF_INET6 && ri->peer != bgp->peer_self))))
{
/* NEXT-HOP Unchanged. */
}
@@ -1780,7 +1777,6 @@ bgp_static_update (struct bgp *bgp, struct prefix *p,
struct bgp_info *new;
struct bgp_info info;
struct attr attr;
- struct attr attr_tmp;
struct attr *attr_new;
int ret;
@@ -1797,26 +1793,23 @@ bgp_static_update (struct bgp *bgp, struct prefix *p,
/* Apply route-map. */
if (bgp_static->rmap.name)
{
- attr_tmp = attr;
info.peer = bgp->peer_self;
- info.attr = &attr_tmp;
+ info.attr = &attr;
ret = route_map_apply (bgp_static->rmap.map, p, RMAP_BGP, &info);
-
if (ret == RMAP_DENYMATCH)
{
/* Free uninterned attribute. */
- bgp_attr_flush (&attr_tmp);
+ bgp_attr_flush (&attr);
/* Unintern original. */
aspath_unintern (attr.aspath);
bgp_static_withdraw (bgp, p, afi, safi);
return;
}
- attr_new = bgp_attr_intern (&attr_tmp);
}
- else
- attr_new = bgp_attr_intern (&attr);
+
+ attr_new = bgp_attr_intern (&attr);
for (ri = rn->info; ri; ri = ri->next)
if (ri->peer == bgp->peer_self && ri->type == ZEBRA_ROUTE_BGP
@@ -2866,7 +2859,7 @@ bgp_aggregate_increment (struct bgp *bgp, struct prefix *p,
if ((aggregate = rn->info) != NULL && rn->p.prefixlen < p->prefixlen)
{
bgp_aggregate_delete (bgp, &rn->p, afi, safi, aggregate);
- bgp_aggregate_route (bgp, &rn->p, ri, afi, safi, NULL, aggregate);
+ bgp_aggregate_route (bgp, &rn->p, ri, safi, safi, NULL, aggregate);
}
bgp_unlock_node (child);
}
@@ -2893,7 +2886,7 @@ bgp_aggregate_decrement (struct bgp *bgp, struct prefix *p,
if ((aggregate = rn->info) != NULL && rn->p.prefixlen < p->prefixlen)
{
bgp_aggregate_delete (bgp, &rn->p, afi, safi, aggregate);
- bgp_aggregate_route (bgp, &rn->p, NULL, afi, safi, del, aggregate);
+ bgp_aggregate_route (bgp, &rn->p, NULL, safi, safi, del, aggregate);
}
bgp_unlock_node (child);
}
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index b5494d52..5cfb5c8c 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -2413,15 +2413,21 @@ ALIAS (no_set_ip_nexthop,
DEFUN (set_metric,
set_metric_cmd,
- "set metric (<0-4294967295>|<+/-metric>)",
+ "set metric <0-4294967295>",
SET_STR
"Metric value for destination routing protocol\n"
- "Metric value\n"
- "Add or subtract metric\n")
+ "Metric value\n")
{
return bgp_route_set_add (vty, vty->index, "metric", argv[0]);
}
+ALIAS (set_metric,
+ set_metric_addsub_cmd,
+ "set metric <+/-metric>",
+ SET_STR
+ "Metric value for destination routing protocol\n"
+ "Add or subtract BGP metric\n")
+
DEFUN (no_set_metric,
no_set_metric_cmd,
"no set metric",
@@ -3232,6 +3238,7 @@ bgp_route_map_init ()
install_element (RMAP_NODE, &no_set_weight_cmd);
install_element (RMAP_NODE, &no_set_weight_val_cmd);
install_element (RMAP_NODE, &set_metric_cmd);
+ install_element (RMAP_NODE, &set_metric_addsub_cmd);
install_element (RMAP_NODE, &no_set_metric_cmd);
install_element (RMAP_NODE, &no_set_metric_val_cmd);
install_element (RMAP_NODE, &set_aspath_prepend_cmd);
diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c
index 6a33bae6..598fc3cd 100644
--- a/bgpd/bgp_snmp.c
+++ b/bgpd/bgp_snmp.c
@@ -21,6 +21,9 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include <zebra.h>
#ifdef HAVE_SNMP
+#ifdef HAVE_NETSNMP
+#include <net-snmp/net-snmp-config.h>
+#endif
#include <asn1.h>
#include <snmp.h>
#include <snmp_impl.h>
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 3e5cdd2a..aef888be 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -208,7 +208,7 @@ bgp_interface_address_add (int command, struct zclient *zclient,
bgp_if_update (ifc->ifp);
- if (if_is_up (ifc->ifp))
+ if (if_is_operative (ifc->ifp))
bgp_connected_add (ifc);
return 0;
@@ -227,7 +227,7 @@ bgp_interface_address_delete (int command, struct zclient *zclient,
bgp_if_update (ifc->ifp);
- if (if_is_up (ifc->ifp))
+ if (if_is_operative (ifc->ifp))
bgp_connected_delete (ifc);
connected_free (ifc);
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index bd00c965..f116a0cf 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -797,13 +797,6 @@ peer_as_change (struct peer *peer, as_t as)
type = peer_sort (peer);
peer->as = as;
- if (bgp_config_check (peer->bgp, BGP_CONFIG_CONFEDERATION)
- && ! bgp_confederation_peers_check (peer->bgp, as)
- && peer->bgp->as != as)
- peer->local_as = peer->bgp->confed_id;
- else
- peer->local_as = peer->bgp->as;
-
/* Advertisement-interval reset */
if (peer_sort (peer) == BGP_PEER_IBGP)
peer->v_routeadv = BGP_DEFAULT_IBGP_ROUTEADV;
@@ -1641,15 +1634,6 @@ bgp_create (as_t *as, char *name)
return bgp;
}
-/* Return master of BGP. */
-struct bgp_master *
-bgp_get_master ()
-{
- if (bm)
- return bm;
- return NULL;
-}
-
/* Return first entry of BGP. */
struct bgp *
bgp_get_default ()
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index c9a263bd..933516d0 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -611,7 +611,6 @@ struct bgp_nlri
/* Default configuration settings for bgpd. */
#define BGP_VTY_PORT 2605
-#define BGP_VTYSH_PATH "/tmp/.bgpd"
#define BGP_DEFAULT_CONFIG "bgpd.conf"
/* Check AS path loop when we send NLRI. */