Age | Commit message (Collapse) | Author |
|
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.
|
|
* .cvsignore: ignore eps files, built from sources
|
|
* INSTALL.quagga.txt: Add note about additional CVS build
requirements, if one wishes to build ps/pdf docs.
|
|
* ospf6_route.c: (ospf6_route_show, ospf6_route_show_detail) Protect
against the possibility that the string returned by if_indextoname
may not terminate with '\0'.
|
|
* configure.ac: Add strnlen to AC_CHECK_FUNCS.
* zebra.h: Should include str.h to pick up missing functions.
* str.h: Declare strnlen if needed.
* str.c: Do not include str.h since zebra.h now includes it.
(strnlen) New function.
|
|
* Makefile.am: quagga_TEXINFOS should depend on figures_BUILT_SOURCES.
|
|
* fig{-{normal,rs}-processing,_topologies_{rs,full}}.dia: new
files, dia diagramme XML versions of the original corresponding
EPS encapsulated bitmaps.
* fig{-{normal,rs}-processing,_topologies_{rs,full}}.png: new
files, png exports by dia of the source dia diagrammes above.
* fig{-{normal,rs}-processing,_topologies_{rs,full}}.eps: removed,
replaced by above dia source.
* routeserver.texi: remove extension in image macros.
* quagga.info: updated build
* Makefile.am: Add rules to build eps (using 'convert'), png (using
dia). Add figures_BUILT_SOURCES to extra_dist to avoid the
dependency on dia :) (amongst other things) for dist users.
|
|
it's not for debug.
* rt_netlink.c (netlink_talk): Don't assume we use netlink_cmd
although we do now actually.
* rt_netlink.c (netlink_route, netlink_route_multipath): Always use
netlink_cmd to send messages to the kernel.
[backport candidate]
|
|
* ospf_dump.c: (show_debugging_ospf) Show if ospf event debugging
is turned on.
[backport candidate]
|
|
* irdp.h: Add prototype for irdp_sock_init, and fix protos for
other irdp_* functions.
* irdp_interface.c: (irdp_if_start) If irdp_sock is negative,
call irdp_sock_init to create the IRDP socket.
(irdp_if_init) Rename to irdp_init().
(get_iflist_ifp) Remove function that is a duplicate of
if_lookup_by_index.
(*) Make many functions static. And remove superfluous "\n" from
several zlog messages.
* irdp_main.c: (irdp_init) Remove function that used to call
irdp_if_init() and irdp_sock_init(), since we will now create
the socket only upon first use.
(irdp_sock_init) Do not update global irdp_sock variable, just
return the fd and assume that the caller will do so. If setsockopt
calls fail, close the socket before returning -1.
(*) Make many functions static.
* irdp_packet.c: Initialize irdp_sock to -1.
(irdp_read_raw) Call standard library function if_lookup_by_index
instead of get_iflist_ifp.
(irdp_recvmsg) Should be static, not global.
|
|
* 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.
|
|
snmp support.
|
|
must be after lib/ includes in some systems. Introduce SNMP_INCLUDES
for that.
|
|
about various headers. CFLAGS is not correct place to specify
includes, INCLUDES is for that.
|
|
exist at all.
[backport candidate]
|
|
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.
|