summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ChangeLog8
-rw-r--r--ospfd/ChangeLog.opaque.txt221
-rw-r--r--ospfd/Makefile.am2
-rw-r--r--ospfd/Makefile.in177
-rw-r--r--ospfd/ospf_lsa.c18
-rw-r--r--ospfd/ospf_opaque.c86
-rw-r--r--ospfd/ospf_packet.c12
7 files changed, 395 insertions, 129 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 31c5b0f7..b7794f72 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,11 @@
+2003-01-23 Masahiko Endo <endo@suri.co.jp>
+
+ * ospf_ism.c: NSM event schedule bug fix.
+
+2002-10-30 Greg Troxel <gdt@ir.bbn.com>
+
+ * ospf_packet.c (ospf_make_md5_digest): MD5 length fix.
+
2002-10-23 endo@suri.co.jp (Masahiko Endo)
* ospf_opaque.c: Update Opaque LSA patch.
diff --git a/ospfd/ChangeLog.opaque.txt b/ospfd/ChangeLog.opaque.txt
new file mode 100644
index 00000000..782e332a
--- /dev/null
+++ b/ospfd/ChangeLog.opaque.txt
@@ -0,0 +1,221 @@
+----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * -----
+Changes 2002.12.20
+
+1. Bug fixes
+
+ 1.1 When an opaque LSA is being removed from (or added to) the LSDB,
+ it does not mean a change in network topology. Therefore, SPF
+ recalculation should not be triggered in that case.
+ There was an assertion failure problem "assert (rn && rn->info)"
+ inside the function "ospf_ase_incremental_update()", because
+ the upper function "ospf_lsa_maxage_walker_remover()" called it
+ when a type-11 opaque LSA is removed due to MaxAge.
+
+ 1.2 Type-9 LSA is defined to have "link-local" flooding scope.
+ In the Database exchange procedure with a new neighbor, a type-9
+ LSA was added in the database summary of a DD message, even if
+ the link is different from the one that have bound to.
+
+2. Feature enhancements
+
+ 2.1 Though a "wildcard" concept to handle type-9/10/11 LSAs altogether
+ has introduced about a year ago, it was only a symbol definition
+ and actual handling mechanism was not implemented. Now it works.
+
+----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * -----
+Changes 2002.7.8
+
+1. Bug fixes
+
+ 1.1 When "ospf_delete_opaque_functab()" is called, internal structure
+ "oipt" remain unfreed. If register/delete functab is repeated,
+ illegal memory access happens due to this "oipt".
+
+ 1.2 In "free_opaque_info_per_id()", there was a crucial typo which
+ ignores a condition test.
+
+ "if (oipi->lsa != NULL);" <-- semicolon!
+
+2. Feature enhancements
+
+ None.
+
+----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * -----
+Changes 2001.12.03
+
+1. Bug fixes
+
+ 1.1 Though a new member "oi" has added to "struct ospf_lsa" to control
+ flooding scope of type-9 Opaque-LSAs, the value was always NULL
+ because no one set it.
+
+ 1.2 In the function "show_ip_ospf_database_summary()" and "show_lsa_
+ detail_adv_router()", VTY output for type-11 Opaque-LSAs did not
+ work properly.
+
+ 1.3 URL for the opaque-type assignment reference has changed.
+
+ 1.4 In the file "ospf_mpls_te.c", printf formats have changed to
+ avoid compiler warning messages; "%lu" -> "%u", "%lx" -> "%x".
+ Note that this hack depends on OS, compiler and their versions.
+
+ 1.5 One of attached documentation "opaque_lsa.txt" has changed to
+ reflect the latest coding.
+
+2. Feature enhancements
+
+ 2.1 Knowing that it is an ugly hack, an "officially unallocated"
+ opaque-type value 0 has newly introduced as a "wildcard",
+ which matches to all opaque-type.
+ This value must not be flooded to the network, of course.
+
+ 2.2 The Opaque-core module makes use of newly introduced hooks to
+ dispatch every LSDB change (LSA installation and deletion) to
+ preregistered opaque users.
+ Therefore, by providing appropriate callback functions as new
+ parameters of "ospf_register_opaque_functab()", an opaque user
+ can refer to every LSA instance to be installed into, or to be
+ deleted from, the LSDB.
+
+----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * -----
+Changes 2001.10.31
+
+1. Bug fixes
+
+ 1.1 Since each LSA has their own lifetime, they will remain in a
+ routing domain (being stored in LSDB of each router), until their
+ age naturally reach to MaxAge or explicitly being flushed by the
+ originated router. Therefore, if a router restarted with a short
+ downtime, it is possible that previously flooded self-originated
+ LSAs might received if the NSM status is not less than Exchange.
+
+ There were some problems in the way of handling self-originated
+ Opaque-LSAs if they are contained in a received LSUpd message,
+ but not installed to the local LSDB yet.
+ Regardless of some conditions to start originating Opaque-LSAs
+ (there should be at least one opaque-capable full-state neighbor),
+ the function "ospf_flood()" will be called to flood and install
+ this brand-new looking LSA.
+ As the result, when the NSM of an opaque-capable neighbor gets
+ full, internal state inconsistency happens; a user of Opaque-LSA
+ such as MPLS-TE can refer to self-originated LSAs in the local
+ LSDB, but cannot modify their contents...
+
+ Above problems have fixed with a policy "flush it from the whole
+ routing domain and keep silent until the flushing completed".
+ By using this sweeping technique, we can be free from confusion
+ caused by self-originated LSAs received via network.
+
+ 1.2 The function "ospf_opaque_type_name()" contained massive ifdefs
+ corresponding to each "opaque-type".
+ These unnecessary ifdefs are removed completely.
+
+ 1.3 In the function "ospf_delete_opaque_functab()", there was an
+ improper loop control that causes illegal memory access.
+ Original coding was "next = nextnode (node)".
+
+ 1.4 The function "ospf_mpls_te_ism_change()" could not handle the
+ case when the ISM changes from Waiting to DR/BDR/Other.
+ So, there was a case that even if one of an ISM become
+ operational and MPLS-TE module has started, the corresponding
+ Opaque-LSA cannot be originated.
+
+ 1.5 The function "ospf_opaque_lsa_reoriginate_schedule()" did not
+ allow to be called multiple times, simply because handling
+ module for the given "lsa-type & opaque-type" already exists.
+ But this assumption seems to be wrong.
+ Change the policy to allow this function to be called multiple
+ times and let the caller to decide what should do when the
+ corresponding callback function "(* functab->lsa_originator)()"
+ is called.
+
+2. Feature enhancements
+
+ 2.1 The global bitmap "opaque" has introduced instead of former flag
+ "OpaqueCapable", to store complex conditions to handle Opaque-LSAs.
+
+ 2.2 The MPLS-TE module now referes to "draft-katz-yeung-ospf-traffic
+ -06.txt", no significant changes with 05 version, though.
+
+----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * -----
+Changes 2001.08.03
+
+1. Bug fixes
+
+ 1.1 Even if the ospfd started with opaque capability enabled, when
+ the ospfd receives an unknown opaque-type (unregistered by the
+ function "ospf_register_opaque_functab()" beforehand), the LSA
+ was discarded. As the result, only the opaque-LSAs that have
+ commonly registered by opaque-capable ospf routers can be
+ flooded in a routing domain.
+
+ This behavior has fixed so that arbitrary opaque-type LSAs can
+ be flooded among opaque-capable ospf routers.
+ If the ospfd has opaque-LSA capability but disabled at runtime,
+ received opaque-LSAs can be accepted and registered to LSDB as
+ is, but not be flooded to the network; those opaque LSAs will
+ remain in LSDB until explicitly flushed by incoming LSUpd
+ messages with MaxAge, or their age naturally reaches to MaxAge.
+
+ 1.2 The function "ospf_register_opaque_functab()" did not check
+ if the entry corresponding to the given "lsa-type, opaque-type"
+ combination already exists or not.
+ This problem has fixed not to allow multiple registration.
+
+ 1.3 Since type-11 (AS external) LSAs will be flooded beyond areas,
+ there is little relationship between "struct lsa" and "struct
+ area". More specifically, the pointer address "lsa->area" can
+ be NULL if the lsa-type is 11, thus an illegal memory access
+ will happen. This problem has fixed.
+
+ 1.4 When self-originated opaque-LSAs are received via network and
+ if the corresponding opaque-type functions are not available
+ (they have already deleted) at that time, those LSAs were
+ dropped due to "unknown opaque-type" error.
+ After the problem 1.1 has fixed, those "self-originated" LSAs
+ were registered to LSDB and then flooded to the network, even
+ if the processing functions did not exist...
+
+ After all, this problem has fixed so that those LSAs should
+ explicitly be flushed from the routing domain immediately, if
+ the processing functions cannot find at that time.
+
+ 1.5 Some typo have fixed.
+
+ --- EXAMPLE ---
+ static int
+ opaque_lsa_originate_callback (list funclist, void *lsa_type_dependent)
+ ^^^^^
+ --- EXAMPLE ---
+
+2. Feature enhancements
+
+ 2.1 According to the description of rfc2328 in section 10.8, any
+ change in the router's optional capabilities should trigger
+ the option re-negotiation procedures with neighbors.
+
+ --- EXCERPT ---
+ If for some reason the router's optional
+ capabilities change, the Database Exchange procedure should be
+ restarted by reverting to neighbor state ExStart.
+ --- EXCERPT ---
+
+ For the opaque-capability changes, this feature has implemented.
+ More specifically, if "ospf opaque-lsa" or "no ospf opaque-lsa"
+ VTY command is given at runtime, all self-originated LSAs will
+ be flushed immediately and then all neighbor status will be
+ forced to ExStart by generating SeqNumberMismatch events.
+
+ 2.1 When we change opaque-capability dynamically (ON -> OFF -> ON),
+ there was no trigger at "OFF->ON" timing to reactivate opaque
+ LSA handling modules (such as MPLS-TE) that have once forcibly
+ stopped at "ON->OFF" timing.
+ Now this dynamic reactivation feature has added.
+
+ 2.2 The MPLS-TE module now referes to "draft-katz-yeung-ospf-traffic
+ -05.txt", no significant changes with 04 version, though.
+
+----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * ----- * -----
+Changes 2001.03.28
+
+ Initial release of Opaque-LSA/MPLS-TE extensions for the zebra/ospfd.
diff --git a/ospfd/Makefile.am b/ospfd/Makefile.am
index 1ced11cc..2b905804 100644
--- a/ospfd/Makefile.am
+++ b/ospfd/Makefile.am
@@ -28,7 +28,7 @@ ospfd_LDADD = ../lib/libzebra.a
sysconf_DATA = ospfd.conf.sample
-EXTRA_DIST = $(sysconf_DATA) OSPF-MIB.txt OSPF-TRAP-MIB.txt
+EXTRA_DIST = $(sysconf_DATA) OSPF-MIB.txt OSPF-TRAP-MIB.txt ChangeLog.opaque.txt
install-sysconfDATA: $(sysconf_DATA)
@$(NORMAL_INSTALL)
diff --git a/ospfd/Makefile.in b/ospfd/Makefile.in
index 8472535e..941804cf 100644
--- a/ospfd/Makefile.in
+++ b/ospfd/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.7 from Makefile.am.
+# Makefile.in generated by automake 1.6.3 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
@@ -13,128 +13,94 @@
# 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)
+transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+host_alias = @host_alias@
host_triplet = @host@
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
AMTAR = @AMTAR@
AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BGPD = @BGPD@
CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
CURSES = @CURSES@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\"
DEPDIR = @DEPDIR@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
IF_METHOD = @IF_METHOD@
IF_PROC = @IF_PROC@
INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPFORWARD = @IPFORWARD@
KERNEL_METHOD = @KERNEL_METHOD@
-LDFLAGS = @LDFLAGS@
LIBPAM = @LIBPAM@
-LIBS = @LIBS@
LIB_IPV6 = @LIB_IPV6@
LIB_REGEX = @LIB_REGEX@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
MULTIPATH_NUM = @MULTIPATH_NUM@
-OBJEXT = @OBJEXT@
OSPF6D = @OSPF6D@
OSPFD = @OSPFD@
OTHER_METHOD = @OTHER_METHOD@
PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RIPD = @RIPD@
RIPNGD = @RIPNGD@
RTREAD_METHOD = @RTREAD_METHOD@
RT_METHOD = @RT_METHOD@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VTYSH = @VTYSH@
ZEBRA = @ZEBRA@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__quote = @am__quote@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
+DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\"
INSTALL_SDATA = @INSTALL@ -m 600
noinst_LIBRARIES = libospf.a
@@ -164,7 +130,7 @@ ospfd_LDADD = ../lib/libzebra.a
sysconf_DATA = ospfd.conf.sample
-EXTRA_DIST = $(sysconf_DATA) OSPF-MIB.txt OSPF-TRAP-MIB.txt
+EXTRA_DIST = $(sysconf_DATA) OSPF-MIB.txt OSPF-TRAP-MIB.txt ChangeLog.opaque.txt
subdir = ospfd
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
@@ -199,8 +165,10 @@ am_ospfd_OBJECTS = ospf_main.$(OBJEXT) $(am__objects_1)
ospfd_OBJECTS = $(am_ospfd_OBJECTS)
ospfd_DEPENDENCIES = ../lib/libzebra.a
ospfd_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)/ospf_abr.Po ./$(DEPDIR)/ospf_asbr.Po \
@@ -222,6 +190,7 @@ 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 = $(libospf_a_SOURCES) $(ospfd_SOURCES)
DATA = $(sysconf_DATA)
@@ -256,7 +225,7 @@ install-sbinPROGRAMS: $(sbin_PROGRAMS)
; 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 || exit 1; \
+ $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) $$p $(DESTDIR)$(sbindir)/$$f; \
else :; fi; \
done
@@ -309,26 +278,17 @@ distclean-depend:
-rm -rf ./$(DEPDIR)
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCC_TRUE@ fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+@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:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
-@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \
-@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
-@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
-@am__fastdepCC_TRUE@ fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`
+@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)
@@ -343,9 +303,6 @@ uninstall-sysconfDATA:
ETAGS = etags
ETAGSFLAGS =
-CTAGS = ctags
-CTAGSFLAGS =
-
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -371,39 +328,20 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
-ctags: CTAGS
-CTAGS: $(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 "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_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 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)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- esac; \
+ @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 \
@@ -490,19 +428,11 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS \
uninstall-sysconfDATA
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-noinstLIBRARIES clean-sbinPROGRAMS ctags distclean \
+.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 \
@@ -510,9 +440,8 @@ uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS \
install-sbinPROGRAMS install-strip install-sysconfDATA \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-info-am uninstall-sbinPROGRAMS \
- uninstall-sysconfDATA
+ mostlyclean-generic tags uninstall uninstall-am \
+ uninstall-info-am uninstall-sbinPROGRAMS uninstall-sysconfDATA
install-sysconfDATA: $(sysconf_DATA)
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 5b63a76d..56c1e990 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -2306,6 +2306,11 @@ ospf_lsa_install (struct ospf_interface *oi, struct ospf_lsa *lsa)
break;
#ifdef HAVE_OPAQUE_LSA
case OSPF_OPAQUE_LINK_LSA:
+ if (IS_LSA_SELF (lsa))
+ lsa->oi = oi; /* Specify outgoing ospf-interface for this LSA. */
+ else
+ ; /* Incoming "oi" for this LSA has set at LSUpd reception. */
+ /* Fallthrough */
case OSPF_OPAQUE_AREA_LSA:
case OSPF_OPAQUE_AS_LSA:
new = ospf_opaque_lsa_install (lsa, rt_recalc);
@@ -2537,10 +2542,21 @@ ospf_lsa_maxage_walker_remover (struct ospf_lsa *lsa, void *p_arg, int int_arg)
switch (lsa->data->type)
{
- case OSPF_AS_EXTERNAL_LSA:
#ifdef HAVE_OPAQUE_LSA
+ case OSPF_OPAQUE_LINK_LSA:
+ case OSPF_OPAQUE_AREA_LSA:
case OSPF_OPAQUE_AS_LSA:
+ /*
+ * As a general rule, whenever network topology has changed
+ * (due to an LSA removal in this case), routing recalculation
+ * should be triggered. However, this is not true for opaque
+ * LSAs. Even if an opaque LSA instance is going to be removed
+ * from the routing domain, it does not mean a change in network
+ * topology, and thus, routing recalculation is not needed here.
+ */
+ break;
#endif /* HAVE_OPAQUE_LSA */
+ case OSPF_AS_EXTERNAL_LSA:
ospf_ase_incremental_update (lsa, ospf_top);
break;
default:
diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c
index 67c6608b..5d5b30c9 100644
--- a/ospfd/ospf_opaque.c
+++ b/ospfd/ospf_opaque.c
@@ -239,6 +239,7 @@ struct ospf_opaque_functab
int (* del_lsa_hook)(struct ospf_lsa *lsa);
};
+static list ospf_opaque_wildcard_funclist; /* Handle LSA-9/10/11 altogether. */
static list ospf_opaque_type9_funclist;
static list ospf_opaque_type10_funclist;
static list ospf_opaque_type11_funclist;
@@ -255,6 +256,9 @@ ospf_opaque_funclist_init (void)
{
list funclist;
+ funclist = ospf_opaque_wildcard_funclist = list_new ();
+ funclist->del = ospf_opaque_del_functab;
+
funclist = ospf_opaque_type9_funclist = list_new ();
funclist->del = ospf_opaque_del_functab;
@@ -271,6 +275,9 @@ ospf_opaque_funclist_term (void)
{
list funclist;
+ funclist = ospf_opaque_wildcard_funclist;
+ list_delete (funclist);
+
funclist = ospf_opaque_type9_funclist;
list_delete (funclist);
@@ -289,6 +296,16 @@ ospf_get_opaque_funclist (u_char lsa_type)
switch (lsa_type)
{
+ case OPAQUE_TYPE_WILDCARD:
+ /* XXX
+ * This is an ugly trick to handle type-9/10/11 LSA altogether.
+ * Yes, "OPAQUE_TYPE_WILDCARD (value 0)" is not an LSA-type, nor
+ * an officially assigned opaque-type.
+ * Though it is possible that the value might be officially used
+ * in the future, we use it internally as a special label, for now.
+ */
+ funclist = ospf_opaque_wildcard_funclist;
+ break;
case OSPF_OPAQUE_LINK_LSA:
funclist = ospf_opaque_type9_funclist;
break;
@@ -434,6 +451,7 @@ ospf_opaque_functab_lookup (struct ospf_lsa *lsa)
*/
struct opaque_info_per_type
{
+ u_char lsa_type;
u_char opaque_type;
enum { PROC_NORMAL, PROC_SUSPEND } status;
@@ -451,7 +469,7 @@ struct opaque_info_per_type
struct thread *t_opaque_lsa_self;
/*
- * Backpointer to an "owner" which is opaque-type dependent.
+ * Backpointer to an "owner" which is LSA-type dependent.
* type-9: struct ospf_interface
* type-10: struct ospf_area
* type-11: struct ospf
@@ -523,11 +541,13 @@ register_opaque_info_per_type (struct ospf_opaque_functab *functab,
listnode_add (top->opaque_lsa_self, oipt);
break;
default:
+ zlog_warn ("register_opaque_info_per_type: Unexpected LSA-type(%u)", new->data->type);
free_opaque_info_per_type ((void *) oipt);
oipt = NULL;
goto out; /* This case may not exist. */
}
+ oipt->lsa_type = new->data->type;
oipt->opaque_type = GET_OPAQUE_TYPE (ntohl (new->data->id.s_addr));
oipt->status = PROC_NORMAL;
oipt->t_opaque_lsa_self = NULL;
@@ -560,6 +580,32 @@ free_opaque_info_per_type (void *val)
ospf_opaque_lsa_flush_schedule (lsa);
}
+ /* Remove "oipt" from its owner's self-originated LSA list. */
+ switch (oipt->lsa_type)
+ {
+ case OSPF_OPAQUE_LINK_LSA:
+ {
+ struct ospf_interface *oi = (struct ospf_interface *)(oipt->owner);
+ listnode_delete (oi->opaque_lsa_self, oipt);
+ break;
+ }
+ case OSPF_OPAQUE_AREA_LSA:
+ {
+ struct ospf_area *area = (struct ospf_area *)(oipt->owner);
+ listnode_delete (area->opaque_lsa_self, oipt);
+ break;
+ }
+ case OSPF_OPAQUE_AS_LSA:
+ {
+ struct ospf *top = (struct ospf *)(oipt->owner);
+ listnode_delete (top->opaque_lsa_self, oipt);
+ break;
+ }
+ default:
+ zlog_warn ("free_opaque_info_per_type: Unexpected LSA-type(%u)", oipt->lsa_type);
+ break; /* This case may not exist. */
+ }
+
OSPF_TIMER_OFF (oipt->t_opaque_lsa_self);
list_delete (oipt->id_list);
XFREE (MTYPE_OPAQUE_INFO_PER_TYPE, oipt);
@@ -923,6 +969,10 @@ ospf_opaque_new_if (struct interface *ifp)
list funclist;
int rc = -1;
+ funclist = ospf_opaque_wildcard_funclist;
+ if (opaque_lsa_new_if_callback (funclist, ifp) != 0)
+ goto out;
+
funclist = ospf_opaque_type9_funclist;
if (opaque_lsa_new_if_callback (funclist, ifp) != 0)
goto out;
@@ -946,6 +996,10 @@ ospf_opaque_del_if (struct interface *ifp)
list funclist;
int rc = -1;
+ funclist = ospf_opaque_wildcard_funclist;
+ if (opaque_lsa_del_if_callback (funclist, ifp) != 0)
+ goto out;
+
funclist = ospf_opaque_type9_funclist;
if (opaque_lsa_del_if_callback (funclist, ifp) != 0)
goto out;
@@ -968,6 +1022,9 @@ ospf_opaque_ism_change (struct ospf_interface *oi, int old_status)
{
list funclist;
+ funclist = ospf_opaque_wildcard_funclist;
+ opaque_lsa_ism_change_callback (funclist, oi, old_status);
+
funclist = ospf_opaque_type9_funclist;
opaque_lsa_ism_change_callback (funclist, oi, old_status);
@@ -1017,6 +1074,9 @@ ospf_opaque_nsm_change (struct ospf_neighbor *nbr, int old_state)
;
}
+ funclist = ospf_opaque_wildcard_funclist;
+ opaque_lsa_nsm_change_callback (funclist, nbr, old_state);
+
funclist = ospf_opaque_type9_funclist;
opaque_lsa_nsm_change_callback (funclist, nbr, old_state);
@@ -1038,6 +1098,9 @@ ospf_opaque_config_write_router (struct vty *vty, struct ospf *ospf)
if (CHECK_FLAG (ospf->config, OSPF_OPAQUE_CAPABLE))
vty_out (vty, " capability opaque%s", VTY_NEWLINE);
+ funclist = ospf_opaque_wildcard_funclist;
+ opaque_lsa_config_write_router_callback (funclist, vty);
+
funclist = ospf_opaque_type9_funclist;
opaque_lsa_config_write_router_callback (funclist, vty);
@@ -1055,6 +1118,9 @@ ospf_opaque_config_write_if (struct vty *vty, struct interface *ifp)
{
list funclist;
+ funclist = ospf_opaque_wildcard_funclist;
+ opaque_lsa_config_write_if_callback (funclist, vty, ifp);
+
funclist = ospf_opaque_type9_funclist;
opaque_lsa_config_write_if_callback (funclist, vty, ifp);
@@ -1072,6 +1138,9 @@ ospf_opaque_config_write_debug (struct vty *vty)
{
list funclist;
+ funclist = ospf_opaque_wildcard_funclist;
+ opaque_lsa_config_write_debug_callback (funclist, vty);
+
funclist = ospf_opaque_type9_funclist;
opaque_lsa_config_write_debug_callback (funclist, vty);
@@ -1142,6 +1211,10 @@ ospf_opaque_lsa_install_hook (struct ospf_lsa *lsa)
* Some Opaque-LSA user may want to monitor every LSA installation
* into the LSDB, regardless with target LSA type.
*/
+ funclist = ospf_opaque_wildcard_funclist;
+ if (new_lsa_callback (funclist, lsa) != 0)
+ goto out;
+
funclist = ospf_opaque_type9_funclist;
if (new_lsa_callback (funclist, lsa) != 0)
goto out;
@@ -1169,6 +1242,10 @@ ospf_opaque_lsa_delete_hook (struct ospf_lsa *lsa)
* Some Opaque-LSA user may want to monitor every LSA deletion
* from the LSDB, regardless with target LSA type.
*/
+ funclist = ospf_opaque_wildcard_funclist;
+ if (del_lsa_callback (funclist, lsa) != 0)
+ goto out;
+
funclist = ospf_opaque_type9_funclist;
if (del_lsa_callback (funclist, lsa) != 0)
goto out;
@@ -1473,6 +1550,13 @@ ospf_opaque_lsa_install (struct ospf_lsa *lsa, int rt_recalc)
switch (lsa->data->type)
{
case OSPF_OPAQUE_LINK_LSA:
+ if ((top = oi_to_top (lsa->oi)) == NULL)
+ {
+ /* Above conditions must have passed. */
+ zlog_warn ("ospf_opaque_lsa_install: Sonmething wrong?");
+ goto out;
+ }
+ break;
case OSPF_OPAQUE_AREA_LSA:
if (lsa->area == NULL || (top = lsa->area->top) == NULL)
{
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 2156ce33..89878c92 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -226,7 +226,12 @@ ospf_packet_dup (struct ospf_packet *op)
{
struct ospf_packet *new;
- new = ospf_packet_new (op->length);
+ if (stream_get_endp(op->s) != op->length)
+ zlog_warn ("ospf_packet_dup stream %ld ospf_packet %d size mismatch",
+ STREAM_SIZE(op->s), op->length);
+
+ /* Reserve space for MD5 authentication that may be added later. */
+ new = ospf_packet_new (stream_get_endp(op->s) + OSPF_AUTH_MD5_SIZE);
ospf_stream_copy (new->s, op->s);
new->dst = op->dst;
@@ -356,7 +361,10 @@ ospf_make_md5_digest (struct ospf_interface *oi, struct ospf_packet *op)
stream_set_putp (op->s, oldputp);
/* We do *NOT* increment the OSPF header length. */
- op->length += OSPF_AUTH_MD5_SIZE;
+ op->length = ntohs (ospfh->length) + OSPF_AUTH_MD5_SIZE;
+
+ if (stream_get_endp(op->s) != op->length)
+ zlog_warn("ospf_make_md5_digest: length mismatch stream %ld ospf_packet %d", stream_get_endp(op->s), op->length);
return OSPF_AUTH_MD5_SIZE;
}