Age | Commit message (Collapse) | Author |
|
the isis ipv6 reachability metric is transmitted in big endian / network
format, but isis_spf_process_lsp() does not convert this into host endian
format when mucking around with local cost + received metric. This patch
fixes this problem and makes received ipv6 metrics work properly on
little-endian machines.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
When switching to metric-style transition, circuit metrics should also be
verified to be in the narrow range 0..63.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
When switching to narrow metric style, all configured circuits are
verified to have a valid narrow style metric. Check te_metric instead
of metric_default as the latter is only 8bit wide and may overflow for
wide style metrics.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
this fixes a bunch of issues found by Coverity SCAN and flagged as
"high" impact -- although, they're all rather minute issues.
* isisd/isis_adjacency.c: one superfluous check, one possible NULL deref
* isisd/isis_circuit.c: two prefix memory leaks
* isisd/isis_csm.c: one missing break
* isisd/isis_lsp.c: one possible NULL deref
* isisd/isis_pfpacket.c: one error-case fd leak
* isisd/isis_route.c: one isis_route_info memory leak
* isisd/isis_routemap.c: one... fnord
* isisd/isis_tlv.c: one infinite loop
Reported-by: Coverity SCAN
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
The socket is only created once when an interface is brought up, and the
multicast groups were joined according to configuration at that point.
This breaks when later switching an interface to another IS-IS level.
Since, for a separate conformance issue (ANVL ISIS-6.4), we should be
inspecting the destination address anyway, the simplest fix here is to
just join all groups unconditionally. There shouldn't be much traffic
on these anyway, worst case we might be picking up some unrelated
multicast groups due to NIC filter aliasing though...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Tested-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
isisd defaults to wide metric style. So if narrow metric style is
configured, a matching setting should be written to the configuration,
allowing a narrow metric-style setting to be saved.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
spftree_area_del didn't clear the IPv6 L2 spftree due to a simple typo,
leading to a SEGV on shutdown when the still-armed timer would try to
run an IPv6 L2 SPF calculation with its data free'd already.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
isisd should not form adjacencies on receiving an IS-IS Hello without a
list of supported protocols (cf. RFC 1195 s4.4 p32 "Maintaining Router
Adjacencies") Also fixes memleaks in these error cases.
* isisd/isis_pdu.c: improve TLVFLAG_NLPID handling
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Tested-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
isisd would form an adjacency with another router despite the system IDs
being identical. This would later cause an assertion failure like this:
assertion=0x555555596db8 "isis_find_vertex (spftree->paths, id, vtype) == ((void *)0)",
file=0x555555596c60 "isis_spf.c", line=515, function=0x555555597900 "isis_spf_add2tent") at log.c:619
which is caused by trying to add a path expected to not exist, but
suddenly colliding due to the duplicate system ID.
* isis_pdu.c: check for system ID collision on receiving Hello
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
RFC1195 s4.2 "Multiple IP Addresses per Interface" explicitly forbids us
from adding multiple tuples of IP addresses, putting a hard cutoff at 63
IP addresses.
* isisd/isis_tlv.c: cut off (and return success) at 63 addrs.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Tested-by: Martin Winter <mwinter@opensourcerouting.org>
|
|
* isisd/isis_spf.c: Use portable quagga_gettime() like the rest of
the Quagga code.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
Use the array_size() helper macro. Replaces several instances of local
macros with the same definition.
Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
isisd currently has a list of supported protocols as a fixed array of
size 4. this can be overran, leading to an overwrite of the ipv4_addrs
pointer.
* isisd/isis_pdu.c: don't accept more protocols than there's space for
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
it's possible to feed invalid prefixes (1.2.3.4/40 or dead::beef/200) on
IS-IS. if this is not checked, it will later cause an assert in
processing. let's simply abort processing the TLV if the prefix is
invalid.
* isisd/isis_tlv.c: check prefix lengths for validity
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
processing invalid prefixes causes isisd to assert() or otherwise
misbehave in ip_masklen/apply_mask. pull up the assert() to indicate
better there's broken data in isisd's LSDB.
* isisd/isis_spf.c: assert() prefix lengths
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
* isisd/isis_pdu.c: (send_lsp) Handle case where there are no LSPs
on the LSP transmission queue. This can happen if, for instance,
the queue is cleared because of protocol events before the
send_lsp thread gets a chance to run.
|
|
* isisd/isis_pdu.c: Fix problem where isisd would crash if it
received a LAN IIH with the 'pdu length' field set to zero.
Similar problems can occur in parsing other ISIS PDUs as well --
check that the PDU length in an ISIS hello, LSP or SNP packet is
at least as big as the size of the respective fixed header.
|
|
Some .h files in lib/ are autogenerated. The search path should
include the build directory and the source directory. They usually
match but sometimes, they may be different. For example:
$ mkdir build
$ cd build
$ ../configure
$ make
|
|
There was a "lsp->" missing before "level" in line 2416.
(introduced by git commit e38e0df)
Reported-by: Seblu <seblu@seblu.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
All daemons modified to support custom path to zserv
socket.
[reapplied from b511468 after isisd merge]
|
|
|
|
this re-removes CVS keywords and .cvsignore files. original commits:
b82cdeb delete CVS keywords
05e54ee build: delete .cvsignore files
|
|
Reapply the bits of revision b4e45f6 that pertain to isisd. That is:
git log -n 1 -p b4e45f6 -- isisd
These were dropped in the merge with the Google ISIS code (14d2bbaa).
The commit message for b4e45f6 is:
fix zebra protocol after MP-BGP changes
The previous commits modified both zebra and bgpd for additional
SAFI field, but not any other routing daemon, which led to zebra
daemon crashing with failed assertion.
|
|
|
|
|
|
this fixes warnings from vtysh extract.pl by making sure the isis method
files always 'work'. (previously, extract.pl would grab unselected isis
method sources and then complain about missing headers)
|
|
* isisd/isis_pdu.c
* maskbit: this pre-initialized array is not modified
* lib/prefix.c
* maskbit: idem
* lib/command.c
* facility_map: idem
* itoa64: idem
* default_motd: make local var static
* facility_name(): update local var accordingly
* facility_match(): idem
|
|
|
|
Avoid a potential conflict with the C99 defines 'true' and 'false'
found in <stdbool.h> by choosing better variable names.
Also fix the calls to these ioctls, as described in <net/bpf.h>
in FreeBSD, NetBSD, and OpenBSD:
* BIOCGBLEN, BIOCIMMEDIATE, BIOCSSEESENT (the parameter should be
of type 'u_int')
* BIOCPROMISC (there should be no parameters)
|
|
* */*main.c: (main) Current versions of Gcc warn if the return value for
daemon() is not checked. So add a simple test and exit on failure.
|
|
autoscan 2.62 complains about bzero(), so a good fix
nowadays is to just replace it.
|
|
The cmd_nodes used to configure vty, can mostly be static so
(basic data hiding 101).
|
|
- Add more stuff, archive libraries, etc..
|
|
|
|
|
|
2008-08-13 Jingjing Duan <Jingjing.Duan@sun.com>
* isisd/isis_dlpi.c: (open_dlpi_dev) Clearview-UV device nodes are
under /dev/net, try opening there before attempting style 1 or 2
names.
Signed-off-by: Paul Jakma <paul@quagga.net>
|
|
2008-08-13 Jingjing Duan <Jingjing.Duan@sun.com>
* ospfd/: Remove the old checksum implementation and
use the consolidated version.
* isisd/: ditto, thus fixing isisd checksuming on big-endian.
Signed-off-by: Paul Jakma <paul@quagga.net>
|
|
2008-08-13 Jingjing Duan <Jingjing.Duan@sun.com>
* isisd/isis_dlpi.c: Change ioctl from PFIOCSETF (transparent mode)
to I_STR (non-transparent mode). The old code resulted in no
filtering at all.
Signed-off-by: Paul Jakma <paul@quagga.net>
|
|
2008-08-13 Paul P Komkoff Jr <i@stingr.net>
* configure.ac: add a configure flag and autoconf macro, which will
determine if your toolchain supports PIE.
* */Makefile.am: add corresponding CFLAGS and LDFLAGS into
appropriate places.
Signed-off-by: Paul Jakma <paul@quagga.net>
|
|
|
|
2008-01-29 James Carlson <james.d.carlson@sun.com>
* Fix bug #437, assert due to bogus index management
* isis_flags.c: (flags_initialize) new
* (flags_get_index) fix off by one, leading to list assert
on null node data.
(flags_free_index) ditto.
* isisd.c: (isis_area_create) use flags_initialize
(isis_area_destroy) deconfigure circuits when
taking down area.
|
|
|
|
2007-08-07 James Carlson <james.d.carlson@sun.com>
* configure.ac: Added support for separate link-layer access
mechanisms in isisd.
* isis_network.c: split up into isis_bpf.c, isis_dlpi.c, and
isis_pfpacket.c, selected by autoconf, and added DLPI support.
* (general) Fixed to allow compilation and use on Solaris.
|
|
2007-05-09 Paul Jakma <paul.jakma@sun.com>
* configure.ac: sys/conf.h depends on sys/param.h, at least on
FBSD 6.2.
(bug #363) Should check for in_pktinfo for IRDP
2006-05-27 Paul Jakma <paul.jakma@sun.com>
* configure.ac: General cleanup of header and type checks, introducing
an internal define, QUAGGA_INCLUDES, to build up a list of
stuff to include so as to avoid 'present but cant be compiled'
warnings.
Misc additional checks of things missing according to autoscan.
Add LIBM, for bgpd's use of libm, so as to avoid burdening
LIBS, and all the binaries, with libm linkage.
Remove the bad practice of using m4 changequote(), just
quote the []'s in the case statements properly.
This should fix bugs 162, 303 and 178.
* */*.{c,h}: Update all HAVE_* to the standard autoconf namespaced
HAVE_* defines. I.e. HAVE_SA_LEN -> HAVE_STRUCT_SOCKADDR_SA_LEN,
* bgpd/Makefile.am: Add LIBM to bgpd's LDADD, for pow().
|
|
2006-12-08 Hannes Gredler <hannes@gredler.at>
* isis_adjacency.c: (isis_new_adj) Allow NULL snpa argument.
* isis_pdu.c: (various) Update calls to isis_new_adj() to pass
NULL and use default.
* (general) Add forward declarations where required.
Fix up const char *'s.
Allow V4-only compilation.
|
|
syntax
2006-10-04 Oliver Hookins <ohookins@gmail.com>
* bgpd/bgp_main.c: Add configuration check option, with
'-C' rather than '-c' for consistency between daemons.
* isisd/isis_main.c: ditto
* ospf6d/ospf6_main.c: ditto
* ospfd/ospf_main.c: ditto
* ripngd/ripng_main.c: ditto
* vtysh/vtysh_main.c: ditto
* ripd/rip_main.c: Change the config check option to
'-C' and tidy up the code.
* zebra/main.c: ditto
2006-10-04 Stergiakis Alexandros <astergiakis@antcor.com>
* ripd/rip_main.c: This trivial patch introduces a new
command-line option '-c', which instructs zebra/ripd
to check its configuration file for validity, print
any error message, and then exit. This is useful when
the configuration file is edited by hand or otherwise,
and you simply want to validate it without any other
effect.
* zebra/main.c: ditto
|
|
2006-01-17 Paul Jakma <paul.jakma@sun.com>
* bgp_nexthop.c: (zlookup_read*) convert to new Zserv format.
(zlookup_query_ipv6) ditto.
(bgp_import_check) ditto.
* isis_zebra.c: (isis_zebra_route_add_ipv4) fix for new
zserv format.
|
|
2005-11-20 Paul Jakma <paul.jakma@sun.com>
* (general) remove includes of very common system headers,
these are already picked up by zebra.h. Further, including
them before zebra.h messes up all our lovely (sarcasm)
autoconf'd detecting of platform specific things. Recent
addition of stdint.h to configure.ac and zebra.h appears
particularly to throw up this problem.
|
|
* isis_events.c: Stop pseudo LSP thread while resigning circuit from
level.
* isis_route.c: Fix compiling with EXTREME_DEBUG. Mark route as not
in sync with zebra if it's changed.
* isis_spf.c: Schedule route validating etc even if tent was empty.
It's probably because we just don't have any adjacencies.
* isisd.c: Write minimum spf interval into configuration.
|
|
* isis_route.c: fix EXTREME_DEBUG compilation
|