summaryrefslogtreecommitdiffstats
path: root/isisd/isis_pdu.c
Commit message (Collapse)AuthorAgeFilesLines
* isisd: md5 link authenticationFritz Reichmann2010-02-031-15/+51
| | | | | | | Implement isis circuit md5 authentication * Replace command "isis passwd" with "isis passwd {clear|md5}" * Verify HMAC MD5 on ISIS Hello PDUs * Add HMAC MD5 authentication to md5.h/md5.c from RFC2104
* isisd: fixes 7/7: bug #544: unexpected kernel routing tableFritz Reichmann2010-02-031-21/+22
| | | | | | | | | | | | | Fix Bug 544: isisd produces an unexpected routing table for wide-metric. * isis_spf.c: Accept VTYPE_PSEUDO_TE_IS and VTYPE_NONPSEUDO_TE_IS vertex types for SPF calculation * isis_pdu.c: Change order of TLVs to match Cisco to make bitwise comparision easier for Wireshark. * isis_tlv.c: EXTREME_TLV_DEBUG for TLV debugging instead of EXTREME_DEBUG CSNP triple sending rate (fix 8/7) is merged into this patch. Cc: David Lamparter <equinox@diac24.net>
* isisd: fixes 6/7: wrong next-hops from SPFPeter Szilagyi2010-02-031-3/+1
| | | | | | | | | | | | | | | | | | | | | | | The forwarding table was filled with wrong next-hops, and which is even worse, it was done in a totally non-deterministic way. The next-hop set for an IP prefix by isisd was the neighbor IS from which the flooded LSP about the IP prefix was arrived. So, if an IS received all the LSPs through its, say, eth0 interface, all entries in the forwarding table contained the next IS reachable via eth0 as the next-hop. The solution is to propagate the correct next-hop further from node to node as the SPF algorithm traverses the graph and selects the next node to be added to the set of already covered nodes. Also, the construction of the tentative node list (the nodes where the shortest path is not known yet) was buggy: if a node was already a member of this list with a certain path cost, and an alternative path was found to it with a lower cost while processing a pseudo-node LSP, it was not added to the list. This way, the path selected by isisd for a certain prefix was the first one it encountered during the LSDB processing. Signed-off-by: Fritz Reichmann <fritz@reichmann.nl>
* isisd: fixes 5/7: send proper LSP after DIS electionPeter Szilagyi2010-02-031-0/+4
| | | | | | | | | | | | | After an IS has been elected as the Designated IS for a LAN, it did not refresh the content of the pseudo-node after a new node has been connected to the same LAN. Instead, the periodically reoriginated pseudo-node LSP still contained only those IS neighbors that were already present when the DIS election process was commenced. The fix for the problem schedules an LSP regeneration rather than just reoriginating the same LSP with the old content. Signed-off-by: Fritz Reichmann <fritz@reichmann.nl>
* isisd: fixes 4/7: circuit state machinePeter Szilagyi2010-02-031-60/+69
| | | | | | | | | | | | | | | | isisd has a so-called circuit state machine that takes care about the interface state changes, such as initializing, down, up. When an interface was brought down by a link failure, the interface information was deleted and set to NULL. When the link was restored later, the interface was looked up by the old pointer, but since it was cleared, it was never found again, resulting in an interface never entering the up state again. Also, the program regularly crashed because of a deleted pointer in the same context which was later accessed without any further checking. Signed-off-by: Fritz Reichmann <fritz@reichmann.nl>
* isisd: fixes 3/7: include hash.h, not hash.cPeter Szilagyi2010-02-031-1/+1
| | | | | | Inclusion of the source file hash.c instead of the proper hash.h header file. Signed-off-by: Fritz Reichmann <fritz@reichmann.nl>
* isisd: fixes 2/7: bug #539: wrong hello rate for pseudo nodeFritz Reichmann2010-02-031-2/+24
| | | | * isis_pdu.c: Divide hello interval by three, depending if we are DIS or not.
* isisd: fixes 1/7: bug #536: crash on apply/delete isis configFritz Reichmann2010-02-031-0/+8
| | | | | | | | | | | | | | | | | | The crash is due to threads accessing data that gets destroyed during the removal of the configuration. * isis_circuit.c: Destroy adjacencies to stop adjacency expiry thread. Stop PSNP threads. * isisd.c: Change state of circuit back to INIT and reassing the circuit structure to isis->init_circ_list rather than destroying the circuit data structure. Stop SPF threads. Stop LSP generation threads. * isisd.h: Add pointers to LSP threads into area structure in order to stop them in isisd.c * isis_lsp.c: Store pointer to LSP thread in area structure. * isis_pdu.c: Stop PDU generation for a circuit with a removed area. * isis_pfpacket.c: Stop processing received PDUs for a circuit with a removed area.
* 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
* [ospfd/isisd] Switch to lib/ Fletcher checksum, fixing bug in isisdJingjing Duan2008-08-221-2/+3
| | | | | | | | | | 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 compiler warnings and allow v4-only compilationPaul Jakma2006-12-081-3/+3
| | | | | | | | | | | 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.
* [isisd] remove includes of common system headers.paul2005-11-201-2/+0
| | | | | | | | | | | 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.
* * *.c: Massive cleanup of lists loops. Stop abusing ALL_LIST_ELEMENTS.hasso2005-09-281-23/+21
| | | | | | Replace XMALLOC + memset with XCALLOC. Fix some indentation issues. The only really significant change is simplified isis_delete_adj function in isis_adjacency.c.
* * isis_lsp.c, isis_pdu.c, isis_spf.c: Remove some old unused code.hasso2005-09-191-101/+0
|
* * isis_lsp.c (lsp_update): Remove LSP from database before updatinghasso2005-09-161-2/+3
| | | | | | its data and put it back after. Database entry MUST contain at least correct pointers to the sysid to get correct compare results. * isis_lsp.[ch], isis_pdu.c: Pass level to the lsp_update() function.
* * *.c: Try to be less verbose by default (without any debug optionshasso2005-09-041-9/+13
| | | | | | | on). * isis_lsp.c (lsp_build_nonpseudo): Use stream_reset() instead of touching endp directly. * isis_lsp.c (lsp_build_pseudo): Ditto.
* * random.c, spgrid.[ch]: Fix warnings with hope that I didn't brokehasso2005-09-011-6/+14
| | | | | | | | | anything. These floats to longs and vice versa casts are starnge indeed. * isis_pdu.c: As we don't use %z for size_t for now because we support older compilers, cast them to unsigned long. Also fix previous changelog entry. Isisd compiles cleanly now again.
* 2005-05-03 Paul Jakma <paul@dishone.st>paul2005-05-031-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (general) More cleaning up of stream abuse, isisd should be back to previous functionality. Replace various XMALLOC+memset's with XCALLOC * isis_tlv.c: (tlv_add_padding) use stream_put to clear the stream rather than forward endp, as isisd reuses streams. * isis_pdu.c: (process_lsp) cleanup direct reference to stream endp (send_lsp) manual copy of a stream cleaned up to use stream_copy. * isis_network.c: (isis_recv_pdu_bcast) replace direct memcpy with stream_write (isis_recv_pdu_p2p) replace recvfrom directly into stream with stream_recvfrom. Remove dangerous and now unneeded manual update of endp. (isis_recv_pdu_bcast / non-GNU_LINUX) Replace direct memcpy with stream_write. (isis_recv_pdu_p2p) replace read direct into stream with stream_read_try, and hence remove the manual update of endp. * isis_lsp.c: (lsp_update_data) manual stream dup replaced with stream_dup. (lsppdu_realloc) mempcy into stream data replaced with stream_put. (lsp_build_nonpseudo) remove mysterious stream_forward_endp's - which were originally stream_set_putp - shouldn't be needed now that all the manual fiddling of private stream data has been corrected. (build_topology_lsp_data) remove unneeded twiddling of endp, appears to be due to lsppdu_realloc(), but it appears to sort of do the right thing wrt streams.
* 2005-04-07 Paul Jakma <paul.jakma@sun.com>quagga_post_listloop_cleanuppaul2005-04-071-34/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (global): Fix up list loops to match changes in lib/linklist, and some basic auditing of usage. * configure.ac: define QUAGGA_NO_DEPRECATED_INTERFACES * HACKING: Add notes about deprecating interfaces and commands. * lib/linklist.h: Add usage comments. Rename getdata macro to listgetdata. Rename nextnode to listnextnode and fix its odd behaviour to be less dangerous. Make listgetdata macro assert node is not null, NULL list entries should be bug condition. ALL_LIST_ELEMENTS, new macro, forward-referencing macro for use with for loop, Suggested by Jim Carlson of Sun. Add ALL_LIST_ELEMENTS_RO for cases which obviously do not need the "safety" of previous macro. LISTNODE_ADD and DELETE macros renamed to ATTACH, DETACH, to distinguish from the similarly named functions, and reflect their effect better. Add a QUAGGA_NO_DEPRECATED_INTERFACES define guarded section with the old defines which were modified above, for backwards compatibility - guarded to prevent Quagga using it.. * lib/linklist.c: fix up for linklist.h changes. * ospf6d/ospf6_abr.c: (ospf6_abr_examin_brouter) change to a single scan of the area list, rather than scanning all areas first for INTER_ROUTER and then again for INTER_NETWORK. According to 16.2, the scan should be area specific anyway, and further ospf6d does not seem to implement 16.3 anyway.
* 2005-02-09 Paul Jakma <paul.jakma@sun.com>paul2005-02-091-10/+9
| | | | | | | | | | | | | * (global) Update code to match stream.h changes. stream_get_putp effectively replaced with stream_get_endp. stream_forward renamed to stream_forward_getp. stream_forward_endp introduced to replace some previous setting/manual twiddling of putp by daemons. * lib/stream.h: Remove putp. Update reference to putp with endp. Add stream_forward_endp, which daemons were doing manually. Rename stream_forward to stream_forward_getp. lib/stream.c: Remove/update references to putp. introduce stream_forward_endp.
* * *.c: Changed many functions to static. Some commented outhasso2005-01-181-17/+18
| | | | functions and some tiny related fixes. No functional changes.
* Make authentication of SNPs work correctly - ie. conditionally like it is inhasso2005-01-011-26/+23
| | | | IOS.
* zlog_* cleanup. Level of debug messages to LOG_DEBUG.hasso2004-12-241-113/+113
|
* No warnings here any more.hasso2004-10-071-0/+3
|
* This code didn't survive valgrinding. I wonder how it survived normal run.hasso2004-09-271-0/+3
|
* Compiler warnings fixes.hasso2004-09-261-3/+3
|
* 2004-09-20 LIU Xin <lx at ns.6test.edu.cn>hasso2004-09-201-30/+16
| | | | | | | * isis_dr.c, isis_events.c: Remove hello multiplier usage while scheduling DIS election. * isis_pdu.c: Don't call isis_event_dis_status_change() whenever l[1|2]_desig_is is different from hdr.lan_id.
* Second part of fixes from Laurent Rabret.hasso2004-09-151-15/+15
|
* isis_pdu.c: Update l1_desig_is only if neighbor really is DIS.hasso2004-09-141-4/+6
|
* Fixes from LIU Xin.hasso2004-09-101-2/+4
|
* Indentation only. No any functional changes.hasso2004-09-101-1335/+1575
|
* Make it compile in NetBSD and OpenBSD.hasso2004-05-191-1/+0
|
* Threads usage cleanup. Still at least one bug to go.hasso2004-02-111-43/+20
|
* Initial revisionjardin2003-12-231-0/+2478