Age | Commit message (Collapse) | Author |
|
tries really hard to make icc look like gcc, there are some
differences. It's very verbose with -Wall and it doesn't support
the individual -W options. We are going to ignore some of these
warnings.
|
|
|
|
include year 2005.
|
|
[backport candidate]
|
|
* interface.c, interface.h, rtadv.c, rtadv.h: extensions to Neighbor
discovery for Mobile IPv6.
|
|
* Extensions to Neighbor Discovery for Mobile IPv6
|
|
no particular afi/safi configured.
[backport candidate]
|
|
* zebra.h: Must check whether __attribute__ should be defined before
including zassert.h.
[backport candidate]
|
|
* (global) update all c files to match the lib/vector.h rename of
(struct vector).active to max, and vector_max macro to
vector_active.
* lib/vector.h: Rename to (struct vector).max to slightly less
confusing active, for the number of active slots, distinct from
allocated or active-and-not-empty. Rename vector_max to
vector_active for same reason.
|
|
* command.c: (various) Fix indentation and other whitespace.
|
|
* command.c: (sort_node) use vector_max instead of referencing
(struct vector *)->max directly. Test that vector_max is > 0
before using it to calculate an index.
Fixup vector loop to make main body conditional on vector slot
not being empty.
(cmd_cmdsize) Fixup vector loop to make main body conditional on
vector slot not being empty.
(cmd_filter_by_completion) ditto
(cmd_filter_by_string) ditto
(is_cmd_ambiguous) ditto
(cmd_describe_command_real) Change index integers to unsigned.
Test that vector_max is > 0 before using it to calculate an index.
Return immediately with CMD_ERR_NO_MATCH if vline has no
active slots.
Fixup vector loop to make main body conditional on vector slot
not being empty.
(cmd_complete_command_real) ditto.
(cmd_execute_command_strict) Fixup vector loop to be conditional
on non-null slot.
|
|
* 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]
|
|
implemented.
|
|
* configure.ac: Solaris 8 can use the newer lifreq based methods
too, allows IPv6.
|
|
* rt_netlink.c: (netlink_route_multipath) dont set equalise flag.
No stock Linux kernel has ever supported it, and even if it had
|
|
* command.c: (config_list_cmd) Don't list hidden or deprecated
commands, hiding these from tab completion is still to be done.
|
|
* command.c: Undo commit of sign warning fix and hidden command
in list_cmd. Sign warning is more subtle. list_cmd on its own
will be committed after.
|
|
quarantees that they will appear after SERVICE_NODE to make sure
that encrypted passwords will work ("service password-encryption"
command).
[backport candidate]
|
|
* command.c: (no_banner_motd_cmd) use XFREE.
* vty.c: (vty_hello) fix the indentation and comment.
|
|
* command.c: (cmd_describe_command_real) sign compile warning fix
(cmd_complete_command_real) ditto.
(config_list_cmd) Don't list hidden or deprecated commands,
hiding these from tab completion is still to be done.
* command.h: cmd attr enum should start at 1.
|
|
* command.c: (banner_motd_file_cmd) use XSTRDUP/XFREE
* vty.c: (vty_hello) suggestions from Andrew, read by line and
stub out trailling non-printable characters on each line thus
allowing us to specify VTY_NEWLINE to vty_out.
|
|
* vty.c: (vty_hello) display motd file, if set
* command.h: add char *motdfile to struct host
* command.c: (config_write_host) write out motdfile config
(banner_motd_file_cmd) new command, allow motd to be read from
file.
(no_banner_motd_cmd) free motdfile string, if needs be.
(cmd_init) init (struct host).motdfile. Add new motd file
commands.
|
|
[backport candidate]
|
|
* vty.c: Fix fd leak.
[backport candidate]
|
|
[backport candidate]
|
|
|
|
Thanks to Mohit Thakur.
|
|
* zserv.c: Must include network.h and buffer.h for non-blocking I/O.
Remove global message_queue and t_write (need separate buffering for
each client).
(zebra_server_dequeue,zebra_server_enqueue) Remove functions
related to old buggy buffering code.
(zserv_delayed_close) New thread callback function to delete a client.
(zserv_flush_data) New thread callback function to flush buffered
data to client.
(zebra_server_send_message) Rewritten to use buffer_write (so
buffering of writes and non-blocking I/O work properly).
(zsend_interface_add,zsend_interface_delete,zsend_interface_address,
zsend_interface_update) Return 0 instead of -1 if !client->ifinfo
(this is not really an error). Return value from
zebra_server_send_message.
(zsend_route_multipath,zsend_ipv4_nexthop_lookup,
zsend_ipv4_import_lookup) Return value from zebra_server_send_message.
(zsend_ipv6_nexthop_lookup) Fix scope to static, and return value
from zebra_server_send_message.
(zsend_router_id_update) Must use zebra_server_send_message instead
of deprecated writen function. Return 0 instead of -1 if this client
is not subscribed to router-id updates (since this is not really
an error).
(zread_interface_add) Change type to static int. If
zsend_interface_add fails or zsend_interface_address fails, return -1
immediately (since the client has had an I/O error).
(zread_interface_delete,zread_ipv4_add,zread_ipv4_delete,
zread_ipv6_add,zread_ipv6_delete,zread_router_id_delete) Return 0
to indicate success.
(zread_ipv4_nexthop_lookup) Return value from
zsend_ipv4_nexthop_lookup.
(zread_ipv4_import_lookup) Return value from zsend_ipv4_import_lookup.
(zebra_read_ipv6) Remove unused function.
(zread_ipv6_nexthop_lookup) Return value from
zsend_ipv6_nexthop_lookup.
(zread_router_id_add) Return value from zsend_router_id_update.
(zebra_client_close) Call buffer_free(client->wb) and
thread_cancel(client->t_suicide).
(zebra_client_create) Allocate client->wb using buffer_new.
(zebra_client_read) Support non-blocking I/O by using stream_read_try.
Use ZEBRA_HEADER_SIZE instead of 3.
(zebra_accept) Fix bug: reset accept thread at top. Make client
socket non-blocking using the set_nonblocking function.
(config_write_forwarding) Fix scope to static.
(zebra_init) Remove initialization code for old buggy write buffering.
* zserv.h: Add 2 new fields to struct zserv: struct buffer *wb
(to enable buffered writes with non-blocking I/), and
struct thread *t_suicide to support delayed close on I/O
errors.
* router-id.h: Remove prototypes for zread_router_id_add and
zread_router_id_delete (their scope should be static to zserv.c).
|
|
* redistribute.c: (zebra_check_addr,is_default,
zebra_redistribute_default,zebra_redistribute) Fix scope to be static.
|
|
* stream.c: (stream_read_try) Log a warning message if a fatal
I/O error occurs.
(stream_fifo_new) Fix prototype.
* stream.h: Fix prototype for stream_fifo_new (need void arg).
|
|
|
|
* {vty.h,vty.c}: Remove vty_finish (duplicate of vty_reset).
* isis_main.c: (reload) Call vty_reset instead of vty_finish (both
functions were exactly the same).
|
|
* 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.
|
|
* buffer.h: Make the struct buffer and struct buffer_data structures
private by moving them inside buffer.c. Add comments for all
functions. Rename buffer_write as buffer_put (to be more consistent
with the buffer_putc and buffer_putstr functions). Declare a new
buffer_write function that is used to write data to a file descriptor
and/or add it to the buffer queue. Remove unused function
buffer_flush_vty_all. Create a new enum typedef buffer_status_t
to be used as the return code for all buffer_flush* functions
and buffer_write.
* buffer.c: The struct buffer and struct buffer_data declarations
are now private to this file. In conjunction with that, remove
some unnecessary fields: struct buffer (alloc, unused_head,
unused_tail, length), struct buffer_data (prev).
(buffer_data_new) Removed: functionality incorporated into buffer_add.
(buffer_data_free) Removed: use a macro BUFFER_DATA_FREE instead.
(buffer_new) Use calloc instead of malloc + memset(zero).
Supply an appropriate default size if the specified size is 0.
(buffer_free) Eliminate code duplication by calling buffer_reset to
free the contents of the buffer (and remove unused code related
to unused_head).
(buffer_empty,buffer_putc,buffer_putstr) Aesthetic change (make more
compact).
(buffer_reset) Use macro BUFFER_DATA_FREE. No need to set
alloc and length to 0 (these fields have been removed).
(buffer_add) Fix scope to be static. Call XMALLOC directly instead
of calling removed buffer_data_new function. Simplify the logic
(since it's now a singly-linked list instead of doubly-linked).
(buffer_write) Renamed to buffer_put. Change to void, since return
code of 1 was meaningless. No need to adjust length field, since
it has been removed.
(buffer_putw,buffer_flush,buffer_flush_vty_all,buffer_flush_vty)
Remove unused functions.
(buffer_flush_all) Rewrite using buffer_flush_available to eliminate
a possible failure mode if IOV_MAX is less than the number of buffers
on the queue.
(buffer_flush_window) Incorporate logic from buffer_flush_vty.
Log an error message if there is a writev error.
(buffer_flush_available) Be more paranoid: check for case where
buffer is already empty. Use new ERRNO_IO_RETRY macro, and use
new enum for return codes. Simplify deletion logic (since it's
now a singly-linked list).
(buffer_write) New function for use with non-blocking I/O.
* vty.h: Replace the struct vty sb_buffer field with a fixed-size
(5-character) sb_buf field and an sb_len field, since using
a struct buffer was inappropriate for this task. Add some useful
comments about telnet window size negotiation.
* vty.c: Include <arpa/telnet.h> (no longer included by zebra.h).
Remove VTY_OBUF_SIZE (instead use buffer_new default size).
Make telnet_backward_char and telnet_space_char static const.
(vty_out) Replace buffer_write with buffer_put.
(vty_log_out) Check for I/O errors. If fatal, close the vty session.
Consolidate 3 separate writes into a single write call.
(vty_will_echo,vty_command,vty_next_line,vty_previous_line,
vty_end_config,vty_describe_fold,vty_clear_buf,vty_serv_sock_addrinfo,
vty_serv_sock_family,vty_serv_un,vty_use_backup_config,exec_timeout,
vty_config_write,vty_save_cwd) Fix scope to static.
(vty_new) Let buffer_new use its default buffer size.
(vty_write) Fix signature: 2nd arg should be const char *.
Replaced buffer_write with buffer_put.
(vty_telnet_option) Fix minor bug (window height or width greater than
255 was broken). Use sb_buf and sb_len instead of removed sb_buffer
(which was being used improperly).
(vty_read) On error, use ERRNO_IO_RETRY to decide whether it's fatal.
If the error is fatal, call buffer_reset so vty_close does not attempt
to flush the data. Use new sb_buf and sb_len instead of sb_buffer
to store the SB negotiation string.
(vty_flush) When vty->lines is 0, call buffer_flush_available instead
of buffer_flush_window. Look at the return code from buffer_flush
to detect I/O errors (and in that case, log an error message and
close the vty).
(vty_create) Fix scope to static. Initialize sb_len to 0 instead
of creating sb_buffer.
(vty_accept) Set socket nonblocking.
(vtysh_accept) Use new set_nonblocking function instead of calling
fcntl directly.
(vtysh_flush) New function called from vtysh_read (after command
execution) and from vtysh_write. This flushes the buffer
and reacts appropriately to the return code (by closing the vty
or scheduling further flushes).
(vtysh_read) Check whether error is fatal using ERRNO_IO_RETRY.
If not, just try again later. Otherwise, call buffer_reset before
calling vty_close (to avoid trying to flush the buffer in vty_close).
Fix logic to allow case where a command does not arrive atomically
in a single read call by checking for the terminating NUL char.
(vtysh_write) Use new vtysh_flush helper function.
(vty_close) No need to call buffer_empty, just call buffer_flush_all
in any case (it will check whether the buffer is empty).
Do not free sb_buffer (since it has been removed).
(vty_log_fixed) Use writev instead of write.
* zebra.h: Do not include <arpa/telnet.h>, since this is used only
by lib/vty.c.
|
|
work again.
|
|
|
|
* ospf_lsdb.h: Export ospf_lsdb_clean_stat() function.
* ospf_spf.h: Add link to the LSA stat structure into vertex.
* ospf_spf.c: New functions cmp() and update_stat() to manage
candidates. Remove ospf_spf_has_vertex(), ospf_vertex_lookup(),
ospf_install_candidate() and ospf_spf_register() functions not needed
any more. Update ospf_vertex_new(), ospf_spf_next() and
ospf_spf_calculate() functions to use pqueue instead of linked list.
|
|
will allow to update node when:
i) a node is inserted into the priority queue;
ii) a node position is modified in the priority queue;
* pqueue.h: Export trickle_down() function.
|
|
we are not debugging.
|
|
if we are not debugging.
|
|
Fixes bugzilla #153. [backport candidate]
|
|
didn't match the pattern.
Fixes bugzilla #150. [backport candidate]
|
|
* zserv.c: (zebra_read_ipv6) replace the char * arithmetic with
STREAM_READABLE.
|
|
* ospf_packet.c: (ospf_stream_copy) remove
(ospf_packet_dup) use stream_copy instead of ospf_stream_copy
|
|
* stream.c: (stream_new) fix dumb mistake.
|
|
* watchquagga.c: (handle_read) Use new ERRNO_IO_RETRY macro.
|
|
* stream.c: (stream_read_try) Use new ERRNO_IO_RETRY macro.
|
|
* network.h: Define a new ERRNO_IO_RETRY macro to test whether an I/O
operation should be retried. This eliminates the need to duplicate
the same logic testing for EAGAIN or EINTR in multiple places.
|
|
* ospf_packet.c: (ospf_recv_packet) If there is somehow a runt
packet in the queue, it must be discarded. Improve warning messages.
Fix scope to static.
(ospf_read) Fix bug: should reset the read thread in all cases
to make sure we continue to get incoming messages.
|
|
* watchquagga.c: (try_connect) Use new set_nonblocking function instead
of calling fcntl directly.
|