summaryrefslogtreecommitdiffstats
path: root/isisd/isis_tlv.c
Commit message (Collapse)AuthorAgeFilesLines
* isisd: add support to import routes from other protocolsChristian Franke2015-12-081-4/+17
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* isisd: assorted fixes (unused variables, static)David Lamparter2015-04-211-3/+1
| | | | | | This just mops up a few warnings in isisd. 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>
* isisd: address Coverity warningsDavid Lamparter2012-12-121-0/+1
| | | | | | | | | | | | | | | | | 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: 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: 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: add Google's changes to IS-ISJosh Bailey2012-04-071-24/+34
|
* [isisd] Fix compiler warnings and allow v4-only compilationPaul Jakma2006-12-081-0/+5
| | | | | | | | | | | 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.
* * *.c: Massive cleanup of lists loops. Stop abusing ALL_LIST_ELEMENTS.hasso2005-09-281-33/+18
| | | | | | 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_tlv.[ch]: New function tlv_add_in_addr() to put just one IPv4hasso2005-09-261-0/+14
| | | | | | address into TLV. Used for IPv4 address TLV (in case of LSP) and TE router ID TLV. * isis_lsp.c: Use tlv_add_in_addr() and include router ID in LSP.
* * isis_tlv.[ch]: Two new functions - tlv_add_te_is_neighs() andhasso2005-09-261-0/+65
| | | | | tlv_add_te_ipv4_reachs() to handle TLV's with new metric. None of them handle sub TLVs though for now.
* * isis_adjacency.c, isis_lsp.c, isisd.c: Replace XMALLOC && memsethasso2005-09-011-39/+14
| | | | | | | | | with XCALLOC. * isis_lsp.c (lsp_build_pseudo): Fix adding ES neighbour. * isis_tlv.c: More compact free_tlvs() function. * isis_lsp.c (lsp_build_nonpseudo) : Try to fix one more regression introduced by stream cleanup. Seek enp to the right place before starting to fill stream with TLVs.
* 2005-05-03 Paul Jakma <paul@dishone.st>paul2005-05-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (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-23/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (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-11/+4
| | | | | | | | | | | | | * (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-1/+1
| | | | functions and some tiny related fixes. No functional changes.
* zlog_* cleanup. Level of debug messages to LOG_DEBUG.hasso2004-12-241-30/+30
|
* No warnings here any more.hasso2004-10-071-4/+2
|
* Compiler warnings fixes.hasso2004-09-261-1/+1
|
* Second part of fixes from Laurent Rabret.hasso2004-09-151-1/+2
|
* Isisd is now able to remove addresses from circuit and trigger LSP updateshasso2004-09-141-0/+2
| | | | if it's done. Some random fixes as well and update to sample configuration.
* Indentation only. No any functional changes.hasso2004-09-101-742/+823
|
* Commit 100% working part of patch from Laurent Rabret ([quagga-dev 830]).hasso2004-05-191-0/+15
| | | | Also tiny temporary fix from me to spf thread crash. Will look at it later.
* Make it compile in NetBSD and OpenBSD.hasso2004-05-191-1/+0
|
* Some fixes to isisd done by me and Cougar in the spring of 2003. Seehasso2003-12-231-3/+4
| | | | changelog for details.
* Initial revisionjardin2003-12-231-0/+1014