summaryrefslogtreecommitdiff
path: root/ospfd/ospfd.c
AgeCommit message (Collapse)Author
2009-12-03ospfd: make local functions staticStephen Hemminger
This code is only used one place and can be made local. Gcc is smart enough to inline local functions if it wants to. The function also has a big chunk of compatiablity code that is no longer used; since quagga is now in a version control system the source does not need to be used as a historical reference.
2009-07-28ospfd: export ospf_if_table_lookup() and use it in ospf_network_run_interface()Joakim Tjernlund
Makes it possible to run OSPF on multiple PtP interfaces with the same remote address. * ospfd/ospf_interface.c: Export ospf_if_table_lookup(). * ospfd/ospf_interface.h: ditto. * ospfd/ospfd.c: (ospf_network_run_interface) Use ospf_if_table_lookup() to determine whether OSPF is already configured for a subnet and interface.
2009-06-18[OSPF/cleanup] make message lists read onlyStephen Hemminger
2009-06-18[ospfd] Fix OSPF route refcount leakStephen Hemminger
This may fix vyatta BUG 3096. The reference count for OSPF route table was never completely freed on deleting all neighbors.
2009-06-12[cleanup] Convert XMALLOC/memset to XCALLOCStephen Hemminger
Simple conversion of XMALLOC/memset to XCALLOC
2008-09-24[ospfd] Fix SEGV during startup introduced in recent commitJoakim Tjernlund
* ospfd/ospfd.c: (opsf_if_update) Check if ospf_lookup() returns NULL. Fixes bug introduced with recent ospf_network_run changes in a49eb30a, where SEGV will happen if not the "router ospf" command has been executed before the first interfaces are reported by zebra. Signed-off-by: Paul Jakma <paul@quagga.net>
2008-09-02[ospfd] Restructure opsf_if_update() and ospf_network_run()Joakim Tjernlund
Add an struct interface paramenter and adjust the affected code accordingly. The old code was a mess looping over all interfaces several times when one interface was added/changed. * ospfd/ospfd.h: Add struct interface parameter to ospf_if_update() * ospfd/ospf_zebra.c: Add ifp arg to ospf_if_update() calls. (ospf_interface_address_delete) delete ospf_if_update() call, redundant as function calls ospf_if_free() itself. * ospfd/ospfd.c: (ospf_network_unset) handle deconfiguration here, rather than ospf_if_update. (ospf_network_run_interface) ospf_network_run, for any given interface. (ospf_network_run) move guts to previous, and use it. (ospf_if_update) Adjust to take struct interface as argument, as all callers have a specific ifp in mind. Iterate over ifp's connected list and call ospf_network_run_interface instead of ospf_network_run, turning this path into O(nm) rather than O(n^2). Adjust all code dealing with opsf_if_update and ospf_network_run to pass the new struct interface * arg. (some minor modifications and bug-additions by Paul Jakma). Signed-off-by: Paul Jakma <paul@quagga.net>
2007-09-18+ fix minor regression in OSPF sending buffer adjustment logicDenis Ovsienko
2007-08-21Bug #362 is fixed now.Denis Ovsienko
2007-04-30[ospfd] network command now behaves more logically when a peer prefix is definedAndrew J. Schorr
2007-04-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * ospfd/ospfd.c: (ospf_network_match_iface) Comment out COMPATIBILITY_MODE. Going forward, the ospf "network" command will use a simple test: does the network command prefix contain the connected (destination) prefix of the interface? * doc/ospfd.texi: Add a paragraph to the description of the OSPFv2 network command to explain how we handle interfaces with peer addresses.
2007-02-27[ospfd] Fix bug: should exit immediately on SIGTERM if OSPF not actually runningAndrew J. Schorr
2007-02-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * ospfd.c: (ospf_terminate) Exit immediately if ospf is not actually running (e.g. the config file was empty). Fixes bug where SIGTERM would not kill ospfd.
2006-12-12[PtP over ethernet] New peer flag allows much more addressing flexibilityAndrew J. Schorr
2006-12-12 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * if.h: (struct connected) Add new ZEBRA_IFA_PEER flag indicating whether a peer address has been configured. Comment now shows the new interpretation of the destination addr: if ZEBRA_IFA_PEER is set, then it must contain the destination address, otherwise it may contain the broadcast address or be NULL. (CONNECTED_DEST_HOST,CONNECTED_POINTOPOINT_HOST) Remove obsolete macros that were specific to IPv4 and not fully general. (CONNECTED_PEER) New macro to check ZEBRA_IFA_PEER flag. (CONNECTED_PREFIX) New macro giving the prefix to insert into the RIB: if CONNECTED_PEER, then use the destination (peer) address, else use the address field. (CONNECTED_ID) New macro to come up with an identifying address for the struct connected. * if.c: (if_lookup_address, connected_lookup_address) Streamline logic with new CONNECTED_PREFIX macro. * prefix.h: (PREFIX_COPY_IPV4, PREFIX_COPY_IPV6) New macros for better performance than the general prefix_copy function. * zclient.c: (zebra_interface_address_read) For non-null destination addresses, set prefixlen to equal the address prefixlen. This is needed to get the new CONNECTED_PREFIX macro to work properly. * connected.c: (connected_up_ipv4, connected_down_ipv4, connected_up_ipv6, connected_down_ipv6) Simplify logic using the new CONNECTED_PREFIX macro. (connected_add_ipv4) Set prefixlen in destination addresses (required by the CONNECTED_PREFIX macro). Use CONNECTED_PEER macro instead of testing for IFF_POINTOPOINT. Delete invalid warning message. Warn about cases where the ZEBRA_IFA_PEER is set but no destination address has been supplied (and turn off the flag). (connected_add_ipv6) Add new flags argument so callers may set the ZEBRA_IFA_PEER flag. If peer/broadcast address satisfies IN6_IS_ADDR_UNSPECIFIED, then reject it with a warning. Set prefixlen in destination address so CONNECTED_PREFIX will work. * connected.h: (connected_add_ipv6) Add new flags argument so callers may set the ZEBRA_IFA_PEER flag. * interface.c: (connected_dump_vty) Use CONNECTED_PEER macro to decide whether the destination address is a peer or broadcast address (instead of checking IFF_BROADCAST and IFF_POINTOPOINT). * if_ioctl.c: (if_getaddrs) Instead of setting a peer address only when the IFF_POINTOPOINT is set, we now accept a peer address whenever it is available and not the same as the local address. Otherwise (no peer address assigned), we check for a broadcast address (regardless of the IFF_BROADCAST flag). And must now pass a flags value of ZEBRA_IFA_PEER to connected_add_ipv4 when a peer address is assigned. The same new logic is used with the IPv6 code as well (and we pass the new flags argument to connected_add_ipv6). (if_get_addr) Do not bother to check IFF_POINTOPOINT: just issue the SIOCGIFDSTADDR ioctl and see if we get back a peer address not matching the local address (and set the ZEBRA_IFA_PEER in that case). If there's no peer address, try to grab SIOCGIFBRDADDR regardless of whether IFF_BROADCAST is set. * if_ioctl_solaris.c: (if_get_addr) Just try the SIOCGLIFDSTADDR ioctl without bothering to check the IFF_POINTOPOINT flag. And if no peer address was found, just try the SIOCGLIFBRDADDR ioctl without checking the IFF_BROADCAST flag. Call connected_add_ipv4 and connected_add_ipv6 with appropriate flags. * if_proc.c: (ifaddr_proc_ipv6) Must pass new flags argument to connected_add_ipv6. * kernel_socket.c: (ifam_read) Must pass new flags argument to connected_add_ipv6. * rt_netlink.c: (netlink_interface_addr) Copy logic from iproute2 to determine local and possible peer address (so there's no longer a test for IFF_POINTOPOINT). Set ZEBRA_IFA_PEER flag appropriately. Pass new flags argument to connected_add_ipv6. (netlink_address) Test !CONNECTED_PEER instead of if_is_broadcast to determine whether the connected destination address is a broadcast address. * bgp_nexthop.c: (bgp_connected_add, bgp_connected_delete) Simplify logic by using new CONNECTED_PREFIX macro. * ospf_interface.c: (ospf_if_is_configured, ospf_if_lookup_by_prefix, ospf_if_lookup_recv_if) Simplify logic using new CONNECTED_PREFIX macro. * ospf_lsa.c: (lsa_link_ptop_set) Using the new CONNECTED_PREFIX macro, both options collapse into the same code. * ospf_snmp.c: (ospf_snmp_if_update) Simplify logic using new CONNECTED_ID macro. (ospf_snmp_is_if_have_addr) Simplify logic using new CONNECTED_PREFIX macro. * ospf_vty.c: (show_ip_ospf_interface_sub) Use new CONNECTED_PEER macro instead of testing the IFF_POINTOPOINT flag. * ospfd.c: (ospf_network_match_iface) Use new CONNECTED_PEER macro instead of testing with if_is_pointopoint. And add commented-out code to implement alternative (in my opinion) more elegant behavior that has no special-case treatment for PtP addresses. (ospf_network_run) Use new CONNECTED_ID macro to simplify logic. * rip_interface.c: (rip_interface_multicast_set) Use new CONNECTED_ID macro to simplify logic. (rip_request_interface_send) Fix minor bug: ipv4_broadcast_addr does not give a useful result if prefixlen is 32 (we require a peer address in such cases). * ripd.c: (rip_update_interface) Fix same bug as above.
2006-12-04[ospfd] Consider all connected addresses when creating ospf interfacesAndrew J. Schorr
2006-12-04 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * ospfd.c: (ospf_network_run) Remove an offending 'break' statement. Previously, after creating a single ospf_interface on a given network interface, the code would skip to the next interface without considering other connected addresses on the interface. After removing the 'break', we now consider all connected addresses.
2006-10-22[ospfd] Add passive-interface default supportPaul Jakma
2006-10-22 Yar Tikhiy <yar@comp.chem.msu.su> * (general) Add support for passive-interface default (with minor edits by Paul Jakma). * ospf_interface.h: Add OSPF_IF_PASSIVE_STATUS macro, looking at configured value, or the global 'default' value, as required. * ospf_interface.c: (ospf_if_new_hook) Leave passive unconfigured per default, allowing global 'default' to take effect for unconfigured interfaces. * ospf_packet.c: (various) use OSPF_IF_PASSIVE_STATUS * ospf_vty.c: (ospf_passive_interface_default) new function, unset passive from all interfaces if default is enabled, as the per-iface settings become redundant. (ospf_passive_interface_update) new func, update passive setting taking global default into account. ({no,}ospf_passive_interface_addr_cmd) Add support for 'default' variant of command. (show_ip_ospf_interface_sub) Update to take global default into account when printing passive status. (ospf_config_write) ditto. * ospfd.c: (ospf_new) set global passive-interface default. * ospfd.h: (struct ospf) Add field for global passive-interface.
2006-08-27[ospfd] redistribute default no longer works after complete reconfig, fixPaul Jakma
2006-08-27 J.J. Krabbendam <jkrabbendam@aimsys.nl> * ospfd.c: (ospf_finish_final) default redistribute should be unset too, fixes bug where reconfiguring ospfd completely can no longer enable default redistribution.
2006-08-27[ospfd] Bug #134, ospfd should be more robust to backward time changePaul Jakma
2006-08-25 Paul Jakma <paul.jakma@sun.com> * (general) Bug #134. Be more robust to backward time changes, use the newly added libzebra time functions. In most cases: recent_time -> recent_relative_time() gettimeofday -> quagga_gettime (QUAGGA_CLK_MONOTONIC, ..) time -> quagga_time. (ospf_make_md5_digest) time() call deliberately not changed. (ospf_external_lsa_refresh) remove useless gettimeofday, LSA tv_orig time was already set in ospf_lsa_new, called via ospf_external_lsa_new.
2006-07-27[ospfd] Bug #288: do not change router ID unless forced by manual configurationAndrew J. Schorr
2006-07-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * ospfd.c: (ospf_router_id_update) Fix and document the algorithm for selecting the router ID: if there is not a statically configured ID, then stick to the most recent value to avoid disruptive changes. This should fix bug #288.
2006-07-26[ospfd] Allow ospf_lsa_unlock to NULL out callers' LSA pointers upon freePaul Jakma
2006-07-26 Paul Jakma <paul.jakma@sun.com> * ospf_lsa.{c,h}: (ospf_lsa_unlock) Change to take a double pointer to the LSA to be 'unlocked', so that, if the LSA is freed, the callers pointer to the LSA can be NULLed out, allowing any further use of that pointer to provoke a crash sooner rather than later. * ospf_*.c: (general) Adjust callers of ospf_lsa_unlock to match previous. Try annotate 'locking' somewhat to show which 'locks' are protecting what LSA reference, if not obvious. * ospf_opaque.c: (ospf_opaque_lsa_install) Trivial: remove useless goto, replace with return. * ospf_packet.c: (ospf_make_ls_ack) Trivial: merge two list loops, the dual-loop predated the delete-safe list-loop macro.
2006-05-12[ospfd] Squash another ospf_lookup callPaul Jakma
2006-05-11 Paul Jakma <paul.jakma@sun.com> * ospf_lsa.c: (ospf_default_originate_timer) Let the thread take (struct ospf *) as thread argument, rather than (struct ospf *)->default_originate, thus avoiding having to call ospf_lookup. * ospf_zebra.c: (ospf_redistribute_default_set) change setup of ospf_default_originate_timer thread to match. * ospfd.c: (ospf_router_id_update) ditto.
2006-01-11[ospfd] Bug #234. Fix nbr_self reinitialisation after down/up.paul
2006-01-10 Len Sorensen <lennartsorensen@ruggedcom.com> * (general) Bug #234, see also [quagga-dev 3902]. Fix problem with nbr_self not being properly reinitialised when an interface comes up, after having been down. Some re-arrangement done by Paul Jakma, any bugs introduced on top of Len's suggested changes are his. * ospf_neighbor.c: (ospf_nbr_add_self) centralise initialisation of nbr_self parameters here. * ospf_interface.c: (ospf_if_new) deleting initialisation of parameters of nbr_self, just rely on call to ospf_nbr_add_self. (ospf_if_cleanup) ditto. * ospfd.c: (ospf_network_run) ditto.
2006-01-10[ospfd] fix automatic router-id and network enable bug.paul
2006-01-10 Paul Jakma <paul.jakma@sun.com> * ospfd.c: (ospf_network_run) checking to see if router-id is set should be on ospf->router_id, not router_id_static. This was causing ospfd to not start if router-id had not been configured statically. (ospf_if_update) ditto.
2005-11-26[ospfd] rename graceful to deferred, fix a tiny compile warning.paul
2005-11-26 Paul Jakma <paul.jakma@sun.com> * (general) s/graceful/deferred/ in all files, the former term is confusing wrt OSPF Graceful-Restart. * ospfd.c: (ospf_deferred_shutdown_check) dont return a function which returns void. SOS complains about this. (ospf_finish)
2005-11-202005-11-20 Paul Jakma <paul.jakma@sun.com>paul
* ospfd.h: remove the OSPF_ROUTER_ID_UPDATE_DELAY define (struct ospf) remove the router_id timer thread. remove export of ospf_router_id_update_timer. * ospfd.c: (ospf_router_id_update) call ospf_if_update to poke interfaces into action after ID has been configured. (ospf_router_id_update_timer) removed. (ospf_finish_final) t_router_id_update timer is gone. (ospf_network_run) router-id update timer gone. call ospf_router_id_update directly if ID not configured. In the per-iface loop, don't ospf_if_up interfaces if ID is still not configured. The update function will call ospf_if_update anyway. (ospf_if_update) ID update timer is gone. Just return if no ID is set. * ospf_vty.c: (ospf_router_id) call ospf_router_id_update, no timer needed. * ospf_zebra.c: (ospf_router_id_update_zebra) call ospf_router_id_update directly, not via timer.
2005-11-14[ospfd] misc small fixes. Fix default stub router setting. no opaque compile.paul
2005-11-14 Paul Jakma <paul.jakma@sun.com> * ospfd.c: (ospf_new) stub-shutdown should just default to unconfigured, too strange otherwise. (ospf_finish_final) t_opaque_lsa_self TIMER_OFF should be preprocessor conditional on HAVE_OPAQUE_LSA. * ospfd.h: (struct ospf) remove the SHUTDOWN_DEFAULT define. no longer used, plus it wasn't in range that the command accepted. * ospf_zebra.h: Depends on vty.h, include it.
2005-10-292005-10-29 Paul Jakma <paul.jakma@sun.com>paul
* (general) RFC3137 stub-router support * ospfd.h: Add OSPF_OUTPUT_COST_INFINITE define. (struct ospf_master) Add a OSPF_MASTER_SHUTDOWN flag for options, to allow shutdown to distinguish between complete shutdown and shutdown of a subset of ospf instances. (struct ospf) Add stub_router_{startup,shutdown_}time, configuration of startup and shutdown time for stub-router. Add t_graceful_shutdown struct thread, timer for graceful shutdown, if needed. (struct ospf_area) Add stub_router_state - run time state of stub-router for an area. Add flags for ADMIN, IS and WAS states. Add t_stub_router, timer thread to resend router-lsa for an area. * ospf_lsa.c: (ospf_link_cost) new simple function to spit out either the given lnks cost or infinite cost if stub-router is in effect. (lsa_link_{ptop,broadcast,virtuallink,ptomp}_set) use previous function for transit-links. (ospf_stub_router_timer) timer thread for end of startup stub router. Change state as required for the area and setup re-origination of router-lsa. (ospf_stub_router_check) Check/do whether stub-router should be enabled, and whether it requires timer to be setup. (ospf_router_lsa_new) call previous function at top. (ospf_router_lsa_originate) no external callers, made static. * ospf_lsa.h: (ospf_router_lsa_originate) removed. * ospf_main.c: (sigint) make static. remove call to exit, as ospf_terminate now deals with exiting. * ospf_route.c: (ospf_terminate) removed, now in ospfd.c. * ospf_vty.c: (show_ip_ospf_area) print out state of stub-router, if active. (show_ip_ospf) print out configuration of stub-router support, and details of graceful-shutdown if the timer is active. ((no)?ospf_max_metric_router_lsa_{admin,startup,shutdown}) new commands to (de-)?configure stub-router support. (config_write_stub_router) write out config of stub-router. (ospf_config_write) call previous. (ospf_vty_init) install the new stub-router commands. * ospfd.c: various functions made static. (ospf_new) Set defaults for stub-router. Graceful shutdown is made to default on, just to be adventerous. (ospf_graceful_shutdown_finish) new function, final part of shutdown. (ospf_graceful_shutdown_timer) timer thread wrapper for graceful-shutdown. (ospf_graceful_shutdown_check) check whether to setup timer for shutdown or proceed directly to final shutdown. (ospf_terminate) moved here from ospf_route.c, call ospf_finish for each instance. (ospf_finish) renamed to ospf_finish_final and made static. (ospf_finish) new function, exported wrapper around ospf_graceful_shutdown_check. (ospf_finish_final) complete shutdown of an instance. Add missing TIMER_OFF's of two timer threads. (ospf_area_free) opaque self lsa timer should be turned off.
2005-10-212005-10-21 Paul Jakma <paul.jakma@sun.com>paul
* (general) SPF millisecond resolution timer with adaptive, linear back-off holdtime. Prettification of ospf_timer_dump. * ospf_dump.c: (ospf_timeval_dump) new function. The guts of ospf_timer_dump, but made to be more dynamic in printing out the relative timeval, sliding the precision printed out according to the value. (ospf_timer_dump) guts moved to ospf_timeval_dump. * ospf_dump.h: export ospf_timeval_dump. * ospf_flood.c: (ospf_flood) remove gettimeofday, use the libzebra exported recent_time instead, as it's not terribly critical to have time exactly right - the dropped LSA will be retransmited to us if we don't ACK it. * ospf_packet.c: (ospf_ls_upd_timer) Ditto, but here we're not transmitting, just putting LSA back on update transmit list. * ospfd.h: delay and holdtimes should be unsigned. Add spf_max_holdtime and spf_hold_multiplier. Update default defines for delay and hold time to be in msec. (struct ospf) change the SPF timestamp to a struct timeval. Remove ospf_timers_spf_(un)?set. * ospfd.c: (ospf_timers_spf_{set,unset}) removed. (ospf_new) initialise spf_max_holdtime and spf_hold_multiplier * ospf_spf.c: (ospf_spf_calculate) SPF timestamp is a timeval now, update with gettimeofday. (ospf_spf_calculate_schedule) Change SPF timers to millisecond resolution. Make the holdtime be adaptive, with a linear increase in holdtime ever consecutive SPF run which occurs within holdtime of previous SPF, bounded by spf_max_holdtime. * ospf_vty.c: Update spf timers commands. (ospf_timers_spf_set) trivial helper. (ospf_timers_throttle_spf_cmd) new command to set SPF delay, initial hold and max hold times with millisecond resolution. (ospf_timers_spf_cmd) Deprecated. Accept the old values, convert to msec, truncate to new limits. (no_ospf_timers_throttle_spf_cmd) set timers to defaults. (no_ospf_timers_spf_cmd) deprecated form, same as previous. (show_ip_ospf_cmd) Display SPF parameters and times. (show_ip_ospf_neighbour_header) Centralise the 'sh ip os ne' header. (show_ip_ospf_neighbor_sub) Fix the field widths. Get rid of the multiple spaces which were making the lines even longer. (show_ip_ospf_neighbor_cmd) Use show_ip_ospf_neighbour_header (show_ip_ospf_neighbor_all_cmd) ditto and fix the field widths for NBMA neighbours. (show_ip_ospf_neighbor_int) Use header function. (show_ip_ospf_nbr_nbma_detail_sub) use sizeof for timebuf, local array - safer. (show_ip_ospf_neighbor_detail_sub) ditto (ospf_vty_init) install the new SPF throttle timer commands.
2005-09-192005-09-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* ospf_lsa.h: (ospf_external_lsa_flush) Comment out the 5th argument (nexthop) since it is not used in the function (except inside some commented-out code). * ospf_lsa.c: (ospf_external_lsa_flush,ospf_external_lsa_refresh) Comment out the 5th argument to ospf_external_lsa_flush. * ospf_asbr.c: (ospf_redistribute_withdraw) Comment out 5th arg to ospf_external_lsa_flush. * ospf_vty.c: (no_ospf_default_information_originate) Eliminate 5th uninitialized nexthop arg to ospf_external_lsa_flush. * ospf_zebra.c: (ospf_zebra_read_ipv4) Comment out 5th arg to ospf_external_lsa_flush. * ospfd.c: (ospf_network_set) Comment out 5th arg to ospf_external_lsa_flush.
2005-07-122005-07-12 Paul Jakma <paul.jakma@sun.com>paul
* ospfd.h: add OSPF_ABR_DEFAULT for convenience, make OSPF_ABR_CISCO be the default ABR type. * ospfd.c: (ospf_new) initialise abr_type to OSPF_ABR_DEFAULT * ospf_vty.c: (no_ospf_abr_type_cmd) add standard as a negatable abr_type. default abr_type should be OSPF_ABR_DEFAULT. (ospf_config_write) test whether default abr_type against OSPF_ABR_DEFAULT, rather than any specific ABR_TYPE.
2005-05-062005-05-06 Paul Jakma <paul.jakma@sun.com>paul
* (general) extern and static qualifiers added. unspecified arguments in definitions fixed, typically they should be 'void'. function casts added for callbacks. Guards added to headers which lacked them. Proper headers included rather than relying on incomplete definitions. gcc noreturn function attribute where appropriate. * ospf_opaque.c: remove the private definition of ospf_lsa's ospf_lsa_refresh_delay. * ospf_lsa.h: export ospf_lsa_refresh_delay * ospf_packet.c: (ospf_make_md5_digest) make *auth_key const, correct thing to do - removes need for the casts later. * ospf_vty.c: Use vty.h's VTY_GET_INTEGER rather than ospf_vty's home-brewed versions, shuts up several warnings. * ospf_vty.h: remove VTY_GET_UINT32. VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX moved to lib/vty.h. * ospf_zebra.c: (ospf_distribute_list_update_timer) hacky overloading of the THREAD_ARG pointer should at least use uintptr_t.
2005-04-072005-04-07 Paul Jakma <paul.jakma@sun.com>paul
* (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-232005-02-23 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* ospfd.h: Add new field struct stream *ibuf to struct ospf. * ospfd.c: (ospf_new) Check return code from ospf_sock_init. Allocate ibuf using stream_new(OSPF_MAX_PACKET_SIZE+1). (ospf_finish) Call stream_free(ospf->ibuf. * ospf_packet.c: (ospf_read) Call stream_reset(ospf->ibuf) and then pass it to ospf_recv_packet for use in receiving the packet (instead of allocating a new stream for each packet received). Eliminate all calls to stream_free(ibuf). (ospf_recv_packet) The struct stream *ibuf is now passed in as an argument. No need to use recvfrom to peek at the packet header (to see how big it is), just use ospf->ibuf which is always large enough (this eliminates a system call to recvfrom). Therefore, no need to allocate a stream just for this packet, and no need to free it when done.
2004-12-082004-12-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* *.c: Change level of debug messages to LOG_DEBUG.
2004-11-042004-11-04 Paul Jakma <paul@dishone.st>paul
* ospfd.c: (ospf_network_match_iface) revert to previous network statement match behaviour.
2004-10-19OK. Here it is - PtP patch from Andrew J. Schorr. No problems with ospfd,hasso
ripd might need some more testing though.
2004-10-112004-10-11 Paul Jakma <paul@dishone.st>paul
* (global) Const char update and signed/unsigned fixes. * (various headers) size defines should be unsigned. * ospf_interface.h: remove duplicated defines, include the authoritative header - though, these defines should probably be moved to a dedicated header, or ospfd.h. * ospf_lsa.h: (struct lsa) ls_seqnum should be unsigned. * ospf_packet.c: (ospf_write) cast result of shift to unsigned.
2004-10-03Common router id.hasso
2004-09-23Remove usage of evil list and listnode typedefs.hasso
2004-06-20Remove ifdef's HAVE_NSSA. NSSA support is stable enough.hasso
2004-05-10* Make updating redistributions work if prefix list is changed and it'shasso
used in route-map used to filter redistributions. * Move ospf_prefix_list_update() function from ospfd.c to ospf_zebra.c.
2004-04-20Some ospfd fixes - [quagga-dev 1032], [quagga-dev 1048], [quagga-dev 1058].hasso
2003-12-05 * ospfd.c (ospf_network_match_iface): Rewrite code for claritygdt
while trying not to change semantics. Add ifdefed-out code to avoid matching ppp interfaces whose destination address does not also match the prefix under consideration, to help out people with problems due to as-yet-unfixed bugs with p2p interfaces coming and going.
2003-10-272003-10-27 Simon <lists@routemeister.net>paul
* ospfd/ospfd.c: if_is_pointopoint() takes (struct interface *), was being called with struct connected. Change to co->ifp.
2003-10-272003-10-27 kamatchi soundaram <kamatchi@tdd.sj.nec.com>paul
* ospfd/ospfd.c: Do not increment act_int for an area, as it is done by ospf_ism.c::ism_change_state() - results in incorrect figure for active interfaces in an area.
2003-09-292003-09-29 Paul Jakma <paul@dishone.st>paul
* zebra/connected.c: revert the 'generic PtP' patch as it causes far too many problems. People who use FreeSWAN should investigate native linux ipsec. * zebra/rt_netlink.c: ditto * lib/if.c: ditto * ripd/ripd.h: ditto * ripd/ripd.c: ditto * ripd/rip_interface.c: ditto * ospfd/ospfd.c: ditto * ospfd/ospf_snmp.c: ditto * bgpd/bgp_nexthop.c: ditto
2003-08-272003-08-27 Jay Fenlason <fenlason@redhat.com>paul
* bgpd/bgp_routemap.c: attr->med is type u_in32_t, should be compared with UINT32_MAX * ospfd/ospfd.c: remove redundant assert * zebra/rtadv.c: add missing include for zebra/rib.h
2003-07-122003-07-12 Paul Jakma <paul@dishone.st>paul
* (global): Add/fixup NSSA ABR translation functionality * ospfd.h: Adjust the NSSA ROLE defines. Rename STATE to TRANSLATE. Rename the LSA_NSSA_GET define to LSA_OPTIONS_NSSA_GET. * ospfd.c: Adjust to match changes to ospfd.h * ospf_te.c: Adjust to match change to LSA_NSSA_GET. * ospf_lsa.h: slights reformatting. Add new NSSA functions, ospf_translated_nssa_compare() (not currently used), ospf_translated_nssa_refresh() and ospf_translated_nssa_originate(). * ospf_lsa.c: Implemented aforementioned new functions. Fix up several NSSA hooks to /not/ be called for Type-5s which are translated. Add additional hooks. Set the ROUTER_LSA_NT bit in router-lsa flags if ABR does translation. New function, ospf_lsa_translated_nssa_new() implemented. Dont register translated LSAs for refreshing - instead we implicitly rely on the ASBR refreshing the Type-7, and refresh the translated Type-5 at the same time. Some minor reformatting. Extra debug info added. Also, existing debug statements modified to report LSA Id. * ospf_flood.c: call ospf_translated_nssa_refresh() when refreshing Type-7. minor reformatting. * ospf_dump.c: Dump NSSA LSAs. * ospf_asbr.h: slight reformatting. Export ospf_external_route_lookup() (though, not used. probably will undo this). * ospf_abr.c: Slight reformatting in many places. Update to match ospfd.h changes. (ospf_abr_translate_nssa): make it work, using the new ospf_lsa translation functions. (Several places): change struct prefix * to struct prefix_ipv4 *. (might as well do the casts at higher levels). Add more debug info. (ospf_abr_announce_stub_defaults): announce default to NSSA areas too. (ospf_abr_announce_nssa_defaults): do nothing. this function probably should die. (see ospf_abr_announce_stub_defaults). (ospf_abr_task_timer): run NSSA tasks.
2003-06-222003-06-19 Paul Jakma <paul@dishone.st>paul
* ospfd.c (ospf_area_nssa_set): Set defaults for NSSA Role, State and Stability Interval and no_summary. (ospf_area_nssa_translator_role_(un?)set): Update to NSSATranslatorRole
2003-06-042003-06-04 Paul Jakma <paul@dishone.st>paul
* Merge of zebra privileges
2003-04-19From: Hasso Tepper <hasso@estpak.ee>paul
Subject: [zebra 17365] [PATCH] Ospf area id's DECIMAL -> ADDRESS It was annoying for me to view area id's like 335544330 (20.0.0.10 in address format) in configuration. Most of other network devices are using address-like id's and so does zebra when using "show ip ospf *" commands. You can still enter id's in decimal format, but they are just shown in address format.
2003-04-07Indentation fixpaul