paul [Sun, 15 Jun 2003 01:28:29 +0000 (01:28 +0000)]
2003-06-15 Paul Jakma <paul@dishone.st>
* 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().
paul [Thu, 12 Jun 2003 02:13:45 +0000 (02:13 +0000)]
2003-06-12 Paul Jakma <paul@dishone.st>
* zebra/ioctl.c: Properly zero-out struct ifreq before passing it
to the SIOCSIFFLAGS ioctl(2), so that it doesn't
occasionally trigger promisc mode on interface.
Reported/tested by: Vladimir B. Grebenschikov <vova@sw.ru>
paul [Sat, 7 Jun 2003 01:10:00 +0000 (01:10 +0000)]
From: Andrew J. Schorr <aschorr@telemetry-investments.com>
Subject: [zebra 12403] patch for ripd to accept any version of RIP
by default
The default Cisco IOS behavior is to send RIP version 1 packets and receive
version 1 and version 2 packets. But zebra version 0.92a sends and receives
only version 2 packets by default.
I have patched the code to change zebra's default behavior to sending
version 2 packets (same as before) but receiving both versions. While
this is still not identical to Cisco's behavior, it does now accept
packets of both versions and retains backwards compatibility with
zebra configurations.
paul [Sat, 7 Jun 2003 01:04:45 +0000 (01:04 +0000)]
From: Andrew J. Schorr <aschorr@telemetry-investments.com>
Subject: [zebra 12406] patch for ripd to support "passive-interface
default" behavior
In Cisco IOS, the router rip passive-interface subcommand can accept
an interface name of "default". In that cases, all interfaces are set
to be passive by default, and you must explicitly make it non-passive
by using the "no passive-interface <ifname>" command if you want updates
to go to that interface.
paul [Sat, 7 Jun 2003 00:12:15 +0000 (00:12 +0000)]
2003-06-07 Paul Jakma <paul@dishone.st>
* (zebra/rtadvc.): can not set checksum for ICMPV6, see:
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
Subject: [zebra 11052] setsockopt(IPV6_CHECKSUM) does not work for ICMPv6
socket
setsockopt(IPV6_CHECKSUM) does not work for ICMPv6 socket.
RFC2292 may not be clear enough about it (it talks about raw socket
and ICMPv6 socket mixed up), but the next revision
(draft-ietf-ipngwg-rfc2292bis-02.txt) is very clear about it.
> An attempt to set IPV6_CHECKSUM for an ICMPv6 socket will fail.
paul [Wed, 4 Jun 2003 11:01:45 +0000 (11:01 +0000)]
2003-06-04 Paul Jakma <paul@dishone.st>
* (configure.in): removed
* (configure.ac): Fixes/cleanups backported from zprivs branch
AC_DEFINE templates added,
Indentation of nested macros,
IPv6 checks changed from independent if..fi blocks to
if...elif...fi.,
Merge piddir and ac_sockdir into one ac_statedir,
Remove world writeable dirs as candidates for ac_statedir,
ERROR out if no state dir is found or --localstatedir not
specified,
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.