Age | Commit message (Collapse) | Author |
|
* zebra_rib.c: Take interface metric into account.
|
|
* zebra_rib.c: (rib_process) convert to new workqueue specs and
shut up gcc, which complains about cast from void via
function parameters, for some dumb reason. Do the cast
inside the function instead.
(rib_queue_qnode_del) ditto.
(rib_queue_init) no need for the casts anymore.
|
|
rib_delete_ipv6() to match routes in the RIB by their gateway as
well as by destination.
|
|
* zebra_rib.c: (static_uninstall_ipv{4,6}) Fix regression wrt
removal of static routes with multiple-hops introduced with
the workqueue conversion. We should free the relevant
nexthop and then get rib_process to run, otherwise we just
get same static route back again (with no way to unconfigure
it, because its already deleted from configuration).
|
|
rib_add_ipv6() function so that IPv6 routes in RIB can have correct
metric. No IPv6 routing daemon uses distance yet though.
* zserv.c, connected.c, kernel_socket.c, rt_netlink.c,
rtread_proc.c,zserv.c: Pass metric and distance info to the
rib_add_ipv6().
Forwardport from stable branch.
|
|
* (global) Extern and static'ification, with related fixups
of declarations, ensuring files include their own headers, etc.
if_ioctl.c: (interface_info_ioctl) fix obvious arg mis-order in
list loop
|
|
* 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.
|
|
* (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.
|
|
* *.c: Change level of debug messages to LOG_DEBUG.
|
|
|
|
|
|
- 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.
|
|
* zebra/zebra_rib.c: Revert patch (dating from zebra.org) which
caused zebra to read all routes in all tables, rather than just
the main table. See [quagga-dev 280].
|
|
* zebra/zebra_rib.c: (nexthop_active_update) Check for multipath
limit when setting changed flag to avoid spurious changes.
(static_install_ipv{4,6}) dont uninstall by default, might not be
required - avoid spurious uninstalls.
(static_uninstall_ipv{4,6}) only uninstall the route if its
actually FIB route.
|
|
* zebra/zebra_rib.c: Fix possible dangling reference to rib
route_nodes - unlock it the appropriate number of times. (twice,
because of the implicit lock). see [quagga-dev 251].
|
|
* 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.
|
|
* zebra/rt_netlink.c: Debug statements added to
netlink_route_multipath()
* zebra/zebra_rib.c: If route has a gateway, delete only existing
route with that specified gateway.
|
|
* 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().
|
|
to always be considered to be a blackhole route. (if gate is passed in, it
cant be).
|
|
|
|
|
|
|
|
Subject: [zebra 19084] Re: suspected memory leakage upon static route
I believe this is a more complete patch, it also addresses
allocating/freeing of nexthop->ifname string buffer (1) using
XSTRDUP/XFREE macros (thus correctly updating memory statistics), and
(2) for all nexthop->type cases that carry an ifname string.
|
|
Subject: [zebra 19080] suspected memory leakage upon static route deletion
upon deletion of a static route entry, at the end of
zebra/zebra_rib.c/static_delete_ipv4(), there's a call to XFREE to
deallocate the 'struct static_ipv4'. However, in the case of a static with
ifname as nexthop (type==STATIC_IPV4_IFNAME), this struct holds a pointer to
a dynamically allocated ifname string buffer (si->gate.ifname, see its
allocation within static_add_ipv4() using XSTRDUP). IMO, the attached patch
is required.
Notes: the same applies to IPv6 statics as well (fix included in patch);
and, I admit I haven't yet tested that, but it seems simple enough to be
working... ;->
|
|
Subject: [zebra 17290] [PATCHES] - Fixes for problems in 0.93b
Added ifupstaticfix
|
|
|