summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_interface.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ospfd: Support use of ospf with DMVPNAmol Lad2021-04-051-0/+6
| | | | Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
* ospfd: fix counting of "ip ospf area" commandsIgor Ryzhov2021-03-301-0/+2
| | | | | | | | | | Instead of trying to maintain if_ospf_cli_count, let's directly count the number of configured interfaces when it is needed. Current approach sometimes leads to an incorrect counter. Fixes #8321. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* ospfd: fix checkpatch warningsRafael Zalamena2021-03-231-1/+1
| | | | Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* ospfd: rework BFD integrationRafael Zalamena2021-03-231-2/+11
| | | | | | Use new BFD API to integrate with OSPFv2. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
* *: require semicolon after DEFINE_QOBJ & co.David Lamparter2021-03-171-2/+2
| | | | | | Again, see previous commits. Signed-off-by: David Lamparter <equinox@diac24.net>
* *: require semicolon after DEFINE_HOOK & co.David Lamparter2021-03-171-4/+4
| | | | | | See previous commit. Signed-off-by: David Lamparter <equinox@diac24.net>
* ospfd : Fix for ospf dead interval and hello due.Kaushik2020-09-191-0/+1
| | | | | | | | | 1. Ospf dead-interval will be set as 4 times of hello-interval, incase if it is not set by using "ip ospf dead-interval <dead-val>". 2. On resetting hello-interval using "no ip ospf hello-interval" the dead interval and hello due will be changed accordingly. Signed-off-by: Kaushik <kaushik@niralnetworks.com>
* ospfd: ldp-igp-sync feature: adding ospf supportlynne2020-09-091-0/+3
| | | | | Signed-off-by: Lynne Morrison <lynne@voltanet.io> Signed-off-by: Karen Schoener <karen@voltanet.io>
* eigrpd, ospfd, pimd: Fix assumption that interface may not be upDonald Sharp2019-12-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit: ddbf3e60604019d4b38d51226700e2244cc531b6 This commit modified the interface up handling code in ZAPI such that the zclient handled the decoding for you. Prior to this commit ospf assumed that it could use the old ifp pointer to know state before reading the stream. This lead to a situation where ospf would `smartly` track and do the right thing in this situation. This commit changed this assumption and in certain scenarios, say a interface was changed after it was already up would lead to situations where ospf would not properly handle the new interface up. Modify ospf to track data that is important to it in it's interface->info pointer. This code pattern was followed in both eigrp and pim. In eigrp's case it was just behaving weirdly in any event so fixing this pattern is not a big deal. In pim's case it was not properly using this so it's a no-op to fix. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Convert zapi->interface_delete to ifp callbackDonald Sharp2019-09-191-0/+2
| | | | | | | Convert the callback of the interface_delete to the new ifp callback. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Switch all zclient->interface_add to interface create callbackDonald Sharp2019-09-191-0/+3
| | | | | | | Switch the zclient->interface_add functionality to have everyone use the interface create callback in lib/if.c Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospfd: Cleanup oi->obuf to always be createdDonald Sharp2019-08-301-1/+0
| | | | | | | | | | | | This looks like a finish up of the partial cleanup that ocurred at some point in time in the past. When we alloc oi also always alloc the oi->obuf. When we delete oi always delete the oi->obuf right before. This cleans up a bunch of code to be simpler and hopefully easier to follow. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospfd: do not remove area structure, while vls are configuredPhilippe Guibert2018-10-251-0/+1
| | | | | | | | when adding/removing virtual links per interface, sometimes, the ospf virtual link can not be removed, whereas the associated area is already removed. Do not remove the area while a virtual link is yet configured. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
* *: use C99 standard fixed-width integer typesQuentin Young2018-03-271-41/+43
| | | | | | | | | | | | | | | | | | | | | | The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: conform with COMMUNITY.md formatting rules, via 'make indent'Lou Berger2018-03-061-2/+0
| | | | Signed-off-by: Lou Berger <lberger@labn.net>
* ospfd: show ip ospf neighbor json output formatChirag Shah2018-01-211-1/+1
| | | | | | | | | | | | | | | Current json output does not differentiate start of neighbor ip object. Adding "neighbors" keyword at the beginning of neighbor list. This is useful when displaying vrf level output along with neighbors list. Ticket:CM-19097 Testing Done: show ip ospf neighbor json show ip ospf vrf all neighbor json Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
* ospfd: remember area-id format for ifacesQuentin Young2017-08-161-0/+2
| | | | | | | Display dotted quad or decimal back in the config depending on what the user enters. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-231/+232
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: Bring in some OSPF useful changes that were lost during Quagga forkJafar Al-Gharaibeh2017-06-291-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several changes were made from the original patch to resolve conflicts and also to fix various issues that were discovered during testing. Below is the original commit message minus a few parts that correspond to code that was dropped during bug fixing. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com> ospfd: Extend 'ip ospf area' to take address argument + rationalise ospf enable * ospfd.c: (general) Clean up the whole running of OSPF on interfaces. (add_ospf_interface) taking (struct interface *) arg is pointless here. (ospf_is_ready) new helper. (ospf_network_run_subnet) Put all the code for choosing whether to enable OSPF on a subnet, and if so which area configuration to use, here. If a subnet should not be enabled, ensure an existing oi is freed. (ospf_network_run_interface) Just call run_subnet for all subnets on an interface. (ospf_network_run) Just call run_interface for all interfaces. (ospf_if_update) Just call run_interface for the given interface. (ospf_network_unset) Just call run_subnet for existing ois. (ospf_update_interface_area) helper: update area on an oi, or create it. (ospf_interface_set) renamed to ospf_interface_area_set for clarity. Ensures OSPF is created, then into if_update. (ospf_interface_unset) renamed to ospf_interface_area_unset and collapses down to simple loop to call run_subnet for all ois. * ospf_interface.h: add a more general OSPF_IF_PARAM_IS_SET, which does the right thing and takes default config into account. * doc/ospfd.texi: add 'ip ospf area' command. Acked-by: Donald Sharp <sharpd@cumulusnetworks.com> This patch has been part of Quagga since October 2015 Orignial Author: Paul Jakma <paul@quagga.net> Date: Thu Aug 27 16:51:42 2009 +0100
* Merge remote-tracking branch 'origin/stable/3.0'Donald Sharp2017-05-241-6/+6
|\
| * ospfd: remember format for ospf area idQuentin Young2017-05-191-6/+6
| | | | | | | | | | | | | | If the user enters a decimal, display a decimal. If the user enters a dotted quad, display a dotted quad. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | *: make consistent & update GPLv2 file headersDavid Lamparter2017-05-151-5/+4
|/ | | | | | | | | | | The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: use hooks for sending SNMP trapsDavid Lamparter2017-03-251-0/+4
| | | | | | | This means there are no ties into the SNMP code anymore other than the init call at startup. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd, ospf6d: add qobj registrationsDavid Lamparter2016-12-091-0/+4
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: Impl. per interface 'ip ospf area' commandJoakim Tjernlund2016-08-181-0/+2
| | | | | | | | | | | | | | | | | | Use with interface command: interface ppp0 ip ospf area 0.0.0.0 This will enable OSPF on ppp0 with area 0.0.0.0 Remove with "no ip ospf area" * ospf_vty.c: add "ip ospf area (A.B.C.D|<0-4294967295>)" interface command * ospfd.c: (ospf_interface_{un,}set) new helper function to enable/disable OSPF on a specific interface. (ospf_if_update) 2 possible paths now to deal with interface updates. Acked-by: Donald Sharp <sharpd@cumulusnetworks.com> [DL: this restores the tree to deccaf9...]
* Revert "per-interface ospf enable and area set command."David Lamparter2016-08-181-2/+0
| | | | | | | | | | | | This reverts commit e723861da171fd811f499665e5432dce4e364ee6. The code is from Joakim Tjernlund; this is just to fix the history (and attribution) of it. The last commit will restore the exact same tree state. THIS COMMIT WILL PROBABLY NOT COMPILE. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: Remove HAVE_OPAQUE_LSADonald Sharp2016-08-161-4/+0
| | | | | | | | | HAVE_OPAQUE_LSA is used by default and you have to actively turn it off except that OPAQUE_LSA is an industry standard and used pretty much everywhere. There is no need to have special #defines for this anymore. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> (cherry picked from commit 36fef5708d074a3ef41f34d324c309c45bae119b)
* Fixup of a few missed warnings after --enable-werror turned onDonald Sharp2015-07-261-1/+1
| | | | | | Ticket: Trivial Reviewed by: Trivial Testing: Compilation
* This patch changes ospfd from only listening mode for BFD status updates to ↵Donald Sharp2015-07-221-1/+3
| | | | | | | | | | | | | | | | | | interactive mode of dynamically registering/deregistering neighbors discovered on BFD enabled interfaces with PTM/BFD through zebra. Neighbor is registered with BFD when 2-way adjacency is established and deregistered when adjacency goes down if the BFD is enabled on the interface through which the neighbor was discovered. OSPF BFD command enhancement to configure BFD parameters (detect multiplier, min rx and min tx). interface <if-name> ip ospf bfd <detect mult> <min rx> <min tx> This patch also adds BFD support for IPv6 OSPF. ospf6d will dynamically register/deregister IPv6 neighbors with BFD for monitoring the connectivity of the neighbor. Neighbor is registered with BFD when 2-way adjacency is established and deregistered when adjacency goes down if the BFD is enabled on the interface through which the neighbor was discovered. OSPF6 BFD command added to configure BFD and parameters (detect multiplier, min rx and min tx). interface <if-name> ipv6 ospf6 bfd <detect mult> <min rx> <min tx> Signed-off-by: Radhika Mahankali <radhika@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Kanna Rajagopal <kanna@cumulusnetworks.com>
* per-interface ospf enable and area set command.Donald Sharp2015-05-201-0/+2
|
* This patch adds support for a new BFD session down message from zebra toDonald Sharp2015-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | protocols. BGP and OSPF are integrated to respond this BFD session down message originated in Zebra via ptmd. BGP and OSPF now have a bfd command, which tells OSPF/BGP to respond to the BFD session down message. OSPF: interface <> ip ospf bfd BGP: router bgp <> neighbor <> bfd Please note that these commands don't enable BFD as a protocol. BFD configuration and paramter tuning are via BFD applicable UI. Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com> Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
* ospf6d: add p2p interface supportDinesh Dutt2013-11-081-8/+0
| | | | | | | | Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Signed-off-by: Ayan Banerjee <ayabaner at gmail.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com> Reviewed-by: James Li <jli at cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: Optimize and improve SPF nexthop calculationJoakim Tjernlund2012-07-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain router LSA positions in OSPF interface. Find the OSPF interface in nexthop_calculation using the position in the router LSA. This is possible because the only time nexthop_calculation needs to look up interfaces is when dealing with its own Router LSA. This has the following advantages: - Multiple PtP interfaces with the same IP address between two routers. - Use Unnumbered PtP on just one end of the link. - Faster OI lookup for the OSPF interface and only done once for PtoP links. *ospf_interface.h: (struct ospf_interface) Add storage for storing router LSA position. *ospf_interface.c: (ospf_if_lookup_by_lsa_pos) lookup OSPF I/F in an area using LSA position. *ospf_lsa.c: (router_lsa_link_set) record Router LSA position. *ospf_spf.c: (ospf_spf_next) Count and pass along lsa position. (ospf_nexthop_calculation) Add lsa position argument. call ospf_if_lookup_by_lsa_pos() for OSFP interface handle. Clean up and remove all calls ospf_if_is_configured() the rest. Adjust a few debug logs. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospfd: Unify router and network LSA refresh logic with general refresherPaul Jakma2010-12-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | * (general) Get rid of the router and network LSA specific refresh timers and make the general refresher do this instead. Get rid of the twiddling of timers for router/network LSA that was spread across the code. This lays the foundations for future, general LSA refresh improvements, such as making sequence rollover work, and having generic LSA delays. * ospfd.h: (struct ospf) Bye bye to the router-lsa update timer thread pointer. (struct ospf_area) and to the router-lsa refresh timer. * ospf_interface.h: Remove the network_lsa_self timer thread pointer * ospf_lsa.h: (struct ospf_lsa) oi field should always be there, for benefit of type-2/network LSA processing. (ospf_{router,network}_lsa_{update_timer,timer_add}) no timers for these more (ospf_{router,network}_lsa_update) more generic functions to indicate that some router/network LSAs need updating (ospf_router_lsa_update_area) update router lsa in a particular area alone. (ospf_{summary,summary_asbr,network}_lsa_refresh) replaced by the general ospf_lsa_refresh function. (ospf_lsa_refresh) general LSA refresh function
* ospfd: Remember network LSA sequence numbers across up/downs of an interfacePaul Jakma2010-12-081-0/+4
| | | | | | | | | | | | * ospf_interface.h: (struct ospf_if_params) add field for saved network LSA seqnum * ospf_interfa.c: (ospf_new_if_params) init network_lsa_seqnum field to initial seqnum - doesnt matter though. * ospf_lsa.c: (ospf_network_lsa_new) check for any saved sequence number, and use if it exists. Save the result back. This should help avoid needless round of LSUpdate/LSRequests when a neighbour has to tell the originator "uhm, i have something newer than that already". * ospf_vty.c: (show_ip_ospf_interface_sub) Show the saved network LSA seqnum
* ospfd: Make ospf_if_lookup_recv_if() find the right unnumbered i/fJoakim Tjernlund2009-07-281-1/+2
| | | | | | | | | | | | | | | This function will return the interface for the first matching remote address for PtP i/f's. That won't work for multiple unnumbered i/f's as these may all have the same address. Pass in the struct interface pointer, ifp, to find the correct set of oi's to search in. This also reduces the size of the search list, making it faster. * ospfd/ospf_interface.c: Add struct interface * param to ospf_if_lookup_recv_if() to select the right list to search in. * ospfd/ospf_interface.h: ditto. * ospfd/ospf_packet.c: Pass new ifp argument to ospf_if_lookup_recv_if()
* ospfd: export ospf_if_table_lookup() and use it in ospf_network_run_interface()Joakim Tjernlund2009-07-281-0/+2
| | | | | | | | | | | 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.
* [ospfd] Add passive-interface default supportPaul Jakma2006-10-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* [ospfd] Fix multicast membership drop bugPaul Jakma2006-06-151-2/+22
| | | | | | | | | | | | | | | | | | 2006-06-15 Paul Jakma <paul.jakma@sun.com> * Reported by Milan Koci * ospf_interface.h: (struct ospf_if_info) Add reference counts for multicast group memberships. Add various macros to help manipulate/check membership state. * ospf_interface.c: (ospf_if_set_multicast) Maintain the ospf_if_info reference counts, and only actually drop memberships if it hits 0, to avoid losing membership when OSPF is disabled on an interface with multiple active OSPF interfaces. * ospf_packet.c: (ospf_{hello,read}) Use the new macros to check/set multicast membership. * ospf_vty.c: (show_ip_ospf_interface_sub) ditto.
* [ospfd] Fix SPF of virtual-linksPaul Jakma2006-05-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-04-24 Paul Jakma <paul.jakma@sun.com> * (general) More Virtual-link fixes, again with much help in testing / debug from Juergen Kammer. Primarily in SPF. * ospf_spf.h: Add guard. ospf_interface.h will include this header. * ospf_interface.h: Modify ospf_vl_lookup definition to take struct ospf as argument, so as to allow for NULL area argument. (struct ospf_vl_data) Remove out_oi, instead add a struct vertex_nexthop, to use as initial nexthop for backbone paths through a vlink. * ospf_interface.c: (ospf_vl_lookup) Modified to allow NULL area to be passed to indicate "any" (first) area. Add extra debug. (ospf_vl_set_params) vl_oi -> nexthop. Add extra debug. (ospf_vl_up_check) Fix debug, inet_ntoa returns a static buffer.. * ospf_route.c: (ospf_intra_add_router) Vlinks dont go through backbone, don't bother checking. * ospf_spf.c: (static struct list vertex_list) Record vertices that will need to be freed. (cmp) Order network before router vertices, as required, wasn't implemented. (vertex_nexthop_free) Mild additional robustness check. (vertex_parent_free) Take void argument, as this function is passed as list deconstructor for vertex parent list. (ospf_vertex_new) More debug. Set deconstructor for parent list. Track allocated vertices on the vertex_list. (ospf_vertex_free) Get rid of the tricky recursive cleanup of vertices. Now frees only the given vertex. (ospf_vertex_add_parent) Fix assert. (ospf_nexthop_calculation) Fix calculation of nexthop for VLink vertices, lookup the vl_data and use its previously recorded nexthop information. (ospf_spf_calculate) Vertices are freed simply by deleting vertex_list nodes and letting ospf_vertex_free as deconstructor work per-node. (ospf_spf_calculate_timer) Trivial optimisation, leave backbone SPF calculation till last to reduce SPF churn on VLink updates. * ospf_vty.c: (ospf_find_vl_data) update call to ospf_vl_lookup (no_ospf_area_vlink_cmd) ditto. (show_ip_ospf_interface_sub) For Vlinks, the peer address is more interesting than the output interface.
* 2005-10-21 Paul Jakma <paul.jakma@sun.com>paul2005-10-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * (general) OSPF fast, sub-second hello and 1s dead-interval support. A warning fix. Millisec support for ospf_timer_dump. Change auto-cost ref-bandwidth to add a comment to write out of config, rather than printing annoying messages to vty on startup. * ospf_dump.c: (ospf_timer_dump) Print out milliseconds too. Callers typically specify a length of 9, so most see millisecs unless they specify the additional length. * ospf_interface.h: (struct ospf_interface) new interface param, fast_hello. * ospf_interface.c: (ospf_if_table_lookup) add brackets, gcc warning fix. (ospf_new_if_params) Initialise fast_hello param. (ospf_free_if_params) Check whether fast_hello is configured. (ospf_if_new_hook) set fast_hello to default. * ospf_ism.h: Wrap OSPF_ISM_TIMER_ON inside do {} while (0) to prevent funny side-effects from its if statement when this macro is used conditionally by other macros. (OSPF_ISM_TIMER_MSEC_ON) new macro, set in milliseconds. (OSPF_HELLO_TIMER_ON) new macro to set hello timer according to whether fast_hello is set. * ospf_ism.c: Update all setting of the hello timer to use either OSPF_ISM_TIMER_MSEC_ON or OSPF_HELLO_TIMER_ON. The former is used when hello is to be sent immediately. * ospf_nsm.c: ditto * ospf_packet.c: (ospf_hello) hello-interval is not checked for mismatch if fast_hello is set. (ospf_read) Annoying nit, fix "no ospf_interface" to be debug rather than a warning, as it can be perfectly normal to receive packets when logical subnets are used. (ospf_make_hello) Set hello-interval to 0 if fast-hellos are configured. * ospf_vty.c: (ospf_auto_cost_reference_bandwidth) annoying nit, don't vty_out if this command is given, it gets tired quick. (show_ip_ospf_interface_sub) Print the hello-interval according to whether fast-hello is set or not. Print the extra 5 millisec characters from (ospf_timer_dump) if fast-hello is configured. (ospf_vty_dead_interval_set) new function, common to all forms of dead-interval command, to set dead-interval and fast-hello correctly. If a dead-interval is given, unset fast-hello, else if a hello-multiplier is set, set dead-interval to 1 and fast-hello to given multiplier. (ip_ospf_dead_interval_addr_cmd) use ospf_vty_dead_interval_set(). (ip_ospf_dead_interval_minimal_addr_cmd) ditto. (no_ip_ospf_dead_interval) Unset fast-hello. (no_ip_ospf_hello_interval) Bug-fix, unset of hello-interval should set it to OSPF_HELLO_INTERVAL_DEFAULT, not OSPF_ROUTER_DEAD_INTERVAL_DEFAULT. (config_write_interface) Write out fast-hello. (ospf_config_write) Write a comment about "auto-cost reference-bandwidth" having to be equal on all routers. Hopefully just as noticeable as old practice of writing to vty, but less annoying. (ospf_vty_if_init) install the two new dead-interval commands. * ospfd.h: Add defines for OSPF_ROUTER_DEAD_INTERVAL_MINIMAL and OSPF_FAST_HELLO_DEFAULT.
* 2005-09-29 Alain Ritoux <alain.ritoux@6wind.com>vincent2005-09-291-0/+3
| | | | | | | | | | | | | | | | * ospfd/ospf_vty.c: forece default route LSA to be re_issued whenever cost is changed ( [no] ip ospf area XXX default-cost YYY) Support ignore-mtu option * ospfd/ospfd.h: define OSPF_MTU_IGNORE_DEFAULT * ospfd/ospf_packet.c: support ignore-mtu option * ospfd/ospf_interface.h: field added for skipping MTU check * ospfd/ospf_interface.c: fix memory leak in ospf_crypt_key_delete() Set mtu_ignore field to default value * ospfd/ospf_abr.[ch]: export ospf_abr_announce_network_to_area() * ospfd/ospf_ism.h: add MACRO to convert internal ISM status into SNMP correct values * ospfd/ospf_snmp.c: add sanity check on LSA type in lsdb_lookup_next() convert OSPFIFSTATE internal status into SNMP values
* 2005-05-06 Paul Jakma <paul.jakma@sun.com>paul2005-05-061-52/+60
| | | | | | | | | | | | | | | | | | | | | | | * (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-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2005-04-031-1/+0
| | | | | | | * ospf_interface.h: (ospf_if_lookup_by_name) Remove declaration of a function that does not exist. * ospf6_interface.[ch]: (ospf6_interface_lookup_by_name) Remove unused function.
* 2005-03-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2005-03-291-0/+3
| | | | | | | | | | | | | | | * rt_netlink.c: (netlink_link_change) If the status of an operative interface changes (e.g. MTU changes), the client daemons should be notified by calling zebra_interface_up_update. Previously, the information was being updated in zebra's interface structure, but the clients were not notified of changes to an operative interface. * ospf_zebra.c: (ospf_interface_state_up) If the MTU of an operative interface changes, print a debug message and call ospf_if_reset() to simulate down/up on the interface. * ospf_interface.h: Declare new function ospf_if_reset(). * ospf_interface.c: (ospf_if_reset) New function to call ospf_if_down and ospf_if_up for all ospf interfaces attached to an interface.
* 2005-02-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2005-02-081-3/+3
| | | | | | * ospf_interface.h: Reduce structure padding by putting new u_char field multicast_memberships in a better spot (grouped with other u_char fields type and state).
* 2005-02-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2005-02-081-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ospf_interface.h: Improve passive_interface comment. Add new multicast_memberships bitmask to struct ospf_interface to track active multicast subscriptions. Declare new function ospf_if_set_multicast. * ospf_interface.c: (ospf_if_set_multicast) New function to configure multicast memberships properly based on the current multicast_memberships status and the current values of the ospf_interface state, type, and passive_interface status. (ospf_if_up) Remove call to ospf_if_add_allspfrouters (this is now handled by ism_change_state's call to ospf_if_set_multicast). (ospf_if_down) Remove call to ospf_if_drop_allspfrouters (now handled by ism_change_state). * ospf_ism.c: (ospf_dr_election) Remove logic to join or leave the DRouters multicast group (now handled by ism_change_state's call to ospf_if_set_multicast). (ism_change_state) Add call to ospf_if_set_multicast to change multicast memberships as necessary to reflect the new interface state. * ospf_packet.c: (ospf_hello) When a Hello packet is received on a passive interface: 1. Increase the severity of the error message from LOG_INFO to LOG_WARNING; 2. Add more information to the error message (packet destination address and interface address); and 3. If the packet was sent to ospf-all-routers, then try to fix the multicast group memberships. (ospf_read) When a packet is received on an interface whose state is ISM_Down, enhance the warning message to show the packet destination address, and try to update/fix the multicast group memberships if the packet was sent to a multicast address. When a packet is received for ospf-designated-routers, but the current interface state is not DR or BDR, then increase the severity level of the error message from LOG_INFO to LOG_WARNING, and try to fix the multicast group memberships. * ospf_vty.c: (ospf_passive_interface) Call ospf_if_set_multicast for any ospf interface that may have changed from active to passive. (no_ospf_passive_interface) Call ospf_if_set_multicast for any ospf interface that may have changed from passive to active. (show_ip_ospf_interface_sub) Show multicast group memberships.
* 2004-12-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-12-151-0/+2
| | | | | | | | | | * ospf_interface.h: Declare new function ospf_default_iftype. * ospf_interface.c: (ospf_default_iftype) New function to centralize this logic in one place. * ospf_zebra.c: (ospf_interface_add) Use new function ospf_default_iftype. * ospf_vty.c: (no_ip_ospf_network,config_write_interface) Fix logic by using new function ospf_default_iftype.
* 2004-10-11 Paul Jakma <paul@dishone.st>paul2004-10-111-2/+1
| | | | | | | | | | * (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-09-24 Paul Jakma <paul@dishone.st>paul2004-09-241-1/+1
| | | | | | | | | | | | | * ospf_apiserver.{c,h}: lists typedef removal cleanup. update some list loops to LIST_LOOP. some miscellaneous indent fixups. (ospf_apiserver_unregister_opaque_type) fix listnode_delete of referenced node in loop. * ospf_interface.h: lists typedef removal cleanup. * ospf_opaque.{c,h}: lists typedef removal cleanup. update some list loops to LIST_LOOP. miscellaneous style and indent fixups. * ospf_te.{c,h}: ditto * ospf_packet.c: lists typedef removal cleanup.