summaryrefslogtreecommitdiff
path: root/ospf6d
AgeCommit message (Collapse)Author
2012-06-25ospf6d: complete SNMP implementation of ospfv3AreaTableVincent Bernat
2012-06-25ospf6d: complete SNMP implementation for scalar objectsVincent Bernat
2012-06-25ospf6d: add SNMP support for ospfv3NbrTableVincent Bernat
2012-06-25snmp: fix OSPFV3-MIB implementationVincent Bernat
Use the real MIB from RFC 5643. Fix used ASN1 types. Indexes are not exported any more (they are "no access"). Fix some endian issues. Also, ID are just integers, not IPv4 addresses. No additional OID are supported in this commit.
2012-06-25snmp: let handlers accept OID from a lesser prefixVincent Bernat
Most table handlers do not expect to be given an OID whose prefix is outside what they can handle. This is not a problem with the SMUX implementation since it always correct the OID such that the prefix matches. However, this is not the case for the AgentX implementation. A new function, smux_header_table() is used to do this normalization.
2012-06-25build: use net-snmp-config to configure NetSNMPVincent Bernat
The correct method to link to NetSNMP is to use net-snmp-config (which is like pkg-config). Explicit link to libcrypto is also dropped (NetSNMP libs are linked to libcrypto, no need to link Quagga to it). Moreover, @SNMP_INCLUDES@ is dropped because useless. Due to a bug in configure.ac, it was properly populated.
2012-06-25build: only define HAVE_SNMPVincent Bernat
NetSNMP is the only SNMP implementation for Quagga. We don't need two different symbols.
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-02-21ospf6d: remove defaults from iface config (BZ#550)Vyacheslav Trushkin
2012-02-21ospf6d: remove own routes on SIGTERM (BZ#448)Phil Laverdiere
2012-02-11ospf6d: fix out of bounds write in ospf6_prefix_apply_maskDavid Lamparter
ospf6_prefix_apply_mask would write one byte beyond the 4/8/12 bytes allocated for prefixes of length 32/64/96. based on report and patch by Jon Andersson <jon.andersson@thales.no> Reported-by: Jon Andersson <jon.andersson@thales.no> Signed-off-by: David Lamparter <equinox@diac24.net>
2012-01-23fix zebra protocol after MP-BGP changesDenis Ovsienko
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-01-08ospf6d: ospf6_lsa_cmd_init() does not existDenis Ovsienko
2012-01-02ospf6d: fix compiler warning messagesVyacheslav Trushkin
* fix disagreement with C99 in zlog_debug calls Format specifier in some zlog_debug calls for size_t values was changed in order to C99 ('%u' -> '%zu'). * fix -Wsign-compare warnings Type of return value of ospf6_packet_max() was changed.
2012-01-02ospf6d: add verifying user's privilegesVyacheslav Trushkin
2011-12-14ospf6d: always remove the result of a previous SPF calculationTom Goff
This is needed to avoid stale routes in some cases; the regression was introduced by commit 1d19234e79c77a7d55194b513f2a77c6a691bc2c. * ospf6_spf.c: (ospf6_spf_calculation) Call ospf6_spf_table_finish() before possibly returning if no router-LSA is found for the root of the SPF tree.
2011-12-13ospf6d: decode message type with LOOKUP()Denis Ovsienko
* ospf6_message.h * OSPF6_MESSAGE_TYPE_CANONICAL(): dismiss * OSPF6_MESSAGE_TYPE_NAME(): dismiss * ospf6_message.c * ospf6_message_type_str: rewrite as a message list, add max value * ospf6_packet_examin(): update to use LOOKUP() * ospf6_receive(): idem * ospf6_send(): idem
2011-12-13ospf6d: make some old sizing checks assertionsDenis Ovsienko
As long as ospf6_packet_examin() is now the single checkpoint for received packets, most of the old checks performed elsewhere can be converted into assert() constructs. Malformed input data at respective points can be attributed solely to a programming error, not a malformed packet. * ospf6_message.c * ospf6_hello_print() * ospf6_dbdesc_print() * ospf6_lsreq_print() * ospf6_lsupdate_print() * ospf6_lsack_print() * ospf6_hello_recv() * ospf6_dbdesc_recv_master() * ospf6_dbdesc_recv_slave() * ospf6_lsreq_recv() * ospf6_lsupdate_recv() * ospf6_lsupdate_recv() * ospf6_lsack_recv() * ospf6_receive()
2011-12-13lib: put route_types.txt to real useDavid Lamparter
this replaces most occurences of routing protocol lists by preprocessor defines from route_types.h. the latter is autogenerated from route_types.txt by a perl script (previously awk). adding a routing protocol now is mostly a matter of changing route_types.txt and log.c. Conflicts: lib/route_types.awk
2011-12-13build: delete .cvsignore filesDenis Ovsienko
2011-12-13quagga: option "-z" ("--socket <path>") addedVyacheslav Trushkin
All daemons modified to support custom path to zserv socket. lib: generalize a zclient connection zclient_socket_connect added. zclient_socket and zclient_socket_un were hidden under static expression. "zclient_serv_path_set" modified.
2011-12-13ospf6d: justify multicast group managementVyacheslav Trushkin
* ospf6_network.[ch] * ospf6_sso(): new function supersedes ospf6_join_allspfrouters(), ospf6_leave_allspfrouters(), ospf6_join_alldrouters() and ospf6_leave_alldrouters() * ospf6_interface.c * ospf6_interface_state_change(): update respectively * interface_up(): ditto * interface_down(): ditto
2011-12-13ospf6d: implement 'match interface' for route-mapsVyacheslav Trushkin
ospf6_routemap_rule_match_interface* was imported from ospfd daemon with minor changes. new CLI options defined. `ospf6_routemap_rule_match_interface' was changed to support IPv6 (ospfv3) route's external information.
2011-12-07ospf6d: fix compile warning from falling off end of mainStephen Hemminger
ospf6 main always calls ospf6_exit() which always calls exit. Use attributes to tell GCC that this is ok.
2011-11-17ospf6d: check MTU with message header size in mindDmitrij Tejblum
* ospf6_message.c: (ospf6_packet_max): new function, return maximum IPv6 payload on an interface; (ospf6_hello_send, ospf6_dbdesc_send, ospf6_dbdesc_send_newone, ospf6_lsreq_send, ospf6_lsupdate_send_neighbor, ospf6_lsupdate_send_interface, ospf6_lsack_send_neighbor, ospf6_lsack_send_interface): compare message size with the maximum payload instead of the MTU.
2011-10-17IPv6 transport class suppportStephen Hemminger
IPv6 supports the same concept of differentiated service for routing protocols as IPv4, but like too many things, the standards committee decided that having two names for the same thing wasn't good enough and introduced a third more generic term transport class. The socket option to set transport class works the same as IPv4, but the arguments are different. * lib/sockopt.[ch] * setsockopt_ipv6_tclass(): new function * bgpd/bgp_network.c * bgp_connect(): set socket option * bgp_listener(): set socket option * ospf6d/ospf6_network.c * ospf6_set_transport_class(): new function * ospf6_serv_sock(): set socket option * ripngd/ripngd.c * ripng_make_socket(): set socket option
2011-09-27ospf6d: address more trivial compiler warningsDenis Ovsienko
* ospf6_main.c: include required headers * ospf6_asbr.h: idem * ospf6_spf.c * ospf6_spf_install(): remove unused variables
2011-09-27ospf6d: spellingDenis Ovsienko
2011-09-27ospf6d: add lost lines to area config blockJon Andersson
* ospf6_area.c * ospf6_area_config_write(): write filter-list, import-list and export-list lines
2011-09-27ospf6d: fix crash on filter-list handling (BZ#530)Christian Hammers
This essentially merges the fix available from Debian build of Quagga. * ospf6_area.c * area_filter_list(): use correct argv indices * no_area_filter_list(): idem
2011-09-26ospf6d: CVE-2011-3323 (fortify packet reception)Denis Ovsienko
This vulnerability (CERT-FI #514840) was reported by CROSS project. ospf6d processes IPv6 prefix structures in incoming packets without verifying that the declared prefix length is valid. This leads to a crash caused by out of bounds memory access. * ospf6_abr.h: new macros for size/alignment validation * ospf6_asbr.h: idem * ospf6_intra.h: idem * ospf6_lsa.h: idem * ospf6_message.h: idem * ospf6_proto.h: idem * ospf6_message.c * ospf6_packet_minlen: helper array for ospf6_packet_examin() * ospf6_lsa_minlen: helper array for ospf6_lsa_examin() * ospf6_hello_recv(): do not call ospf6_header_examin(), let upper layer verify the input data * ospf6_dbdesc_recv(): idem * ospf6_lsreq_recv(): idem * ospf6_lsupdate_recv(): idem * ospf6_lsack_recv(): idem * ospf6_prefixes_examin(): new function, implements A.4.1 * ospf6_lsa_examin(): new function, implements A.4 * ospf6_lsaseq_examin(): new function, an interface to above * ospf6_packet_examin(): new function, implements A.3 * ospf6_rxpacket_examin(): new function, replaces ospf6_header_examin() * ospf6_header_examin(): sayonara * ospf6_receive(): perform passive interface check earliest possible, employ ospf6_rxpacket_examin()
2011-09-26ospf6d: CVE-2011-3324 (DD LSA assertion)Denis Ovsienko
This vulnerability (CERT-FI #514839) was reported by CROSS project. When Database Description LSA header list contains trailing zero octets, ospf6d tries to process this data as an LSA header. This triggers an assertion in the code and ospf6d shuts down. * ospf6_lsa.c * ospf6_lsa_is_changed(): handle header-only argument(s) appropriately, do not treat LSA length underrun as a fatal error.
2011-08-27ospf6d: add missing includeDenis Ovsienko
Two extern declarations in ospf6_abr.h are based on struct ospf6_route, which may not be available at the time ospf6_abr.h is included. This may lead to warnings after including ospf6_abr.h just for the structures defined in it.
2011-08-27ospf6d: move named constants to ospf6d.hDenis Ovsienko
2011-08-27ospf6d: justify some ABR debug codeDenis Ovsienko
* ospf6_abr.c * ospf6_abr_examin_summary(): only fill "buf" when it is used
2011-04-22ospf6d: copy "mtu-ignore" option from ospfdDmitrij Tejblum
"mtu-ignore" is an option ospfd used to mimic from the vendor's implementation, now ospf6d will also implement it. * ospf6_interface.h: extend ospf6_interface structure by one flag * ospf6_interface.c: (ipv6_ospf6_mtu_ignore, no_ipv6_ospf6_mtu_ignore): new declarations; (ospf6_interface_create): show initial value for consistency; (ospf6_interface_show): print flag status * ospf6_message.c: (ospf6_dbdesc_recv): consider interface-specific flag when checking MTU
2011-04-04ospf6d: fix crash if zebra_interface_state_read can't find interfaceIngo Flaschberger
* ospf6_zebra.c: (ospf6_zebra_if_state_update) zebra_interface_state_read may return NULL, if it can't find an interface, deal with it.
2011-03-21ospf6d: Extend the "[no] debug ospf6 route" vty commandsTom Goff
* ospf6_route.c ([no_]debug_ospf6_route) Include memory as a debug option. This allows ospf6 route memory debugging to be enabled or disabled interactively or from a config file.
2011-03-21ospf6d: Route locking (memory) cleanupTom Goff
* ospf6_route.c: (ospf6_route_best_next) Allows unlock route, even when there's no next route. This is consistent with how ospf6_route_next() behaves. * ospf6_intra.c: (ospf6_intra_prefix_lsa_remove) Make sure the last route considered is always unlocked. This is needed when the for loop terminates because ospf6_route_is_prefix() returns zero.
2011-03-21ospf6d: Have ospf6d cleanup when it terminates normallyTom Goff
A clean exit makes it easier to use memory debuggers. * ospf6_asbr.c: (ospf6_asbr_terminate) Add a function to do route map cleanup. * ospf6_lsa.c: (ospf6_lsa_terminate) Add a function to cleanup the lsa handler vector. * ospf6_main.c: (ospf6_exit) Add an function that causes ospf6d to gracefully exit. * ospf6_message.c: (ospf6_message_terminate) Add a function that frees the send and receive buffers. * ospf6_top.c: (ospf6_delete) Enable the ospf6_delete() function. Disable ospf6 before freeing everything.
2011-03-21ospf6d: Remove obsolete codeTom Goff
* ospf6_area.c: (ospf6_area_delete) Get rid of unused code that refers to a nonexistent function and structure member.
2011-03-21ospf6d: Fix memory allocation issues in SPFTom Goff
* ospf6_area.c: Call ospf6_spf_table_finish() before deleting the spf table. This ensures that the associated ospf6_vertex structures are also freed. * ospf6_spf.c: Only allocate a priority queue when a spf calculation is actually performed. Also defer calling ospf6_spf_table_finish().
2011-01-13ospf6d: fix crash in SPF calculationDmitrij Tejblum
* ospf6_spf.c: Don't replace a node with another node with a lower number of hops, instead get them from the queue in the correct order. (Actually, the replacement crashed the ospf6d daemon rather than worked.)
2010-04-28ospf6d: Fix crash when '[no] ipv6 ospf6 advertise prefix-list' is in ↵David Ward
startup-config * ospf6_interface.c: When '[no] ipv6 ospf6 advertise prefix-list' appears in the startup configuration for ospf6d, a crash occurs, because ospf6d attempts to schedule LSAs when the 'oi->area' structure has not yet been initialized. Now, when the command above is issued (either in the startup configuration or at runtime), ospf6d will only schedule LSAs if the 'oi->area' structure has been initalized. A similar test is already used when handling the commands 'ipv6 ospf6 priority' and 'ipv6 ospf6 cost'.
2009-12-10ospf6d: remove dead codeStephen Hemminger
* ospf6d/ospf6_interface.c * loopind(): sayonara * ospf6d/ospf6_top.c * ospf6_delete(): comment out, it might be useful if real shutdown is added
2009-12-10ospf6d: fix warnings from recent prefix bit commitStephen Hemminger
* lib/prefix.h * prefix6_bit(): add IPv6 wrapper for prefix_bit() * ospf6d/ospf6_lsdb.c * ospf6_lsdb_type_router_head(): employ prefix6_bit() * ospf6_lsdb_type_head(): idem
2009-12-09lib: move check_bit into prefix common codeStephen Hemminger
Make one version of check prefix bit, and put it inline with proper prototype. This gets rid of some macro's and also some assert() that can never happen on a non-broken compiler. * bgpd/bgp_table.c * CHECK_BIT(): sayonara * check_bit(): sayonara * SET_LINK(): sayonara * set_link(): make use of prefix_bit() instead of check_bit() * bgp_node_match(): idem * bgp_node_lookup(): idem * bgp_node_get(): idem * lib/prefix.h * prefix_bit(): new inline version of check_bit() * lib/table.c * CHECK_BIT(): sayonara * check_bit(): sayonara * SET_LINK(): sayonara * set_link(): make use of prefix_bit() instead of check_bit() * route_node_match(): idem * route_node_lookup(): idem * route_node_get(): idem * ospf6d/ospf6_lsdb.c * CHECK_BIT(): sayonara * ospf6_lsdb_lookup_next(): make use of prefix_bit() instead of CHECK_BIT() * ospf6_lsdb_type_router_head(): idem * ospf6_lsdb_type_head(): idem * ospf6d/ospf6_route.c * CHECK_BIT(): sayonara * ospf6_route_match_head() make use of prefix_bit() instead of * CHECK_BIT()
2009-12-07ospf6d: review LSA sequence number comparisonOndrej Zajicek
It seems that there is a bug in ospf6d in ospf6_lsa_compare(): If LSA A has sequence number smaller than 0x80000000 and LSA B has sequence number larger than 0x80000000, ospf6_lsa_compare() returns that B is more recent than A, although RFC says that sequence numbers should be compared as signed numbers (0x8000001 smallest and 0x7FFFFFFF largest). In ospfd, the function ospf_lsa_more_recent() has it right. The problem appears when Quagga is used together with OSPFv3 in development version of BIRD daemon ( http://bird.network.cz/ ), which creates LSAs with maximum sequence number (0x7FFFFFFF) as a part of flushing/premature aging LSA from OSPF area. Because both daemons has different idea of which LSA instance is more recent, it would lead to LSA storm.
2009-12-01ospf6d: fix LSA locking in ospf6_new_ls_id()Tom Goff
* ospf6_lsdb.c: (ospf6_new_ls_id) Unlock the current LSA when breaking out of the ospf6_lsdb_*_head() / ospf6_lsdb_*_next() loop early. No explicit unlocking is needed when all LSAs are looped through because ospf6_lsdb_*_next() manages everything in that case.
2009-08-28ospf6d: bug #529, fix endianness problem in earlier commit Tom Henderson
* ospf6_lsa.c: (ospf6_lsa_age_current) arithmetical compares make no sense in non-host order..