Age | Commit message (Collapse) | Author |
|
|
|
* vty.h: Remove fields in struct vty that were related to VTY_CONTINUE
capabilities (that were used only in bgpd/bgp_route.c and are now
removed). Also remove some other fields that were not being
used at all.
* vty.c: (vty_execute) Do not test for obsolete status values VTY_START
and VTY_CONTINUE.
(vty_read) Remove calls to vty->output_func since that was part
of the VTY_CONTINUE infrastructure that has been removed.
(vty_flush) Remove code to support VTY_START and VTY_CONTINUE.
(vty_close) Remove code to cancel vty->t_output thread, since that
thread was never actually used.
* bgp_route.c: Remove all code related to VTY_CONTINUE; this feature
is deprecated because the output did not represent a single point
in time. All output needs to be generated inline and buffered
by the library code.
(route_vty_out,route_vty_out_tag,damp_route_vty_out,
flap_route_vty_out) Remove code to count number of lines of output,
since this was only useful for VTY_CONTINUE behavior.
(bgp_show_callback) Removed.
(bgp_show_table) Remove hooks for VTY_CONTINUE callback support.
As a result, there's a new output_arg argument to this function.
Make function static.
(bgp_show) Make function static and add a new output_arg argument.
Change all functions that call bgp_show or bgp_show_table to
pass the new output_arg argument (that used to be passed inside
vty->output_arg).
* bgp_mplsvpn.c: Remove declarations of functions defined in
bgp_route.c; these declarations belong in bgp_route.h.
* bgp_route.h: Declare 3 global functions used in both bgp_route.c
and in bgp_mplsvpn.c.
|
|
* vty.c: Vtysh connections to daemons should use buffering.
(vty_out) Remove exception for vty_shell_serv, just use buffer_write.
(vty_new) Increase output buffer size to 4096 rounded up to a
multiple of pagesize.
(vtysh_read) After command has been executed and all output buffered,
call buffer_flush_available and schedule further writes if the
buffers are not yet empty.
(vtysh_write) New function to flush output to vtysh when the socket
is writeable.
(vty_event) Added new VTYSH_WRITE event for flushing buffers to vtysh
clients. Also, should save read thread in vty->t_read so the
thread can be cancelled in vty_close.
* buffer.h: In struct buffer_data, remove unused "parent" field.
Convert "unsigned char *data" to "unsigned char data[0]" to save
a malloc. Declare new function buffer_flush_available that works
with non-blocking sockets.
* buffer.c: (buffer_data_new) Use a single malloc now that data is
a variable-size array at end of structure.
(buffer_data_free) Just a single free now that data is part of the
structure.
(buffer_write) Simplify the logic to make behavior more transparent.
(buffer_flush) Decrease b->length as data is written out.
(buffer_flush_vty_all) Decrease b->length as buffers are freed.
(buffer_flush_vty) Decrease b->length as data is written out.
(buffer_flush_available) New function to flush non-blocking sockets.
|
|
* vty.c: As per Andrew's suggestions..
(vty_serv_un) remove flags.
(vtysh_accept) close socket if we cant set NONBLOCK. Add flags.
|
|
* vty.c: Move setting of sock to O_NONBLOCK from vty_serv_un
to vtysh_accept, where sock is the actual fd we wanted to set to
O_NONBLOCK, ie the /connected/ vtysh unix socket.
|
|
* version.h.in: (pid_output*) add const qualifier.
* command.h: Change DEFUN func to take const char *[] rather
than char **, to begin process of fixing compile warnings in lib/.
Nearly all other changes in this commit follow from this change.
* buffer.{c,h}: (buffer_write) pointer-arithmetic is gccism, take
const void * and cast an automatic const char *p to it.
(buffer_putstr) add const
* command.c: (zencrypt) const qualifier
(cmd_execute_command_real) ditto
(cmd_execute_command_strict) ditto
(config_log_file) ditto.
Fix leak of getcwd() returned string.
* memory.{c,h}: Add MTYPE_DISTRIBUTE_IFNAME for struct dist ifname.
* distribute.{c,h}: Update with const qualifier.
(distribute_free) use MTYPE_DISTRIBUTE_IFNAME
(distribute_lookup) Cast to char *, note that it's ok.
(distribute_hash_alloc) use MTYPE_DISTRIBUTE_IFNAME.
(distribute_get) Cast to char *, note that it's ok.
* filter.c: Update with const qualifier.
* if.{c,h}: ditto.
* if_rmap.{c,h}: ditto.
(if_rmap_lookup) Cast to char *, note that it's ok.
(if_rmap_get) ditto.
* log.{c,h}: Update with const qualifier.
* plist.{c,h}: ditto.
* routemap.{c,h}: ditto.
* smux.{c,h}: ditto. Fix some signed/unsigned comparisons.
* sockopt.c: (getsockopt_cmsg_data) add return for error case.
* vty.c: Update with const qualifier.
|
|
|
|
added to strings and a lot of int -> unsigned int changes.
|
|
|
|
|
|
* vty.c: (vty_serv_un) set unix vty socket to nonblocking
to prevent inadvertent blocking of daemons by use of
vtysh. TODO: disentangle manual paging from the buffer_write
path so that unix vty can use this path too and be reliable.
|
|
to read system one.
|
|
* filter.c: (access_list_remark_cmd) buffer_putstr doesnt need cast
to u_char. (ipv6_access_list_remark_cmd) ditto.
if.c: ditto
* network.c: (readn/writen) pointer arg should be type u_char.
* plist.c: needs to include stream.h, not declare stream functions
internally.
(various) Add static qualifier to internal functions.
(prefix_list_type_str) extraneous breaks in switch statement.
(ip_prefix_list_description_cmd) buffer_putstr doesnt need cast
* stream.h: depends on plist.h and export stream_put_prefix
* vty.c: (vty_<telnet option build functions>) should use
unsigned char, telnet options are 0 -> 255.
* zclient.c: various u_char<->char type cleanups.
* zebra.h: Having to define CMSG_* can apply to more than just
BSDI_NRL.
* ripd.c: (rip_distribute_update_all) distribute list hook
function pointer prototype requires struct prefix_list * arg.
(rip_distribute_update_all_wrapper) update to pass required arg,
NULL.
|
|
* (many) reference <lib/version.h> rather than "version.h",
because version.h is a generated file and not present in the
source tree when using objdir builds.
(committed by gdt)
works fine with normal builds; didn't try objdir
|
|
- add privs support
- use misc quagga's definitions
- make it compile"able"
- fix segfault cases related to hostname()
- add debug isis xxx command
This patch has been approved by Paul Jakma.
|
|
|
|
* configure.ac (and everywhere a regular file is opened for
writing): use file permissions from configure rather than
compiled-in umask.
|
|
* lib/vty.c: (vty_read) additional change i had applied to Jay's
telnet sub-option processing crash fix was incorrect, revert.
|
|
* lib/vty.c: cleanup getcwd again. just pass the buffer in to getcwd.
|
|
* lib/vty.c: (vty_telnet_option) Remote DoS exists if a telnet
end-sub-negotation is sent when no sub-negotation data has been
sent. Return immediately if no sub-negotation is in progress.
(vty_read) do not attempt to process options if no sub-negotation
is in progress.
|
|
* lib/vty.c: (vty_save_cwd) dont crash if getcwd fails. try fallback
to SYSCONFDIR. Allocate cwd from the stack rather than relying on
(non-portable) getcwd() allocation (which we didnt seem to be
freeing).
|
|
* lib/version.h: add ZEBRA_URL (unused for now)
* lib/vty.c: CMD_ERR_NOTHING_TODO when reading conf file should not
be fatal. slight reformating.
* ospfd/ospf_zebra.c: ignore reject/blackhole routes if zebra sends
these type of routes. probably should be a new type of route to
allow daemons to more easily choose whether to redistribute them
- rathen than just a flag (eg for reject/blackhole).
reorder the is_prefix_default test for ZEBRA_IPV4_ROUTE_DELETE to
avoid the inverted test - slightly more readable.
* redhat/zebra.spec.in: Add ospfapi port to services file, if
with_ospfapi.
* zebra/rib.h: Change nexthop types to an enum.
* zebra/rt_netlink.c: run it through indent -nut.
Add nexthop_types_desc[] descriptive array for nexthop types.
(netlink_route_multipath) debug statements indicate which branch
they are in and print out nexthop type.
* zebra/zebra_rib.c: slight reformatting.
* zebra/zebra_vty.c: Pass ZEBRA_FLAG_BLACKHOLE flag to
static_add_ipv4() if Null0 route is configured. print out Null0 if
STATIC_IPV4_BLACKHOLE route, and ignore flags (shouldnt be
possible to set flags from vty) for config and show route.
|
|
* 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
|
|
|
|
Subject: [zebra 19019] [PATCH] daemons -A option
Works now. Patch attached. Not tested for IPv6, but should work there too.
|
|
|