Age | Commit message (Collapse) | Author |
|
* ospf_packet.c: Change level of some warnings to
informational.
|
|
* ospf_apiserver.c: (apiserver_sync_callback) stray semi-colon
* ospf_packet.c: include checksum.h, remove the in_cksum extern
* prototypes.
* ospf_te.h: Add braces, quell warning.
|
|
* (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.
|
|
* ospf_apiserver.c: (ospf_apiserver_term) This function should
not have side-effects (eg segv) if no apiserver instances are
active, ie be robust.
|
|
* ospf_vty.c: (show_ip_ospf) fix display of SPF timer if it
has not yet been run.
|
|
* ospf_dump.c: (ospf_timeval_dump) fix ms adjustment, thanks to
Andrew Schorr.
* ospf_vty.c: (ospf_config_write) fix write out of spf timers
configuration.
|
|
* (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.
|
|
* (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.
|
|
* (general) SPF memory management cleanup and fix for rare
double-free bug.
* ospf_spf.h: (struct vertex_parent) New struct to hold parent
specific data, eg the backlink and the parent vertex pointer,
and point to the appropriate general struct vertex_nexthop.
(struct vertex_nexthop) remove parent vertex pointer, so
this struct can be shared across vertices.
(struct vertex) rename list child to list children. Remove
list of nexthops, replace with list of vertex_parents.
* ospf_spf.c: (update_stat) trivial, remove cast from void *.
(vertex_nexthop_new) remove init of parent - field is gone
from struct vertex_nexthop.
(ospf_canonical_nexthops_free) Remove the canonical
vertex_nexthop memory objects. These are the vertex_nexthops
attached to the first level of router vertices from the root.
(vertex_parent_new) new function, create a vertex_parent.
(vertex_parent_free) ditto, but free it.
(ospf_vertex_new) Update to match changes to struct vertex.
(ospf_vertex_free) Recursively free a struct vertex and its
children. The parent list is used as a reference count.
vertex_nexthops must be free seperately, if required.
(ospf_vertex_dump) update to match struct vertex changes.
Print out backlink of parents too.
(ospf_vertex_add_parent) ditto.
(ospf_lsa_has_link) update comment.
(ospf_nexthop_add_unique) removed, not needed anymore.
(ospf_nexthop_merge) ditto.
(ospf_spf_consider_nexthop) renamed to ospf_spf_add_parent.
Simplified to just create vertex_parent and add it.
(ospf_spf_flush_parents) new function, flush out the parent
list.
(ospf_nexthop_calculation) Take the relevant route_lsa_link
as an argument, which simplifies things and removes the need
for the hack in ospf_nexthop_add_unique - ospf_spf_next
already knew exactly which link the cost calculated was for.
Update to match struct vertex changes too.
(ospf_spf_next) Don't create a vertex for W unnecessarily, if
it's there's a vertex already created for W, use it, and
hence there's no need to free it either.
Update some manipulation/comparisons of distance to match.
Flush the parent list if a lower cost path is found.
(ospf_spf_route_free) unused, removed.
(ospf_spf_dump) match the struct vertex changes, and dump the
ifname if possible.
(ospf_spf_calculate) At end of SPF, free the canonical nexthops
and call ospf_vertex_free on the root vertex to free the
entire tree.
* ospf_interface.c: (ospf_vl_set_params) match struct vertex
changes.
* ospf_route.c: (ospf_intra_route_add) ditto
(ospf_route_copy_nexthops_from_vertex) ditto
* memtypes.c: (memory_list_ospf) Add MTYPE_OSPF_VERTEX_PARENT.
|
|
* ospf_api.c: sign warnings.
* ospf_apiserver.c: sign warning and convert all the struct
in_addr initialisations so as not to make assumptions about
how this struct is organised, initialise the s_addr member
explicitely.
* ospf_packet.c: Add const qualifier to auth_key.
|
|
* ospf_snmp.c: Avoid mixing interface and ospf_interface objects
which now allows snmpwalk to work with ospfIfTable and
also with ospfIfMetricTable
|
|
* zebra.h: Declare new functions zebra_route_string() and
zebra_route_char().
* log.c: (zroute_lookup,zebra_route_string,zebra_route_char) New
functions to map zebra route numbers to strings.
* zebra_vty.c: (route_type_str) Remove obsolete function: use new
library function zebra_route_string() instead. Note that there
are a few differences: for IPv6 routes, we now get "ripng" and
"ospf6" instead of the old behavior ("rip" and "ospf").
(route_type_char) Remove obsolete function: ues new library function
zebra_route_char() instead. Note that there is one difference:
the old function returned 'S' for a ZEBRA_ROUTE_SYSTEM route,
whereas the new one returns 'X'.
(vty_show_ip_route_detail,vty_show_ipv6_route_detail) Replace
route_type_str() with zebra_route_string().
(vty_show_ip_route,vty_show_ipv6_route) Replace route_type_char()
with zebra_route_char().
* bgp_vty.c: (bgp_config_write_redistribute) Use new library function
zebra_route_string instead of a local hard-coded table.
* ospf6_asbr.c: Remove local hard-coded tables zroute_name and
zroute_abname. Change the ZROUTE_NAME macro to use new library
function zebra_route_string(). Remove the ZROUTE_ABNAME macro.
(ospf6_asbr_external_route_show): Replace ZROUTE_ABNAME() with
a call to zebra_route_char(), and be sure to fix the format string,
since we now have a char instead of a char *.
* ospf6_zebra.c: Remove local hard-coded tables zebra_route_name and
zebra_route_abname. Note that the zebra_route_name[] table
contained mixed-case strings, whereas the zebra_route_string()
function returns lower-case strings.
(ospf6_zebra_read_ipv6): Change debug message to use new library
function zebra_route_string() instead of zebra_route_name[].
(show_zebra): Use new library function zebra_route_string() instead
of zebra_route_name[].
* ospf_dump.c: Remove local hard-coded table ospf_redistributed_proto.
(ospf_redist_string) New function implemented using new library
function zebra_route_string(). Note that there are a few differences
in the output that will result: the new function returns strings
that are lower-case, whereas the old table was mixed case. Also,
the old table mapped ZEBRA_ROUTE_OSPF6 to "OSPFv3", whereas the
new function returns "ospf6".
* ospfd.h: Remove extern struct message ospf_redistributed_proto[],
and add extern const char *ospf_redist_string(u_int route_type)
instead.
* ospf_asbr.c: (ospf_external_info_add) In two messages, use
ospf_redist_string instead of LOOKUP(ospf_redistributed_proto).
* ospf_vty.c: Remove local hard-coded table distribute_str.
(config_write_ospf_redistribute,config_write_ospf_distribute): Use
new library function zebra_route_string() instead of distribute_str[].
* ospf_zebra.c: (ospf_redistribute_set,ospf_redistribute_unset,
ospf_redistribute_default_set,ospf_redistribute_check)
In debug messages, use ospf_redist_string() instead of
LOOKUP(ospf_redistributed_proto).
* rip_zebra.c: (config_write_rip_redistribute): Remove local hard-coded
table str[]. Replace str[] with calls to new library function
zebra_route_string().
* ripd.c: Remove local hard-coded table route_info[].
(show_ip_rip) Replace uses of str[] with calls to new library
functions zebra_route_char and zebra_route_string.
* ripng_zebra.c: (ripng_redistribute_write) Remove local hard-coded
table str[]. Replace str[i] with new library function
zebra_route_string(i).
* ripngd.c: Remove local hard-coded table route_info[].
(show_ipv6_ripng) Use new library function zebra_route_char() instead
of table route_info[].
|
|
* ospf_dump.c, ospf_ia.c, ospf_spf.c, ospf_ase.c:
remove unused DEBUG
|
|
* lib/smux.[ch]: allow to retreive global OID (identified by <0
namelen).
* ospf_ism.c: generate SNMP traps on Interface state change
* ospf_nsm.c: generate SNMP traps on Neighbour state change
* ospf_snmp.[ch]: support for SNMP traps for interface and neighbours.
|
|
* configure.ac: Add the test for Solaris least-privileges. Set
defines for whether capabilities are supported and whether of
the linux or solaris variety.
Add missing-prototypes, missing-declarations, char-subscripts
and cast-qual warnings to default cflags, cause Hasso enjoys warnings,
and we really should clean the remaining ones up. (ie isisd..).
* (*/*main.c) Update the zebra_capabilities_t arrays in the various
daemons to match the changes made in lib/privs.h.
* zebra.h: Solaris capabilities requires priv.h to be included.
* privs.{c,h}: Add support for Solaris Least-Privileges.
privs.h: Reduce some of the abstract capabilities, which do
not have rough equivalents on both systems. Rename the net
related caps to _NET, as they should have been in first
place.
(zprivs_terminate) should take the zebra_privs_t as argument so
that it can update change pointer.
Add an additional privilege state, ZPRIVS_UNKNOWN.
* privs.c: (various capability functions) Add
Solaris privileges variants.
(zprivs_state) Use privs.c specific generic types to
represent various capability/privilege related types, so that
each can be typedef'd as appropriate on each platform.
(zprivs_null_state) static added, to hold the state the null
method should report (should be raised by default, and
LOWERED if zprivs_terminate has been called)
(zprivs_state_null) Report back the zprivs_null_state.
(cap_map) Make it able to map abstract capability to multiple
system capabilities.
(zcaps2sys) Map to abstract capabilities to multiple system
privileges/capabilities.
(zprivs_init) move capability related init to seperate
function, zprivs_caps_init.
(zprivs_terminate) ditto, moved to zprivs_caps_terminate.
Set the change_state callback to the NULL state, so the
user can continue to run and use the callbacks.
|
|
* Of course ISM_SNMP MACRO mist be defined
|
|
* 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
|
|
* lib/md5-gnu.h: removed
* lib/md5.h: replaces md5-gnu.h
* lib/Makefile.am: use correct md5.h
* lib/md5.c: import from WIDE
* ospfd/ospf_packet.c: use new md5 API
* ripd/ripd.c: use new md5 API
|
|
* 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.
|
|
* ospf_opaque.c:
(ospf_opaque_lsa_refresh_schedule,ospf_opaque_lsa_flush_schedule)
No need to call ospf_lookup(), just use lsa0->area->ospf instead.
|
|
Interface should be specified by name now.
[backport candidate]
|
|
print info about it.
Fixes bugzilla #213. [backport candidate]
|
|
dealing with routemaps. There is ospf->route_map[ZEBRA_ROUTE_MAX]
for default-information.
Fixes bugzilla #208.
[backport candidate]
|
|
* ospf_abr.c: (ospf_abr_announce_network_to_area) SET_FLAG
should be on lsa not old, which may be freed for one thing,
obviously.
|
|
* 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.
|
|
|
|
[backport candidate]
|
|
* ospf_spf.c: Try get more information on a SEGV under
ospf_spf_vertex_add_parent.
(ospf_vertex_free) NULL out the child and nexthop lists
(ospf_vertex_add_parent) nexthop and child can not be NULL
vertex_nexthop's parent->child list can not be NULL
(ospf_spf_next) w and cw are per-loop iteration variables, move
declarations into loop body.
|
|
changes - oi->ifp->status doesn't give to us info about ISM,
oi->state does.
[backport candidate]
|
|
* ospf_ism.c (ospf_elect_bdr/ospf_elect_dr): Fix DR election bug.
|
|
* ospf_abr.c: (ospf_abr_update_aggregate) Fix comment, cost bug itself
had been fixed long ago by Sowmini.
|
|
* ospf_interface.c: (ospf_if_table_lookup) Fix a serious bug
a less serious one.
1: this function is supposed to lookup
entries in the oifs ospf_interface route_table and return either
an existing oi or NULL to indicate not found, its caller depends
on this, yet this function uses route_node_get which /always/
returns a route_node - one is created if none exists. Use
route_node_lookup instead. This should fix root cause of the
reports of the (ospf_add_to_if) assert being hit.
2: oi's are inserted into this table with prefixlength set to
/32 (indeed, it should be a hash table, not a route_table),
however prefixlength to lookup was not changed, if no valid entry
can be inserted other than /32, then nothng but /32 should be
looked up. This possibly only worked by fluke..
Fix confirmed by 2 reporters (one list, one IRC), definitely a
backport candidate once it has been incubated in HEAD for a while.
Thanks to Patrick Friedel and Ivan Warren for testing.
|
|
* (general) Fix memory leaks in opaque AS-scope LSAs, reported and
with much debugging done by by scott collins <scollins@agile.tv>.
(possible backport candidate?)
* ospf_lsa.c: (ospf_discard_from_db) dont call
ospf_ase_unregister_external_lsa for opaque-lsa's, opaques are
never registered with ase in the first place.
* ospf_packet.c: (general) Disabuse opaque related code of its
tendency to try gather up things into temporary lists.
(ospf_ls_upd) remove the temporary lists opaque uses, call
opaque functions inline, just like all other types.
(ospf_ls_ack) ditto.
(ospf_recv_packet) fixup sign warning.
* ospf_opaque.c: (general) fix the unneeded use of lists, and
untwist some of the logic.
(ospf_opaque_self_originated_lsa_received) take a single LSA
as argument, not a list of them. Remove the list loop. Logic
otherwise unchanged.
(ospf_opaque_ls_ack_received) Mostly ditto. But untwist the logic,
move the actions up into the switch block, remove the goto's and
sanitise the logic near the end a bit.
* ospf_opaque.h: Adjust definitions of aforementioned functions
in ospf_opaque.c to match.
|
|
* configure.ac: Check for OSes which support passing ifindex in
struct ip_mreq.
* lib/sockopt.c: Add support for BSD style ifindex in ip_mreq.
* ospfd/ospf_network.c: Log ifindex on multicast membership leave/join
events.
|
|
* (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.
|
|
* ospf_abr.c: (ospf_abr_announce_network_to_area) dont forget
to approve LSAs for the case where metric has changed, lsa gets
flushed otherwise. (backport candidate).
|
|
Implement non-blocking zclient I/O with buffering.
* zclient.h (struct zclient): Add two fields to support non-blocking
I/O: struct buffer *wb, and struct thread *t_write.
(zclient_free): Remove function.
(zebra_redistribute_send): Change 2nd arg from socket fd to
struct zclient * (needed to support non-blocking I/O and buffering).
(zclient_send_message): New function to send an arbitrary
message with non-blocking I/O.
* zclient.c (zclient_new): Create write buffer.
(zclient_free): Remove unused function.
(zclient_stop): Must cancel new t_write thread. Also, reset
all buffers: ibuf, obuf, and wb.
(zclient_failed): New helper function for typical error handling.
(zclient_flush_data): New thread to flush queued data.
(zclient_send_message): New function to send the message in
zclient->obuf to zebra using non-blocking I/O and buffering.
(zebra_message_send, zapi_ipv4_route, zapi_ipv6_route): Use
new zclient_send_message function instead of calling writen.
(zclient_start): Set socket non-blocking. Also, change 2nd arg
to zebra_redistribute_send from zclient->sock to zclient.
(zebra_redistribute_send): Change 2nd arg to struct zclient *.
Can now use zclient->obuf to assemble the message instead of
allocating a temporary stream. And call zclient_send_message to
send the message instead of writen.
(zclient_read): Convert to support non-blocking I/O by using
stream_read_try instead of deprecated stream_read.
(zclient_redistribute): Change 2nd arg to zebra_redistribute_send
from zclient->sock to zclient.
* ospf6_zebra.c (ospf6_zebra_redistribute, ospf6_zebra_no_redistribute):
Change 2nd arg to zebra_redistribute_send from zclient->sock
to zclient.
* ospf_zebra.c (ospf_zebra_add): Call zclient_send_message instead
of writen.
* rip_zebra.c (rip_redistribute_set, rip_redistribute_unset,
rip_redistribute_clean): Change 2nd arg to zebra_redistribute_send
from zclient->sock to zclient.
* ripng_zebra.c (ripng_redistribute_unset, ripng_redistribute_clean):
Change 2nd arg to zebra_redistribute_send from zclient->sock
to zclient.
* bgp_zebra.c (bgp_redistribute_set, bgp_redistribute_unset):
The 2nd arg to zebra_redistribute_send is now zclient instead of
zclient->sock.
* isis_zebra.h (isis_zebra_finish): Remove declaration of unused
function.
* isis_zebra.c (isis_zebra_route_add_ipv4): Call zclient_send_message
to send the message to zebra instead of calling writen directly, since
zclient_send_message understands non-blocking I/O and will manage
the buffer queue appropriately.
(isis_zebra_finish): Remove unused function, particularly since
the zclient_free function has been removed.
|
|
* (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.
|
|
* 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.
|
|
* ospf_zebra.c: (zebra_interface_if_lookup) Must use
if_lookup_by_name_len.
|
|
* if.h: (if_lookup_by_name_len, if_get_by_name_len) New functions.
* if.c: (if_lookup_by_name_len, if_get_by_name_len) New functions.
(if_get_by_name) Tighten up code.
(interface) Use new function if_get_by_name_len.
* zclient.c: (zebra_interface_add_read) Use new if_get_by_name_len
function.
(zebra_interface_state_read) Use new if_lookup_by_name_len function.
* kernel_socket.c: (ifm_read) Use new if_lookup_by_name_len function
to save a memcpy.
* if_ioctl_solaris.c: (interface_list_ioctl) Fix subtle bug with new
if_get_by_name_len function.
* ospf_interface.c: (ospf_vl_new) Use strnlen to fix call to if_create.
|
|
Fix problems when netlink interfaces are renamed (same ifindex used
for a new interface). Start cleaning up some problems with the way
interface names are handled.
* interface.c: (if_new_intern_ifindex) Remove obsolete function.
(if_delete_update) After distributing the interface deletion message,
set ifp->ifindex to IFINDEX_INTERNAL.
(if_dump_vty) Detect pseudo interface by checking if ifp->ifindex is
IFINDEX_INTERNAL.
(zebra_interface) Check return code from interface_cmd.func.
Do not set internal ifindex values to if_new_intern_ifindex(),
since we now use IFINDEX_INTERNAL for all pseudo interfaces.
* kernel_socket.c: (ifm_read) Fix code and comments to reflect that
all internal interfaces now have ifp->ifindex set to IFINDEX_INTERNAL.
* rt_netlink.c: (set_ifindex) New function used to update ifp->ifindex.
Detects interface rename events by checking if that ifindex is already
being used. If it is, delete the old interface before assigning
the ifindex to the new interface.
(netlink_interface, netlink_link_change) Call set_ifindex to update
the ifindex.
* if.h: Remove define for IFINDEX_INTERNBASE and add define
IFINDEX_INTERNAL 0, since all internal (i.e. non-kernel) pseudo-
interfaces should have ifindex set to 0.
(if_new) Remove function.
(if_delete_retain) New function to delete an interface without
removing from iflist and freeing the structure.
(ifname2ifindex) New function.
* if.c: (if_new) Remove function (absorb into if_create).
(if_create) Replace function if_new with call to calloc.
Set ifp->ifindex to IFINDEX_INTERNAL. Fix off-by-one error
in assert to check length of interface name. Add error message
if interface with this name already exists.
(if_delete_retain) New function to delete an interface without
removing from iflist and freeing the structure.
(if_delete) Implement with help of if_delete_retain.
(ifindex2ifname) Reimplement using if_lookup_by_index.
(ifname2ifindex) New function to complement ifindex2ifname.
(interface) The interface command should check the name length
and fail with a warning message if it is too long.
(no_interface) Fix spelling in warning message.
(if_nametoindex) Reimplement using if_lookup_by_name.
(if_indextoname, ifaddr_ipv4_lookup) Reimplement using
if_lookup_by_index.
* bgp_zebra.c: (bgp_interface_delete) After deleting, set ifp->ifindex
to IFINDEX_INTERNAL.
* isis_zebra.c: (isis_zebra_if_del) Call if_delete_retain instead
of if_delete, since it is generally not safe to remove interface
structures. After deleting, set ifp->ifindex to IFINDEX_INTERNAL.
(zebra_interface_if_lookup) Tighten up code.
* ospf6_zebra.c: (ospf6_zebra_if_del) Previously, this whole function
was commented out. But this is not safe: we should at least update
the ifindex when the interface is deleted. So the new version
updates the interface status and sets ifp->ifindex to
IFINDEX_INTERNAL.
(ospf6_zebra_route_update) Use if_indextoname properly.
* ospf_vty.c: (show_ip_ospf_interface_sub) Show ifindex and interface
flags to help with debugging.
* ospf_zebra.c: (ospf_interface_delete) After deleting, set ifp->ifindex
to IFINDEX_INTERNAL.
(zebra_interface_if_lookup) Make function static. Tighten up code.
* rip_interface.c: (rip_interface_delete) After deleting, set
ifp->ifindex to IFINDEX_INTERNAL.
* ripng_interface.c: (ripng_interface_delete) After deleting, set
ifp->ifindex to IFINDEX_INTERNAL.
|
|
* ospf_dump.c: (show_debugging_ospf) Show if ospf event debugging
is turned on.
[backport candidate]
|
|
* 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.
|
|
* ospf_packet.c: (ospf_write_frags) Enhance error message to
show MTU. Also make function static.
(ospf_write) Enhance error message to show interface name and MTU.
Also make function static.
|
|
* ospf_vty.c (show_ip_ospf_interface_sub): Display interface MTU and
bandwidth; this is useful for debugging problems. Also, the function
should be static.
|
|
must be after lib/ includes in some systems. Introduce SNMP_INCLUDES
for that.
|
|
exist at all.
[backport candidate]
|
|
[backport candidate]
|
|
* ospf_lsa.c: (ospf_lsa_refresh_walker) If the system clock jumps
backward, then current time may be less than
ospf->lsa_refresher_started. This was causing invalid values
for ospf->lsa_refresh_queue.index resulting in infinite loops.
Problem fixed by casting the expression to unsigned before taking
the modulus.
[backport candidate]
|