summaryrefslogtreecommitdiffstats
path: root/isisd
Commit message (Collapse)AuthorAgeFilesLines
...
* *: use long long to print time_tDavid Lamparter2015-04-193-7/+9
| | | | | | | | | | | | Since we can't assume time_t to be long, int, or even long long, this consistently uses %lld/long long (or %llu/unsigned long long in a few cases) to print time_t/susecond_t values. This should fix a bunch of warnings, on NetBSD in particular. (Unfortunately, there seems to be no "PRId64" style printing macro for time_t...) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: get rid of INCLUDES, use AM_CPPFLAGSDavid Lamparter2015-02-142-5/+2
| | | | | | | | | | | | INCLUDES in configure.ac was not used at all, and INCLUDES in Makefile.am is supposed to be AM_CPPFLAGS these days. Reduces warnings spewed during bootstrap/autoreconf. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Greg Troxel <gdt@ir.bbn.com> Acked-by: Feng Lu <lu.feng@6wind.com> Acked-by: Paul Jakma <paul@jakma.org>
* isisd: match adjacency with source of hellosAmritha Nambiar2015-02-061-0/+11
| | | | | | | | | | | | | isis_pdu.c: match adjacency with source of hellos, check for source ID on receiving hello If an adjacency exists, check the adjacency is with the same router as the source of the hellos. In case a mismatch is detected, bring down the adjacency and let the next hellos trigger creating the new adjacency. Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* isisd: fix crash on changing the circuit type of a passive interfaceLu Feng2015-02-061-19/+22
| | | | | Signed-off-by: Feng Lu <lu.feng@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* make some structures constant.Stephen Hemminger2014-11-031-1/+1
| | | | | | | These pre-initialized arrays are not modified. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Feng Lu <lu.feng@6wind.com>
* isisd: type mix-up in 28a8cfc "don't require IPv4"David Lamparter2014-08-181-2/+2
| | | | | | | | | | | Whoops, these are in6_addrs, not prefix_ipv6... funnily enough, it does the right thing either way, if it compiles, which it only does on Linux because IN6_IS_ADDR_LINKLOCAL contains a cast to the right type. On BSD there is no such cast, hence it explodes on trying to compile, trying to access struct members of in6_addrs while operating on prefix_ipv6... Fixes: 28a8cfc ("isisd: don't require IPv4 for adjacency") Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: fix detection and usage of sys/cdefs.hTimo Teräs2014-08-181-1/+1
| | | | | | | | | | | | This header is non-standard (though present on many systems) and there is no standard for what it should or should not define. Remove it where it is not really needed. But add also a configure check, so it can be used if available but otherwise fallback to defining the needed macroes. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* isisd: don't require IPv4 for adjacencyDavid Lamparter2014-08-181-10/+79
| | | | | | | | This was precluding isisd from IPv6-only operation; no adjacency would come up unless there was IPv4 in parallel. Reported-by: Martin Winter <mwinter@netdef.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* isisd: ignore the unrecognized TLVsLu Feng2014-06-031-1/+0
| | | | | | | | | | | | When processing LSPDUs, the unrecognized TLVs/sub-TLVs should be silently ignored. In parse_tlvs(), ISIS_WARNING is returned once an unrecognized TLV exists. It breaks the processing in lsp_authentication_check() and lsp_update_data(). So remove it. Signed-off-by: Feng Lu <lu.feng@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib/command.c: rewrite command matching/parsingChristian Franke2014-04-011-2/+0
| | | | | | | | | | Add support for keyword commands. Includes new documentation for DEFUN() in lib/command.h, for preexisting features as well as new keyword specification. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* isisd, ospf6d: use bug-report information from autoconfChristian Franke2013-07-311-1/+1
| | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* isisd: fix ipv6 metric endiannessNick Hilliard2012-12-121-1/+1
| | | | | | | | | | 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>
* isisd: verify metrics on metric-style transitionChristian Franke2012-12-121-8/+11
| | | | | | | | 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>
* isisd: fix metrics check for metric-style narrowChristian Franke2012-12-121-2/+2
| | | | | | | | | | 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>
* isisd: address Coverity warningsDavid Lamparter2012-12-129-7/+19
| | | | | | | | | | | | | | | | | 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>
* isisd: always join all IS-IS multicast groupsDavid Lamparter2012-12-122-14/+8
| | | | | | | | | | | | | | | 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: save metric-style narrowChristian Franke2012-12-121-0/+5
| | | | | | | | | 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>
* isisd: fix spftree_area_del typo causing SEGVDavid Lamparter2012-12-121-1/+1
| | | | | | | | 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: drop hellos without supported protocol listDavid Lamparter2012-12-121-5/+25
| | | | | | | | | | | 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: refuse adjacencies with our own system IDDavid Lamparter2012-12-121-0/+7
| | | | | | | | | | | | | | | 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>
* isisd: do not add >63 IP addresses to helloDavid Lamparter2012-12-121-4/+3
| | | | | | | | | | | 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: clock_gettime() -> quagga_gettime() conversion.Hasso Tepper2012-11-051-5/+5
| | | | | | | * isisd/isis_spf.c: Use portable quagga_gettime() like the rest of the Quagga code. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: use array_size() helper macroBalaji.G2012-10-251-1/+1
| | | | | | | | 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: don't overrun list of protocolsDavid Lamparter2012-10-251-2/+6
| | | | | | | | | | 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>
* isisd: don't process invalid prefixes from TLVsDavid Lamparter2012-10-251-9/+25
| | | | | | | | | | | 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>
* isisd: pull up invalid prefix assert()David Lamparter2012-10-251-0/+4
| | | | | | | | | | 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: fix null pointer dereference in send_lsp()Avneesh Sachdev2012-10-251-1/+13
| | | | | | | * 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: tighten checks on ISIS pdu lengthAvneesh Sachdev2012-10-251-5/+7
| | | | | | | | * 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.
* build: allow configure and build in a separate directoryVincent Bernat2012-06-252-2/+2
| | | | | | | | | | | 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
* isisd: fix typo in topology generator (BZ#731)David Lamparter2012-06-211-1/+1
| | | | | | | | 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>
* quagga: option "-z" ("--socket <path>") addedVyacheslav Trushkin2012-04-161-1/+7
| | | | | | | All daemons modified to support custom path to zserv socket. [reapplied from b511468 after isisd merge]
* isisd: indent longopts arrayVyacheslav Trushkin2012-04-161-9/+9
|
* isisd: reapply removal of CVS cruftDavid Lamparter2012-04-164-27/+0
| | | | | | this re-removes CVS keywords and .cvsignore files. original commits: b82cdeb delete CVS keywords 05e54ee build: delete .cvsignore files
* isisd: reapply patch to fix zebra protocolAvneesh Sachdev2012-04-111-0/+5
| | | | | | | | | | | | | | | 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.
* isisd: couple of bug fixesSubbaiah Venkata2012-04-0713-215/+348
|
* isisd: add Google's changes to IS-ISJosh Bailey2012-04-0736-3718/+6620
|
* isisd: change ISIS_METHOD to use C preprocessorDavid Lamparter2010-04-284-8/+12
| | | | | | 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)
* lib: make some structures constantStephen Hemminger2009-12-211-1/+1
| | | | | | | | | | | | | * 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
* isisd: fix --enable-isis-topology for 64-bit LinuxDavid Ward2009-12-031-0/+3
|
* isisd: fix BPF ioctl() calls, treat "true" and "false" as reservedDavid Ward2009-12-031-6/+7
| | | | | | | | | | | | | 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)
* all: check return value from daemon() callStephen Hemminger2009-08-131-2/+5
| | | | | | * */*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.
* [cleanup] convert bzero() deprecated by POSIX to memset()Jeremy Jackson2009-06-191-1/+1
| | | | | autoscan 2.62 complains about bzero(), so a good fix nowadays is to just replace it.
* [cleanup] Make command nodes staticStephen Hemminger2009-06-122-2/+2
| | | | | The cmd_nodes used to configure vty, can mostly be static so (basic data hiding 101).
* [administrivia] Update gitignore filesPaul Jakma2008-08-221-1/+1
| | | | - Add more stuff, archive libraries, etc..
* [administrivia] Git should ignore backup files and .loT filesPaul Jakma2008-08-223-0/+9
|
* [trivia] Remove ChangeLog files, as this data is now maintained in SCMPaul Jakma2008-08-221-600/+0
|
* [isisd:DLPI] Try open vanity-named DLPI dev before style 1,2Jingjing Duan2008-08-221-6/+17
| | | | | | | | | | 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>
* [ospfd/isisd] Switch to lib/ Fletcher checksum, fixing bug in isisdJingjing Duan2008-08-224-129/+13
| | | | | | | | | | 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>
* [isisd] Fix packet filtering with DLPIJingjing Duan2008-08-221-3/+9
| | | | | | | | | | 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>
* [build] Test for GNU-style PIE support in toolchain and enablePaul P Komkoff Jr2008-08-221-0/+4
| | | | | | | | | | | 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>