Age | Commit message (Collapse) | Author |
|
* zserv.c: (zsend_route_multipath) Fix bug if route is sent
with no NEXTHOP_FLAG_FIB nexthops. As ZAPI_MESSAGE_IFINDEX
and ZAPI_MESSAGE_NEXTHOP are always set, clients would try
read non-existent nexthop information and hit stream assert.
Zserv is still broken for multi-nexthop messages, but it always was.
|
|
* rib.h: (struct rib) Add lock field for refcounting.
* zserv.h: (struct zebra_t) Add a ribq workqueue to the zebra
'master' struct.
* zserv.c: (zread_ipv4_add) XMALLOC then memset should be XCALLOC.
* zebra_rib.c: Clean up refcounting of route_node, make struct rib
refcounted and convert rib_process to work-queue. In general,
rib's should be rib_addnode'd and delnode'd to route_nodes, and
these symmetrical functions will manage the locking of referenced
route_node and freeing of struct rib - rather than having users
manage each seperately - with much scope for bugs..
(newrib_free) removed and replaced with rib_lock
(rib_lock) new function, check state of lock and increment.
(rib_unlock) new function, check lock state and decrement. Free
struct rib if refcount hits 0, freeing struct nexthop's, as
newrib_free did.
(rib_addnode) Add RIB to route_node, locking both.
(rib_delnode) Delete RIB from route_node, unlocking each.
(rib_process) Converted to a work-queue work function.
Functional changes are minimal, just arguments, comments and
whitespace.
(rib_queue_add_qnode) Helper function to setup a ribq item.
(rib_queue_add) Helper function, same arguments as old
rib_process, to replace in callers of rib_process.
(rib_queue_qnode_del) ribq deconstructor.
(rib_queue_init) Create the ribq.
(rib_init) call rib_queue_init.
(remainder) Sanitise refcounting of route_node's. Convert to
rib_queue_add, rib_addnode and rib_delnode. Change XMALLOC/memset
to XCALLOC. Remove calls to nexthop_delete and nexthop_free.
|
|
* zserv.c (zebra_client_read): Fix bug: first read attempt should
read ZEBRA_HEADER_SIZE minus the number of bytes already read.
Improve efficiency by maintaining a calculation of the number
of bytes read instead of calling stream_get_endp multiple times.
If message length is too small, issue a warning message (not debug)
before closing the connection. And also check that message length
is not too big.
|
|
* (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.
|
|
* lib/vty.c: Improve logging of failures to open vty socket(s).
See bugid #163.
* zebra/zserv.c: print more helpful errors when we fail to successfully
bind and listen on zserv socket. Closes bugzilla #163.
|
|
* 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).
|
|
* zserv.c: (zebra_read_ipv6) replace the char * arithmetic with
STREAM_READABLE.
|
|
* (global) Update code to match stream.h changes.
stream_get_putp effectively replaced with stream_get_endp.
stream_forward renamed to stream_forward_getp.
stream_forward_endp introduced to replace some previous
setting/manual twiddling of putp by daemons.
* lib/stream.h: Remove putp. Update reference to putp with endp.
Add stream_forward_endp, which daemons were doing manually.
Rename stream_forward to stream_forward_getp.
lib/stream.c: Remove/update references to putp.
introduce stream_forward_endp.
|
|
* zserv.c: (zebra_accept) Comment out setting of socket to NONBLOCK
for now, as we dont actually deal with with resending.... See
bugzilla #122, fix from wawa@yandex-team.ru (Vladimir Ivanov).
* kernel_socket.c: (routing_socket) ditto.
|
|
* *.c: Change level of debug messages to LOG_DEBUG.
|
|
* global: Replace strerror with safe_strerror. And vtysh/vtysh.c
needs to include "log.h" to pick up the declaration.
|
|
though. Needs serious cleanup.
|
|
|
|
|
|
|
|
|
|
* zserv.c: (zsend_route_multipath) fix nasty bad memset of struct
in_addr to sizeof(struct in6_addr), causing odd and hard to debug
crash.
|
|
* zebra/zserv.c: (zebra_init) remove implicit ip forward enabling
* NEWS: warn about forwarding change
|
|
* zserv.c: (zsend_route_multipath) Set the nexthop_num
field correctly. Add NEXTHOP_TYPE_IPV6_IFNAME for v6.
Conditionally set ZAPI_MESSAGE_METRIC flag - only for adds.
(zsend_ipv4_add) cruft, deleted.
(zsend_ipv4_delete) ditto.
(zsend_ipv6_add) ditto.
(zsend_ipv6_delete) ditto.
2004-05-09 Sowmini Varadhan <sowmini.varadhan@sun.com>
* zserv.c: (zsend_ipv{4,6}_{add,delete}_multipath) collapsed
into single zsend_route_multipath function.
(zsend_interface_{up,down}) collapsed into zsend_interface_update.
(zsend_interface_address_{add,delete}) collapsed into
zsend_interface_address.
(zsend_interface_add) send mtu6.
(zsend_interface_delete) ditto.
(zebra_write) remove unused function.
(various) Apply static qualifier. Add comments.
* zserv.h: Definitions changed as per above.
* redistribute.c: Changes as per zserv.c.
|
|
* Fixed "(no) ipv6 forwarding" command logic.
* Added --disable-capabilities switch to configure.
|
|
from vtysh ([quagga-dev 932]).
|
|
|
|
* lib/vty.{c,h}: Remove vty layer depending on a 'master' global,
pass the thread master in explicitly to vty_init. Sort out some
header dependency problems with lib/command.h
* zebra/: Move globals to struct zebrad. Update vty_init().
* (.*)/\1_main.c: update call to vty_init().
|
|
* Merge of zebra privileges
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|