paul [Wed, 4 Jun 2003 10:19:12 +0000 (10:19 +0000)]
2003-06-04 Paul Jakma <paul@dishone.st>
* (Makefile.am): doc should be a SUBDIR. Specify DIST_SUBDIRS to
remove dependence of make dist on configure options. Add doc/mpls
to EXTRA_DIST. redhat/ does not need a dist-hook, its already in
SUBDIR. Remove CVS/ dir from the dist doc/.
paul [Wed, 4 Jun 2003 09:40:54 +0000 (09:40 +0000)]
Paul Jakma:
lib/debug.{c,h}: glibc backtrace printing function (from the glibc info page)
configure.ac: check for glibc backtrace and set define
lib/zebra.h: glibc backtrace support
paul [Wed, 4 Jun 2003 02:28:45 +0000 (02:28 +0000)]
From: kamatchi soundaram <kamatchi@tdd.sj.nec.com>
Subject: [zebra 19263] Another memory leak!! is zebra OSPF
This memory leak gets into picture whenever any interface goes down.
Problem found and desctription: Whenever the interface goes down, the
"def_params" (member of ospf_if_info) structure memory is not freed.
Fix made: added the following line to free the "def_params" memory of
ospf_if_info before calling the "XFREE(MTYPE_OSPF_IF_INFO, ifp->info);"
The added line is:
ospf_del_if_params ((struct ospf_if_params *) IF_DEF_PARAMS (ifp));
The detail of the memory leak follows:
File name: ospf_interface.c
Function name: ospf_if_new_hook().
Type of leak: Overwriting the already allocated memory.
Problem found and description:
The ospf_new_if_params() fn allocates a memory for "auth_crypt" which
is overwritten, down in the fn (ospf_if_new_hook) by explicitely allocating
a memory for the same "auth_crypt".
paul [Thu, 29 May 2003 17:26:24 +0000 (17:26 +0000)]
ospfd/ospfd.h: Change delay and holdtime to 1s. More appropriate values for
the class of machines which zebra runs on than the original defaults which
were taken from IOS (and even IOS uses much lower times these days). Lower
values greatly help with convergence.
Ideally, we'd use even lower times, but thread_add_timer() api will need to
be modified to use milliseconds. (eg JunOS uses 100ms for delay, and 700ms
for hold time, iirc from Hasso).
paul [Sun, 25 May 2003 23:24:50 +0000 (23:24 +0000)]
Fix missing else in static_add_ipv4() which was causing case of (!ifname)
to always be considered to be a blackhole route. (if gate is passed in, it
cant be).
hasso [Sat, 24 May 2003 21:41:49 +0000 (21:41 +0000)]
Revert my http://hasso.linux.ee/zebra/ht-ifrmap-14042003.patch patch. Used
same idea as in lib/distribute.c to allow extract.pl to pick up commands
for vtysh.
paul [Fri, 23 May 2003 09:25:20 +0000 (09:25 +0000)]
From: Hasso Tepper <hasso@estpak.ee>
Add the 'no interface' command to all the daemons and vtysh. now it's
possible to delete interface from routeing daemons as well only if it
doesn't exist in os.
vtysh checks that the zebra.vty socket uid is == to its own euid, this is
bogus - let the kernel decide whether permissions match, vtysh shouldnt
try second guess. (this becomes noticeable when neither zebra nor vtysh
are run as root :) )
paul [Fri, 16 May 2003 17:19:48 +0000 (17:19 +0000)]
From: Gilad Arnold <gilad.arnold@terayon.com>
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.
paul [Wed, 14 May 2003 18:29:13 +0000 (18:29 +0000)]
From: Gilad Arnold <gilad arnold at terayon com>
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... ;->
paul [Sat, 10 May 2003 18:33:28 +0000 (18:33 +0000)]
Hopefully fix the 'bgp dump routes-mrt' command to actually dump routes.
Should recognise the absence of an interval now and schedule one-shot dump.
hopefully.
"configure.ac" script ignores absent socket directory. So do all demons
(with just a puzzling complaint to _stderr_ only!). I added /tmp and
/var/tmp to the list of possible dirs. They should be present in most
configurations.
paul [Tue, 6 May 2003 23:38:23 +0000 (23:38 +0000)]
Reverting the NSSA maxage walker loop addition for now, until all the other
problems with NSSA are resolved, and we can determine whether this had any
point.
paul [Tue, 6 May 2003 23:31:38 +0000 (23:31 +0000)]
NSSA /might/ be missing this. I'm not sure.
It didnt solve a particular problem of Hasso's, but i'm committing it just
for posterities sakes, so i dont lose it (i'll revert it immediately).
paul [Wed, 23 Apr 2003 17:01:31 +0000 (17:01 +0000)]
From: Hasso Tepper
This one fixes "router xxx" node commands in vtysh. Don't get "unknown
command" error when entering "passive-interface eth0" command while
ospfd and ospf6d running etc.
paul [Sat, 19 Apr 2003 15:55:08 +0000 (15:55 +0000)]
Hasso Tepper
http://hasso.linux.ee/zebra/ht-distribute-18042003.patch
Allows to extract.pl to pickup "distribute-list ..." commands for vtysh
(ripngd and ripd).
paul [Sat, 19 Apr 2003 15:54:03 +0000 (15:54 +0000)]
Hasso Tepper
http://hasso.linux.ee/zebra/ht-ifrmap-14042003.patch
Allows to extract.pl to pickup "route-map xxx in/out dev" commands for vtysh
(ripngd). As lib/if_rmap.[c|h] are used in ripngd only, I moved them to the
ripngd/ directory.
paul [Sat, 19 Apr 2003 15:49:49 +0000 (15:49 +0000)]
Hasso Tepper
http://hasso.linux.ee/zebra/ht-routemap-18042003_5.patch
Trivial fixes to sync daemon's route-map commands to have same syntax. Fixes
a lot of errors with "match ..." and "set ..." commands when using vtysh.
It was annoying for me to view area id's like 335544330 (20.0.0.10 in
address format) in configuration. Most of other network devices are
using address-like id's and so does zebra when using "show ip ospf *"
commands.
You can still enter id's in decimal format, but they are just shown in
address format.
paul [Sat, 19 Apr 2003 00:11:28 +0000 (00:11 +0000)]
From: Israel Keys <ikeys@agile.tv>
Subject: [zebra 18677] zebra initialisation bug and patch
Hi All,
I have found a bug in zebra that prevents its routing table and
interface database from being initialised properly. The problem occurs
when a request is made via the netlink socket but the kernel produces a
EWOULDBLOCK/EAGAIN when the result is trying to be retrieved via a
recvmsg(). Zebra does not do anything about this and continues to
function (with an empty routing table and interface list) as if nothing
has happened. With no such information the routing protocol dosn't work!
Two functions are called during the initialisation of Zebra:
interface_lookup_netlink() and netlink_route_read() - obtaining the
interfaces and routing table from the kernel respectively. These are the
only time these functions are called.
These functions, interface_lookup_netlink() and netlink_route_read(),
use netlink_parse_info() to recieve the data from the netlink socket.
The problem is, netlink_parse_info() returns (without error) when its
call to recvmsg() results in an errno EWOULDBLOCK/EAGAIN. This behaviour
is expected by other funtions calling netlink_parse_info() -
netlink_parse_info is simply recalled at a later stage. However, on
initialisation it is never recalled.
Since zebra is expected to nothing else during initialisation it was
easiest to temporarily change the netlink socket to BLOCK and wait
indefinently until the kernel responds with the required information.
Attached is a patch with these changes.
Comments and questions are welcome.
Please inform me if this patch is added to the Zebra source.
paul [Sun, 13 Apr 2003 20:20:53 +0000 (20:20 +0000)]
Author: amir
Date: 2003-04-10 14:32:31 +0200 (Thu, 10 Apr 2003)
New Revision: 212
Modified:
zebra-ag/trunk/ospfd/ospf_lsa.c
Log:
I've fixed a small opaque lsa bug which got triggered when deleting opaque
lsa of type 11. It used area->ospf->.. when area was null. This was replaced
by a ospf = ospf_lookyp(); ospf->...