summaryrefslogtreecommitdiff
path: root/isisd
AgeCommit message (Collapse)Author
2014-01-08lib/command.c: rewrite command matching/parsingChristian Franke
Add support for keyword commands. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2014-01-08isisd: add a slight delay to lsp_regenerate_scheduleChristian Franke
isisd implements a holdoff interval and will refrain from regenerating an lsp if the difference between the current time and its last refresh is less than the holdoff interval, but instead, it will schedule a timer to regenerate the lsp after the holdoff interval has passed. This implementation has one disadvantage in the case where there is a succession of calls to lsp_regenerate_schedule. In such a case, the first call will trigger an immediate regeneration of the lsp, while the other calls will only schedule the regeneration timer. This leads to cases where it takes holdoff interval time for information to propagate, just because the information was only available e.g. at the second call of lsp_regenerate_schedule in such a succession of calls. By not immediately regenerating an lsp if the last generation time is sufficiently long ago, but instead scheduling the regeneration with a very small delay, we allow all information from such a succession of calls to be considered. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2014-01-07isisd: do remove ipv6 routes from ZebraChristian Franke
We can abort isis_zebra_route_del_ipv6 if the route in question has ISIS_ROUTE_FLAG_ZEBRA_SYNCED unset, meaning it's not in the kernel. Aborting the function if the flag is set prevents us from removing any routes. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2013-07-31isisd, ospf6d: use bug-report information from autoconfChristian Franke
Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-12-12isisd: fix ipv6 metric endiannessNick Hilliard
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>
2012-12-12isisd: verify metrics on metric-style transitionChristian Franke
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>
2012-12-12isisd: fix metrics check for metric-style narrowChristian Franke
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>
2012-12-12isisd: address Coverity warningsDavid Lamparter
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>
2012-12-12isisd: always join all IS-IS multicast groupsDavid Lamparter
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>
2012-12-12isisd: save metric-style narrowChristian Franke
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>
2012-12-12isisd: fix spftree_area_del typo causing SEGVDavid Lamparter
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>
2012-12-12isisd: drop hellos without supported protocol listDavid Lamparter
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>
2012-12-12isisd: refuse adjacencies with our own system IDDavid Lamparter
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>
2012-12-12isisd: do not add >63 IP addresses to helloDavid Lamparter
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>
2012-11-05isisd: clock_gettime() -> quagga_gettime() conversion.Hasso Tepper
* isisd/isis_spf.c: Use portable quagga_gettime() like the rest of the Quagga code. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2012-10-25*: use array_size() helper macroBalaji.G
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>
2012-10-25isisd: don't overrun list of protocolsDavid Lamparter
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>
2012-10-25isisd: don't process invalid prefixes from TLVsDavid Lamparter
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>
2012-10-25isisd: pull up invalid prefix assert()David Lamparter
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>
2012-10-25isisd: fix null pointer dereference in send_lsp()Avneesh Sachdev
* 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.
2012-10-25isisd: tighten checks on ISIS pdu lengthAvneesh Sachdev
* 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.
2012-06-25build: allow configure and build in a separate directoryVincent Bernat
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
2012-06-21isisd: fix typo in topology generator (BZ#731)David Lamparter
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>
2012-04-16quagga: option "-z" ("--socket <path>") addedVyacheslav Trushkin
All daemons modified to support custom path to zserv socket. [reapplied from b511468 after isisd merge]
2012-04-16isisd: indent longopts arrayVyacheslav Trushkin
2012-04-16isisd: reapply removal of CVS cruftDavid Lamparter
this re-removes CVS keywords and .cvsignore files. original commits: b82cdeb delete CVS keywords 05e54ee build: delete .cvsignore files
2012-04-11isisd: reapply patch to fix zebra protocolAvneesh Sachdev
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.
2012-04-07isisd: couple of bug fixesSubbaiah Venkata
2012-04-07isisd: add Google's changes to IS-ISJosh Bailey
2010-04-28isisd: change ISIS_METHOD to use C preprocessorDavid Lamparter
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)
2009-12-21lib: make some structures constantStephen Hemminger
* 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
2009-12-03isisd: fix --enable-isis-topology for 64-bit LinuxDavid Ward
2009-12-03isisd: fix BPF ioctl() calls, treat "true" and "false" as reservedDavid Ward
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)
2009-08-13all: check return value from daemon() callStephen Hemminger
* */*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.
2009-06-19[cleanup] convert bzero() deprecated by POSIX to memset()Jeremy Jackson
autoscan 2.62 complains about bzero(), so a good fix nowadays is to just replace it.
2009-06-12[cleanup] Make command nodes staticStephen Hemminger
The cmd_nodes used to configure vty, can mostly be static so (basic data hiding 101).
2008-08-22[administrivia] Update gitignore filesPaul Jakma
- Add more stuff, archive libraries, etc..
2008-08-22[administrivia] Git should ignore backup files and .loT filesPaul Jakma
2008-08-22[trivia] Remove ChangeLog files, as this data is now maintained in SCMPaul Jakma
2008-08-22[isisd:DLPI] Try open vanity-named DLPI dev before style 1,2Jingjing Duan
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-22[ospfd/isisd] Switch to lib/ Fletcher checksum, fixing bug in isisdJingjing Duan
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-22[isisd] Fix packet filtering with DLPIJingjing Duan
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-22[build] Test for GNU-style PIE support in toolchain and enablePaul P Komkoff Jr
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-08-22[administrivia] Add .gitignore files, based on .cvsignores.Paul Jakma
2008-01-29[isisd] Bug #437: fix ssert caused by bad list managementPaul Jakma
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-08[isisd] Commit new files which should have been part of previous commit..Paul Jakma
2007-08-07[isisd] Add support for Solaris DLPIPaul Jakma
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-10[autoconf] bugs 162,303,178: Fix 'present but can not be compiled' warningsPaul Jakma
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[isisd] Fix compiler warnings and allow v4-only compilationPaul Jakma
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.
2006-10-15[daemon startup] Add --dry-run/-C argument to daemons, to check config file ↵Paul Jakma
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