paul [Sun, 22 Jun 2003 08:22:18 +0000 (08:22 +0000)]
2003-06-19 Paul Jakma <paul@dishone.st>
* ospf_lsa.c (router_lsa_flags): Set the correct flags for
router-lsa's. Eg OSPF_FLAG_ASBR is /not/ an LSA flag, its an
internal ospfd flag (just happens to have same value as
ROUTER_LSA_EXTERNAL). Set ROUTER_LSA_EXTERNAL for ASBRs,
ROUTER_LSA_BORDER for ABRs and ROUTER_LSA_NT for NSSA ABRs which
are OSPF_NSSA_ROLE_ALWAYS translators.
* ospf_interface.c (ospf_vl_set_params): new router LSA is not
generated when the cost of the routing entry for the virtual
link endpoint has changed. If the cost to reach the virtual link's
endpoint has changed, add router LSA timer for the backbone area.
paul [Fri, 20 Jun 2003 01:18:07 +0000 (01:18 +0000)]
2003-06-20 Paul Jakma <paul@dishone.st>
* *.texi: update the docs a bit. Add some info about
zebra.dishone.st in the overview. Add link-detect and update
static routes section in zebra. Add write-config in vtysh. Update
version handling and add passive-interface default for ripd.
paul [Thu, 19 Jun 2003 02:18:02 +0000 (02:18 +0000)]
2003-06-19 Paul Jakma <paul@dishone.st>
* ospf6d/ospf6_message.c: Change memcpy() to strcpy() to prevent
copying of extraneous junk - suggested by Anil Madhavapeddy
<anil@recoil.org> on bug-zebra@gnu.org.
paul [Thu, 19 Jun 2003 01:41:37 +0000 (01:41 +0000)]
2003-06-19 Vladimir Ivaschenko <hazard@francoudi.com>
* 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.
paul [Thu, 19 Jun 2003 01:07:40 +0000 (01:07 +0000)]
2003-06-19 Paul Jakma <paul@dishone.st>
* ospfd/ospf_packet.c: Fix typos, extra squiggly bracket. Note to
self: in future make sure that when you test compile a change you
actually have the relevant configure options enabled.
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... ;->