]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
14 years agoripd: fix compiler warnings
Stephen Hemminger [Thu, 10 Dec 2009 16:16:05 +0000 (19:16 +0300)]
ripd: fix compiler warnings

* ripd/rip_interface.c
  * rip_request_neighbor(): comment out, unused
  * rip_request_neighbor_all(): idem
  * rip_interface_up(): Cast flags otherwise compiler complains
    about %lld not matching uint64_t on 64 bit x86. Print in hex
    since flags are bit field.
  * rip_interface_add(): idem
  * rip_interface_delete(): idem
* ripd/rip_zebra.c
  * rip_redistribute_set(): comment out, unused
* ripd/ripd.h
  * rip_redistribute_check(): move prototype here so compiler
    can check function against prototype
* ripd/ripd.c
  * rip_update_default_metric(): comment out, unused

14 years agoospf6d: remove dead code
Stephen Hemminger [Thu, 10 Dec 2009 13:18:41 +0000 (16:18 +0300)]
ospf6d: remove dead code

* ospf6d/ospf6_interface.c
  * loopind(): sayonara
* ospf6d/ospf6_top.c
  * ospf6_delete(): comment out, it might be useful if real shutdown is
    added

14 years agoospf6d: fix warnings from recent prefix bit commit
Stephen Hemminger [Thu, 10 Dec 2009 13:13:09 +0000 (16:13 +0300)]
ospf6d: fix warnings from recent prefix bit commit

* lib/prefix.h
  * prefix6_bit(): add IPv6 wrapper for prefix_bit()
* ospf6d/ospf6_lsdb.c
  * ospf6_lsdb_type_router_head(): employ prefix6_bit()
  * ospf6_lsdb_type_head(): idem

14 years agoripngd: compiler warnings cleanup
Stephen Hemminger [Thu, 10 Dec 2009 12:52:33 +0000 (15:52 +0300)]
ripngd: compiler warnings cleanup

* ripngd/ripng_interface.c
  * ripng_check_max_mtu(): unused, sayonara
  * ripng_interface_down(): cast flag arguments to logging function
  * ripng_interface_add(): idem
  * ripng_interface_delete(): idem
* ripngd/ripngd.c
  * ripng_recv_packet(): avoid aliasing warning dereferencing pointer

14 years agozebra: deal with irdp compile warnings
Stephen Hemminger [Thu, 10 Dec 2009 11:22:44 +0000 (14:22 +0300)]
zebra: deal with irdp compile warnings

* zebra/irdp.h
  * irdp_send_thread(): move prototype to common header file
  * irdp_advert_off(): idem
  * process_solicit(): idem
  * irdp_read_raw(): idem
  * send_packet(): idem
* zebra/irdp_interface.c
  * inet_2a(): move function to where it is used
  * in_cksum(): lib/checksum.h already provides prototype
  * irdp_send_thread(): prototype moved away
  * inet_2a(): idem
  * irdp_advert_off(): idem
  * b1, b2, b3, b4: get rid of global buffers for inet_2a()
  * if_group(): add local buffer for inet_2a()
  * if_add_group(): idem
  * if_drop_group(): idem
  * irdp_config_write(): idem
  * Adv_new(): make static
* zebra/irdp_main.c
  * irdp_read_raw(): prototype moved away
  * send_packet(): idem
  * in_cksum(): lib/checksum.h already provides prototype
  * inet_2a(): function moved to irdp_interface.c
* zebra/irdp_packet.c
  * b1, b2, b3, b4: get rid of global buffers for inet_2a()
  * in_cksum(): lib/checksum.h already provides prototype
  * process_solicit(): prototype moved away
  * irdp_read_raw(): fix uninitialized variable

14 years agobgpd: compile warnings cleanup
Stephen Hemminger [Thu, 10 Dec 2009 08:57:05 +0000 (11:57 +0300)]
bgpd: compile warnings cleanup

* bgpd/bgp_fsm.c
  * bgp_clearing_completed(): only used in one file, can be static
* bgpd/bgp_packet.c
  * afi2str(): sayonara
  * safi2str(): sayonara
* bgpd/bgp_route.c
  * bgp_distance_reset(): sayonara
* bgpd/bgp_zebra.c
  * bgp_ifindex_by_nexthop(): sayonara

14 years agozebra: cleanup RIB meta queue code
Stephen Hemminger [Wed, 9 Dec 2009 14:54:49 +0000 (17:54 +0300)]
zebra: cleanup RIB meta queue code

* zebra/zebra_rib.c
  * rib_queue_add(): indent comments and simplify debug code
  * rib_queue_init(): remove unneeded assert() calls and
    extra return statements

14 years agolib: move check_bit into prefix common code
Stephen Hemminger [Wed, 9 Dec 2009 11:43:17 +0000 (14:43 +0300)]
lib: move check_bit into prefix common code

Make one version of check prefix bit, and put it inline
with proper prototype. This gets rid of some macro's and also some
assert() that can never happen on a non-broken compiler.

* bgpd/bgp_table.c
  * CHECK_BIT(): sayonara
  * check_bit(): sayonara
  * SET_LINK(): sayonara
  * set_link(): make use of prefix_bit() instead of check_bit()
  * bgp_node_match(): idem
  * bgp_node_lookup(): idem
  * bgp_node_get(): idem
* lib/prefix.h
  * prefix_bit(): new inline version of check_bit()
* lib/table.c
  * CHECK_BIT(): sayonara
  * check_bit(): sayonara
  * SET_LINK(): sayonara
  * set_link(): make use of prefix_bit() instead of check_bit()
  * route_node_match(): idem
  * route_node_lookup(): idem
  * route_node_get(): idem
* ospf6d/ospf6_lsdb.c
  * CHECK_BIT(): sayonara
  * ospf6_lsdb_lookup_next(): make use of prefix_bit() instead of
    CHECK_BIT()
  * ospf6_lsdb_type_router_head(): idem
  * ospf6_lsdb_type_head(): idem
* ospf6d/ospf6_route.c
  * CHECK_BIT(): sayonara
  * ospf6_route_match_head() make use of prefix_bit() instead of
  * CHECK_BIT()

14 years agolib: fix warning on little endian
Stephen Hemminger [Wed, 9 Dec 2009 11:13:27 +0000 (14:13 +0300)]
lib: fix warning on little endian

* md5.c
  * md5_calc(): If building on little endian then X
    will be 'const uint32_t' which causes compiler
    warning in code that never gets used. Just move
    the endif to make sure code is not checked.

14 years agozebra: fix more warnings in rtadv
Stephen Hemminger [Tue, 8 Dec 2009 10:26:14 +0000 (13:26 +0300)]
zebra: fix more warnings in rtadv

* zebra/rtadv.c
  * rtadv_free(): remove unused function
  * rtadv_recv_packet(): break up cast/dereference to avoid
    compiler type pun warning
  * rtadv_read(): initialize ifindex, because compiler can't
    figure out that it is okay

14 years agoMerge branch 'master' of ssh://code.quagga.net/var/lib/git/quagga
Denis Ovsienko [Tue, 8 Dec 2009 10:15:12 +0000 (13:15 +0300)]
Merge branch 'master' of ssh://code.quagga.net/var/lib/git/quagga

14 years agozebra: fix more compiler warnings
Stephen Hemminger [Tue, 8 Dec 2009 10:14:27 +0000 (13:14 +0300)]
zebra: fix more compiler warnings

* zebra/zebra_rib.c
  * nexthop_active_update(): make local int vars unsigned
  * nexthop_active_check(): return unsigned for consistency
  * rib_dump(): cast time in printf format
  * vrf_free(): remove unused function
  * vrf_lookup_by_name(): idem
  * rib_if_up(): idem
  * rib_if_down(): idem

14 years agozebra: remove unused function to fix warning
Stephen Hemminger [Tue, 8 Dec 2009 09:27:02 +0000 (12:27 +0300)]
zebra: remove unused function to fix warning

* zebra/interface.c
  * if_supported_family(): sayonara

14 years agolib: make match functions take const args
Stephen Hemminger [Tue, 8 Dec 2009 09:00:50 +0000 (12:00 +0300)]
lib: make match functions take const args

* table.c: general type safety and compiler help:
  * maskbit[]: become const
  * route_node_match(): take const args
  * route_node_match_ipv4(): idem
  * route_node_match_ipv6(): idem
  * check_bit(): idem, plus adjust local vars typing

14 years agolib: remove unused function: route_dump_node()
Denis Ovsienko [Mon, 7 Dec 2009 16:19:13 +0000 (19:19 +0300)]
lib: remove unused function: route_dump_node()

14 years agolib: log source of vty connections (bug #566)
heasley [Mon, 7 Dec 2009 13:41:14 +0000 (16:41 +0300)]
lib: log source of vty connections (bug #566)

heasley: I've used this for a while to track usage.

14 years agoospf6d: review LSA sequence number comparison
Ondrej Zajicek [Mon, 7 Dec 2009 09:33:20 +0000 (12:33 +0300)]
ospf6d: review LSA sequence number comparison

It seems that there is a bug in ospf6d in ospf6_lsa_compare(): If LSA A
has sequence number smaller than 0x80000000 and LSA B has sequence
number larger than 0x80000000, ospf6_lsa_compare() returns that B is
more recent than A, although RFC says that sequence numbers should be
compared as signed numbers (0x8000001 smallest and 0x7FFFFFFF largest).

In ospfd, the function ospf_lsa_more_recent() has it right.

The problem appears when Quagga is used together with OSPFv3 in
development version of BIRD daemon ( http://bird.network.cz/ ),
which creates LSAs with maximum sequence number (0x7FFFFFFF)
as a part of flushing/premature aging LSA from OSPF area.

Because both daemons has different idea of which LSA instance
is more recent, it would lead to LSA storm.

14 years agobgpd: work around warning in assegments_parse()
Denis Ovsienko [Fri, 4 Dec 2009 14:32:54 +0000 (17:32 +0300)]
bgpd: work around warning in assegments_parse()

14 years agozebra: handle RTF_CLONING removal from FreeBSD 8.0
David Ward [Thu, 3 Dec 2009 18:43:11 +0000 (21:43 +0300)]
zebra: handle RTF_CLONING removal from FreeBSD 8.0

The RTF_CLONING flag has been removed in FreeBSD 8.0 with arp-v2 (see
http://svn.freebsd.org/viewvc/base/stable/8/UPDATING?view=markup),
since it no longer has any meaning. This patch checks if RTF_CLONING
exists before using it.

14 years agoisisd: fix --enable-isis-topology for 64-bit Linux
David Ward [Thu, 3 Dec 2009 18:24:36 +0000 (21:24 +0300)]
isisd: fix --enable-isis-topology for 64-bit Linux

14 years agozebra: fix argument reference in strncpy() call for BSD
heasley [Thu, 3 Dec 2009 18:14:16 +0000 (21:14 +0300)]
zebra: fix argument reference in strncpy() call for BSD

14 years agoisisd: fix BPF ioctl() calls, treat "true" and "false" as reserved
David Ward [Thu, 3 Dec 2009 17:44:35 +0000 (20:44 +0300)]
isisd: fix BPF ioctl() calls, treat "true" and "false" as reserved

Avoid a potential conflict with the C99 defines 'true' and 'false'
found in <stdbool.h> by choosing better variable names.

Also fix the calls to these ioctls, as described in <net/bpf.h>
in FreeBSD, NetBSD, and OpenBSD:

* BIOCGBLEN, BIOCIMMEDIATE, BIOCSSEESENT (the parameter should be
of type 'u_int')

* BIOCPROMISC (there should be no parameters)

14 years agoconfigure: fix spelling
David Ward [Thu, 3 Dec 2009 17:22:47 +0000 (20:22 +0300)]
configure: fix spelling

14 years agoospfd: VTY strings cleanup
Stephen Hemminger [Thu, 3 Dec 2009 16:25:04 +0000 (19:25 +0300)]
ospfd: VTY strings cleanup

Several bits of text can be local or are unused.

14 years agoospfd: comment out unused function
Stephen Hemminger [Thu, 3 Dec 2009 16:18:26 +0000 (19:18 +0300)]
ospfd: comment out unused function

14 years agoospfd: make local functions static
Stephen Hemminger [Thu, 3 Dec 2009 16:07:00 +0000 (19:07 +0300)]
ospfd: make local functions static

This code is only used one place and can be made local.
Gcc is smart enough to inline local functions if it wants to.

The function also  has a big chunk of compatiablity code that
is no longer used; since quagga is now in a version control system
the source does not need to be used as a historical reference.

14 years agozebra: fix RIB debug message for IPv6
David Ward [Thu, 3 Dec 2009 12:34:39 +0000 (15:34 +0300)]
zebra: fix RIB debug message for IPv6

Apply changes from commit f304cb48f0d7d0ff8f36e7aca8293141a9fa9e60
to rib_queue_add.

Also includes spelling fixes.

14 years agozebra: make declaration const in rtm_flag_dump()
Tom Goff [Thu, 3 Dec 2009 11:53:15 +0000 (14:53 +0300)]
zebra: make declaration const in rtm_flag_dump()

* kernel_socket.c: (rtm_flag_dump) Use a const message pointer to be
in sync with commit ce0db9cb11c0bc2e7f89a7d042e50afa495556b4.

14 years agoospf6d: fix LSA locking in ospf6_new_ls_id()
Tom Goff [Tue, 1 Dec 2009 18:12:38 +0000 (21:12 +0300)]
ospf6d: fix LSA locking in ospf6_new_ls_id()

* ospf6_lsdb.c: (ospf6_new_ls_id) Unlock the current LSA when breaking
out of the ospf6_lsdb_*_head() / ospf6_lsdb_*_next() loop early. No
explicit unlocking is needed when all LSAs are looped through
because ospf6_lsdb_*_next() manages everything in that case.

14 years agoconfigure: fix HAVE_CLOCK_MONOTONIC spelling
Dmitry Tejblum [Thu, 5 Nov 2009 13:50:36 +0000 (16:50 +0300)]
configure: fix HAVE_CLOCK_MONOTONIC spelling

15 years ago[ospfd] enable more OSPF cost command aliases
Denis Ovsienko [Mon, 28 Sep 2009 15:34:59 +0000 (19:34 +0400)]
[ospfd] enable more OSPF cost command aliases

The following syntax forms were not historically supported
by Quagga, although IOS accepted them w/o a problem:

no ip ospf cost <1-65535>
no ospf cost <1-65535>
no ip ospf cost <1-65535> A.B.C.D
no ospf cost <1-65535> A.B.C.D

From now on Quagga also supports these variants.

15 years agozebra: Fix router advertisements for non-Ethernet link layer addresses
David Ward [Mon, 31 Aug 2009 14:42:06 +0000 (10:42 -0400)]
zebra: Fix router advertisements for non-Ethernet link layer addresses

* rtadv.c: round up when calculating the link-layer address option length;
  add padding to the option if needed to end on an octet boundary

15 years agorelease: 0.99.15
Paul Jakma [Fri, 28 Aug 2009 18:16:31 +0000 (19:16 +0100)]
release: 0.99.15

* configure.ac: Bump to 0.99.15

15 years agoospf6d: bug #529, fix endianness problem in earlier commit
Tom Henderson [Fri, 28 Aug 2009 14:10:00 +0000 (15:10 +0100)]
ospf6d: bug #529, fix endianness problem in earlier commit

* ospf6_lsa.c: (ospf6_lsa_age_current) arithmetical compares make no sense
  in non-host order..

15 years agobgpd: fix md5 set on listen sockets
Stephen Hemminger [Tue, 25 Aug 2009 17:18:15 +0000 (10:18 -0700)]
bgpd: fix md5 set on listen sockets

* bgp_network.c: (bgp_md5_set) Missing piece from earlier listener change
  did not get ported from Vyatta code into upstream.  The list
  listener_sockets changed from (int *) to (struct bgp_listener *).

15 years agolib/trivial: str2prefix checks return of inet_pton in fragile way
Paul Jakma [Sat, 8 Aug 2009 19:41:39 +0000 (20:41 +0100)]
lib/trivial: str2prefix checks return of inet_pton in fragile way

* prefix.c: (str2prefix_ipv6) inet_pton succesful return is presumed to be
  1, rather than the "not zero" the man page describes - seemed fragile.

15 years agozebra: Add an example config file for testzebra
Paul Jakma [Thu, 6 Aug 2009 11:12:12 +0000 (12:12 +0100)]
zebra: Add an example config file for testzebra

* testrib.conf: Example config file for testzebra

15 years agozebra: test_main.c should be a bit more helpful about its usage
Paul Jakma [Thu, 6 Aug 2009 10:48:48 +0000 (11:48 +0100)]
zebra: test_main.c should be a bit more helpful about its usage

* test_main.c: If required arguments are missing, say that.

15 years agolib: if_lookup_by_name should be more robust to null argument
Paul Jakma [Thu, 6 Aug 2009 11:08:50 +0000 (12:08 +0100)]
lib: if_lookup_by_name should be more robust to null argument

* if.c: (if_lookup_by_name) shouldn't crash just cause we got a NULL name

15 years agoospfd: Make sure priority is respected.
Joakim Tjernlund [Sat, 22 Aug 2009 12:57:54 +0000 (14:57 +0200)]
ospfd: Make sure priority is respected.

* ospf_ism.c (ospf_dr_eligible_routers) should test for priority > 0 instead
  of != 0 as ospf_nbr_new () initially sets prio to -1

15 years agoospfd: Tighten up the connected check for redistribution
Joakim Tjernlund [Fri, 7 Aug 2009 11:48:15 +0000 (13:48 +0200)]
ospfd: Tighten up the connected check for redistribution

* ospf_zebra.c: (ospf_distribute_check_connected) check to make filter out
  routes matching connected routes was matching against OSPF networks, which
  can be far more general than the actual connected interfaces. Fix.

15 years agoall: check return value from daemon() call
Stephen Hemminger [Fri, 7 Aug 2009 18:13:49 +0000 (11:13 -0700)]
all: check return value from daemon() call

* */*main.c: (main) Current versions of Gcc warn if the return value for
  daemon() is not checked.  So add a simple test and exit on failure.

15 years agobgp: missing pieces from listener patch
Stephen Hemminger [Fri, 7 Aug 2009 04:05:47 +0000 (21:05 -0700)]
bgp: missing pieces from listener patch

* bgp_network.c: (bgp_accept) The code in current git will crash as part of
  the revised listener code is missing.  The new listener thread code passes
  a pointer to a bgp_listener structure, not the bgp pointer.  The old code
  always got a NULL for bgp pointer, so that is now hard coded.

15 years agobgp: compiler warning fix
Stephen Hemminger [Fri, 7 Aug 2009 04:07:23 +0000 (21:07 -0700)]
bgp: compiler warning fix

* bgp_filter.h: Gcc complains the function prototype is not correct because
  the function argument is using old K&R style.

15 years agoospfd: fix performance problem with redistribute delete
Stephen Hemminger [Thu, 6 Aug 2009 19:58:05 +0000 (12:58 -0700)]
ospfd: fix performance problem with redistribute delete

Doing redistribute delete with full BGP table was taking
30 minutes, this drops it down to less than a second.

* ospf_lsa.c: (ospf_lsa_maxage) When flushing lots of entries the
  performance is terrible because it looks up each LSA entry through
  ospf_lsa_maxage_exist before deleting causing O(N^2) performance.  Use a
  new OSPF_LSA_MAXAGE flag instead of scan - and maintain it.
  (ospf_lsa_maxage_exist) removed
  (ospf_lsa_maxage_delete) maintain OSPF_LSA_MAXAGE flag

15 years agoospfd: Make sure route table is recalculated.
Joakim Tjernlund [Mon, 27 Jul 2009 10:42:35 +0000 (12:42 +0200)]
ospfd: Make sure route table is recalculated.

In some cases ospfd does not recalc the route table. This
happens when ospfd receives an old LSA which will trigger
recalc but the this recalc will fail because all interfaces
isn't up yet. Next LSA that is originated matches the old one
so no recalc will be performed. This problem has been observed
when there are only 2 ppp I/Fs in an area, both go down at the
same time, then they come up again with a few seconds apart.

* ospf_lsa.c: (ospf_{router,network}_lsa_install) avoid a needless scheduling
  of SPF.
  (ospf_lsa_different) fix bug in LSA comparison that would lead to the
  described failure to schedule SPF.

15 years agoospfd: Make "Packet ... received on wrong link" conditional on debug
Paul Jakma [Tue, 11 Aug 2009 11:25:42 +0000 (12:25 +0100)]
ospfd: Make "Packet ... received on wrong link" conditional on debug

* ospf_packet.c: make this message conditional on 'debug ospf event', as it
  be easily triggered with, e.g., multiple subnets sharing same physical
  network. E.g, see bug #532.

15 years agobgpd: Fix mistakes in applying 'allow inbound connections to non-default view'
Paul Jakma [Wed, 5 Aug 2009 15:25:16 +0000 (16:25 +0100)]
bgpd: Fix mistakes in applying 'allow inbound connections to non-default view'

* bgpd.c: (peer_lookup_with_open) Bodged application of previous patch
  meant the second loop around bgp->peer wasn't included in the loop
  around bm->bgp as it was supposed to be. Fix..

15 years agoospfd: neuter some compiler warnings
Paul Jakma [Mon, 3 Aug 2009 15:34:16 +0000 (16:34 +0100)]
ospfd: neuter some compiler warnings

* ospf_lsa.c: (link_info_set) Use %zd for size_t - C99 is old enough now.
  Lots of similar warnings all over the code.
  (ospf_lsa_translated_nssa_compare) Unused func - delete.

15 years agoospfd: update some comments
Paul Jakma [Mon, 3 Aug 2009 14:16:41 +0000 (15:16 +0100)]
ospfd: update some comments

* ospf_{spf,lsa}.c: remove out of date comment; add comment on some
  non-obvious code; Make note of a possible scaling problem.

15 years agoospfd: Change struct ospf_path *oi to ifindex.
Joakim Tjernlund [Mon, 27 Jul 2009 10:42:34 +0000 (12:42 +0200)]
ospfd: Change struct ospf_path *oi to ifindex.

* global: In struct ospf_path, change struct ospf_interface *oi to int
  ifindex.  It is unsafe to reference *oi as an ospf interface can be
  deleted under your feet. Use a weak reference instead.

15 years agoospfd: Discriminate better when selecting links between vertices in SPF
Joakim Tjernlund [Mon, 27 Jul 2009 10:42:31 +0000 (12:42 +0200)]
ospfd: Discriminate better when selecting links between vertices in SPF

* ospf_spf.c: (ospf_get_next_link) One must check the vertex type, Router or
  Network, to select type link to match against.  Link type 1 has neighbour
  router ID in link_id and link type 2 has IP address of DR.  Since router
  id may have same value as an existing IP address one risks matching a
  router ID against a DR.

15 years ago[bgpd] delete erroneous extra brace..
Paul Jakma [Thu, 30 Jul 2009 14:55:24 +0000 (15:55 +0100)]
[bgpd] delete erroneous extra brace..

15 years agobgpd: Workaround for invalid MBGP next hop
Michael Lambert [Tue, 28 Jul 2009 15:26:14 +0000 (11:26 -0400)]
bgpd: Workaround for invalid MBGP next hop

* bgp_attr.c: (bgp_mp_reach_parse) There are some interoperability issues
  for MBGP (particularly IPv4 multicast NLRI) between different
  implementations.  In order to get some next hops to install correctly in
  the BGP tables, it appears to be necessary to copy the multiprotocol next
  hop into the base next hop field.  This is related to differences in RFC
  2283 and RFC 2858.

15 years ago[doc] Update HACKING
Paul Jakma [Tue, 28 Jul 2009 15:04:35 +0000 (16:04 +0100)]
[doc] Update HACKING

* HACKING: Update to reflect git stripping []'s, and to allow for more
  discretion to avoid redundancy in commit messages.

15 years agoospfd: Make ospf_if_lookup_recv_if() find the right unnumbered i/f
Joakim Tjernlund [Mon, 27 Jul 2009 10:42:30 +0000 (12:42 +0200)]
ospfd: Make ospf_if_lookup_recv_if() find the right unnumbered i/f

This function will return the interface for the first matching
remote address for PtP i/f's. That won't work for multiple
unnumbered i/f's as these may all have the same address.

Pass in the struct interface pointer, ifp, to find the
correct set of oi's to search in. This also reduces the
size of the search list, making it faster.

* ospfd/ospf_interface.c: Add struct interface * param to
  ospf_if_lookup_recv_if() to select the right list to search in.
* ospfd/ospf_interface.h: ditto.
* ospfd/ospf_packet.c: Pass new ifp argument to ospf_if_lookup_recv_if()

15 years agoospfd: export ospf_if_table_lookup() and use it in ospf_network_run_interface()
Joakim Tjernlund [Mon, 27 Jul 2009 10:42:29 +0000 (12:42 +0200)]
ospfd: export ospf_if_table_lookup() and use it in ospf_network_run_interface()

Makes it possible to run OSPF on multiple PtP interfaces
with the same remote address.

* ospfd/ospf_interface.c: Export ospf_if_table_lookup().
* ospfd/ospf_interface.h: ditto.
* ospfd/ospfd.c: (ospf_network_run_interface) Use ospf_if_table_lookup() to
  determine whether OSPF is already configured for a subnet and interface.

15 years agobgpd/trivial: Fix indentation in previous
Paul Jakma [Tue, 28 Jul 2009 17:10:55 +0000 (18:10 +0100)]
bgpd/trivial: Fix indentation in previous

15 years agobgpd: Allow inbound connections to non-default view
Steve Hill [Tue, 28 Jul 2009 16:54:35 +0000 (17:54 +0100)]
bgpd: Allow inbound connections to non-default view

* bgpd.c: (peer_lookup) Search through all BGP instances for matches, not just
  the default instance, if no specific instance is given.
  (peer_lookup_with_open) same.

15 years agobgpd: fd leak in bgpd
Steve Hill [Tue, 28 Jul 2009 16:50:00 +0000 (17:50 +0100)]
bgpd: fd leak in bgpd

* bgp_fsm.c: I have found an fd leak in bgpd that is caused by the 'new'
  Clearing state.  I've been seeing it from hold timer failures, but it can
  also be triggered by other things.

  When Hold_Timer_expired fires in Established state, a notify is sent and
  BGP_Stop event queued.  The fsm then transitions into Clearing state.
  That is the problem; When the BGP_Stop event is serviced, the state table
  says to ignore it while in Clearing.  Thus bgp_stop is not called and the
  fd leaks.  Previously the peer would be in Idle state, which correctly
  handles the BGP_Stop event.

  Fix by making bgp_stop safe to call from Clearing state, without losing
  ClearingCompleted events, and then ensuring it is called prior to
  transition from Clearing->Idle.

15 years ago[zebra] Fix crash in test_zebra
Paul Jakma [Sat, 19 Apr 2008 23:31:57 +0000 (00:31 +0100)]
[zebra] Fix crash in test_zebra

* kernel_null.c: we're pretending to add an address, so
  set IFC_REAL. If this isn't done, calling into the 'got address
  from kernel' half of zebra will implicitly-withdraw the ifc, which
  could cause a crash in test_zebra.c.

15 years agoMerge remote branch 'origin/master'
Paul Jakma [Tue, 28 Jul 2009 15:06:45 +0000 (16:06 +0100)]
Merge remote branch 'origin/master'

15 years agobgpd: Delete AS_CONFED_SEQUENCE when prepending an AS_SEQUENCE type segment
Vasilis Tsiligiannis [Sun, 19 Jul 2009 22:59:10 +0000 (01:59 +0300)]
bgpd: Delete AS_CONFED_SEQUENCE when prepending an AS_SEQUENCE type segment

AS_CONFED_SEQUENCE segment should always be deleted when prepending
(e.g. with a route-map) an AS_SEQUENCE segment to an AS path. Otherwise,
AS_CONFED_SEQUENCE will not be deleted later when updating EBGP peers (since
it is not the leftmost segment) and will leak outside the confederation.

15 years agobgpd: Implement BGP confederation error handling (RFC5065, Par. 5)
Vasilis Tsiligiannis [Sun, 19 Jul 2009 22:28:35 +0000 (01:28 +0300)]
bgpd: Implement BGP confederation error handling (RFC5065, Par. 5)

This patch implements BGP confederation error handling in Quagga as described
in RFC5065, paragraph 5.

* bgp_aspath.c: (aspath_confed_check, aspath_left_confed_check) new functions
* bgp_attr.c: (bgp_attr_aspath_check) apply previous and NOTIFY if there's
  a problem.

15 years ago[global] interface flags format warnings
Stephen Hemminger [Tue, 28 Jul 2009 10:58:51 +0000 (11:58 +0100)]
[global] interface flags format warnings

*/*: ifp->flags is 64 bit unsigned which can not be handled by %l on 32
     bit architectures - requires %ll and the appropriate cast.

15 years agobgpd: start listener on first instance
Stephen Hemminger [Tue, 21 Jul 2009 23:27:21 +0000 (16:27 -0700)]
bgpd: start listener on first instance

Start BGP listener only after first instance is started.  This helps the
security if BGP is not used but daemon is started.  It also addresses some
issues like MD5 not working on listener unless IPV6 configured (because
listener was not in list); as well as compiler warnings.

* bgp_network.c: (bgp_listener) listen socket creation consolidated here
  (bgp_socket) Use bgp_listener
* bgpd.c: (bgp_get) call bgp_socket on creation of first struct bgp.
  (bgp_init) remove bgp_socket call.
* memtypes.c: Add MTYPE_BGP_LISTENER

15 years agobgpd: peer action table static/const
Stephen Hemminger [Tue, 21 Jul 2009 23:27:20 +0000 (16:27 -0700)]
bgpd: peer action table static/const

bgpd.c: (various tables) only used in one place and are immutable.

15 years agoripd: set IP TOS for control socket
Stephen Hemminger [Tue, 21 Jul 2009 23:27:26 +0000 (16:27 -0700)]
ripd: set IP TOS for control socket

* ripd.c: (rip_create_socket) RIP packets should go out with Type Of Service
  (DSCP) set to Internet control (like OSPF and BGP).

15 years ago[bgpd] Restore ability of 'neighbor ... update-source' to take interface name
Paul Jakma [Mon, 27 Jul 2009 11:27:55 +0000 (12:27 +0100)]
[bgpd] Restore ability of 'neighbor ... update-source' to take interface name

* bgp_vty.c: (BGP_UPDATE_SOURCE_STR) Restore ability to accept arbitrary
  interface names for the 'neighbor ... update-source' command - shouldn't
  have been deleted.
  (BGP_UPDATE_SOURCE_STR) Add help for same.

15 years ago[zebra] do not touch socket before pidfile locking
Denis Ovsienko [Fri, 24 Jul 2009 16:45:31 +0000 (20:45 +0400)]
[zebra] do not touch socket before pidfile locking

Move zserv socket creation code into zebra_zserv_socket_init() and
call it only after pidfile lock has been acquired exclusively. This
keeps subsequent zebra daemons from deleting the working socket of
an already running process (bug #403).

15 years ago[doc] zebra.8 via Christian Hammers (#531)
Thijs Kinkhorst [Tue, 21 Jul 2009 15:24:29 +0000 (19:24 +0400)]
[doc] zebra.8 via Christian Hammers (#531)

The man page for zebra(8) mentions as port number to connect to 2602,
but it's acutally 2601 (as shown in /etc/services). 2602 belongs to ripd.
Attached patch fixes this typo.

15 years ago[build] Bump release to 0.99.14
Paul Jakma [Tue, 21 Jul 2009 14:21:20 +0000 (15:21 +0100)]
[build] Bump release to 0.99.14

15 years ago[bgp] Fix nexthop reachability check on confederations
Vasilis Tsiligiannis [Sun, 19 Jul 2009 22:25:16 +0000 (01:25 +0300)]
[bgp] Fix nexthop reachability check on confederations

* bgp_route.c: (bgp_update_main) Nexthop reachability should be checked for
  confederations too in case a prefix is received from more than one
  confederation peers.

15 years ago[bgpd] fix typo made by paul in previous commit
Paul Jakma [Tue, 21 Jul 2009 13:02:04 +0000 (14:02 +0100)]
[bgpd] fix typo made by paul in previous commit

15 years ago[bgpd] Avoid zombie accepted peer entries
Timo Teräs [Tue, 17 Feb 2009 10:14:23 +0000 (12:14 +0200)]
[bgpd] Avoid zombie accepted peer entries

Currently, when accepting the connection, it can be left as zombie, when the
peer just initiates a connection, but never sends data (and the TCP
connection end packets are lost).  This happens because for accepted
connections a temporary new peer entry is created until OPEN message is
exchanged, and this temporary peer entry does not get the hold time
parameter set at all.

* bgp_network.c: (bgp_accept) Set hold time and keepalive values for ACCEPT
  peers.

15 years ago[bgpd] Small buffer overrun in bgp_clear_node_queue_init
Nick Hilliard [Tue, 17 Mar 2009 22:14:25 +0000 (22:14 +0000)]
[bgpd] Small buffer overrun in bgp_clear_node_queue_init

* bgp_route.c: (bgp_clear_node_queue_init) fix buffer
  overrun.

15 years ago[zebra] Silence noisy process_subq
Chris Caputo [Sat, 18 Jul 2009 04:02:26 +0000 (04:02 +0000)]
[zebra] Silence noisy process_subq

zebra_rib.c: process_subq(): #ifdef out debug code.

15 years ago[bgpd] Stability fixes including bugs 397, 492
Chris Caputo [Sat, 18 Jul 2009 05:44:03 +0000 (05:44 +0000)]
[bgpd] Stability fixes including bugs 397, 492

I've spent the last several weeks working on stability fixes to bgpd.
These patches fix all of the numerous crashes, assertion failures, memory
leaks and memory stomping I could find.  Valgrind was used extensively.

Added new function bgp_exit() to help catch problems.  If "debug bgp" is
configured and bgpd exits with status of 0, statistics on remaining
lib/memory.c allocations are printed to stderr.  It is my hope that other
developers will use this to stay on top of memory issues.

Example questionable exit:

  bgpd: memstats: Current memory utilization in module LIB:
  bgpd: memstats:  Link List                     :          6
  bgpd: memstats:  Link Node                     :          5
  bgpd: memstats:  Hash                          :          8
  bgpd: memstats:  Hash Bucket                   :          2
  bgpd: memstats:  Hash Index                    :          8
  bgpd: memstats:  Work queue                    :          3
  bgpd: memstats:  Work queue item               :          2
  bgpd: memstats:  Work queue name string        :          3
  bgpd: memstats: Current memory utilization in module BGP:
  bgpd: memstats:  BGP instance                  :          1
  bgpd: memstats:  BGP peer                      :          1
  bgpd: memstats:  BGP peer hostname             :          1
  bgpd: memstats:  BGP attribute                 :          1
  bgpd: memstats:  BGP extra attributes          :          1
  bgpd: memstats:  BGP aspath                    :          1
  bgpd: memstats:  BGP aspath str                :          1
  bgpd: memstats:  BGP table                     :         24
  bgpd: memstats:  BGP node                      :          1
  bgpd: memstats:  BGP route                     :          1
  bgpd: memstats:  BGP synchronise               :          8
  bgpd: memstats:  BGP Process queue             :          1
  bgpd: memstats:  BGP node clear queue          :          1
  bgpd: memstats: NOTE: If configuration exists, utilization may be expected.

Example clean exit:

  bgpd: memstats: No remaining tracked memory utilization.

This patch fixes bug #397: "Invalid free in bgp_announce_check()".

This patch fixes bug #492: "SIGBUS in bgpd/bgp_route.c:
bgp_clear_route_node()".

My apologies for not separating out these changes into individual patches.
The complexity of doing so boggled what is left of my brain.  I hope this
is all still useful to the community.

This code has been production tested, in non-route-server-client mode, on
a linux 32-bit box and a 64-bit box.

Release/reset functions, used by bgp_exit(), added to:

  bgpd/bgp_attr.c,h
  bgpd/bgp_community.c,h
  bgpd/bgp_dump.c,h
  bgpd/bgp_ecommunity.c,h
  bgpd/bgp_filter.c,h
  bgpd/bgp_nexthop.c,h
  bgpd/bgp_route.c,h
  lib/routemap.c,h

File by file analysis:

* bgpd/bgp_aspath.c: Prevent re-use of ashash after it is released.

* bgpd/bgp_attr.c: #if removed uncalled cluster_dup().

* bgpd/bgp_clist.c,h: Allow community_list_terminate() to be called from
  bgp_exit().

* bgpd/bgp_filter.c: Fix aslist->name use without allocation check, and
  also fix memory leak.

* bgpd/bgp_main.c: Created bgp_exit() exit routine.  This function frees
  allocations made as part of bgpd initialization and, to some extent,
  configuration.  If "debug bgp" is configured, memory stats are printed
  as described above.

* bgpd/bgp_nexthop.c: zclient_new() already allocates stream for
  ibuf/obuf, so bgp_scan_init() shouldn't do it too.  Also, made it so
  zlookup is global so bgp_exit() can use it.

* bgpd/bgp_packet.c: bgp_capability_msg_parse() call to bgp_clear_route()
  adjusted to use new BGP_CLEAR_ROUTE_NORMAL flag.

* bgpd/bgp_route.h: Correct reference counter "lock" to be signed.
  bgp_clear_route() now accepts a bgp_clear_route_type of either
  BGP_CLEAR_ROUTE_NORMAL or BGP_CLEAR_ROUTE_MY_RSCLIENT.

* bgpd/bgp_route.c:
  - bgp_process_rsclient(): attr was being zero'ed and then
    bgp_attr_extra_free() was being called with it, even though it was
    never filled with valid data.

  - bgp_process_rsclient(): Make sure rsclient->group is not NULL before
    use.

  - bgp_processq_del(): Add call to bgp_table_unlock().

  - bgp_process(): Add call to bgp_table_lock().

  - bgp_update_rsclient(): memset clearing of new_attr not needed since
    declarationw with "= { 0 }" does it.  memset was already commented
    out.

  - bgp_update_rsclient(): Fix screwed up misleading indentation.

  - bgp_withdraw_rsclient(): Fix screwed up misleading indentation.

  - bgp_clear_route_node(): Support BGP_CLEAR_ROUTE_MY_RSCLIENT.

  - bgp_clear_node_queue_del(): Add call to bgp_table_unlock() and also
    free struct bgp_clear_node_queue used for work item.

  - bgp_clear_node_complete(): Do peer_unlock() after BGP_EVENT_ADD() in
    case peer is released by peer_unlock() call.

  - bgp_clear_route_table(): Support BGP_CLEAR_ROUTE_MY_RSCLIENT.  Use
    struct bgp_clear_node_queue to supply data to worker.  Add call to
    bgp_table_lock().

  - bgp_clear_route(): Add support for BGP_CLEAR_ROUTE_NORMAL or
    BGP_CLEAR_ROUTE_MY_RSCLIENT.

  - bgp_clear_route_all(): Use BGP_CLEAR_ROUTE_NORMAL.

  Bug 397 fixes:

    - bgp_default_originate()
    - bgp_announce_table()

* bgpd/bgp_table.h:
  - struct bgp_table: Added reference count.  Changed type of owner to be
    "struct peer *" rather than "void *".

  - struct bgp_node: Correct reference counter "lock" to be signed.

* bgpd/bgp_table.c:
  - Added bgp_table reference counting.

  - bgp_table_free(): Fixed cleanup code.  Call peer_unlock() on owner if
    set.

  - bgp_unlock_node(): Added assertion.

  - bgp_node_get(): Added call to bgp_lock_node() to code path that it was
    missing from.

* bgpd/bgp_vty.c:
  - peer_rsclient_set_vty(): Call peer_lock() as part of peer assignment
    to owner.  Handle failure gracefully.

  - peer_rsclient_unset_vty(): Add call to bgp_clear_route() with
    BGP_CLEAR_ROUTE_MY_RSCLIENT purpose.

* bgpd/bgp_zebra.c: Made it so zclient is global so bgp_exit() can use it.

* bgpd/bgpd.c:
  - peer_lock(): Allow to be called when status is "Deleted".

  - peer_deactivate(): Supply BGP_CLEAR_ROUTE_NORMAL purpose to
    bgp_clear_route() call.

  - peer_delete(): Common variable listnode pn.  Fix bug in which rsclient
    was only dealt with if not part of a peer group.  Call
    bgp_clear_route() for rsclient, if appropriate, and do so with
    BGP_CLEAR_ROUTE_MY_RSCLIENT purpose.

  - peer_group_get(): Use XSTRDUP() instead of strdup() for conf->host.

  - peer_group_bind(): Call bgp_clear_route() for rsclient, and do so with
    BGP_CLEAR_ROUTE_MY_RSCLIENT purpose.

  - bgp_create(): Use XSTRDUP() instead of strdup() for peer_self->host.

  - bgp_delete(): Delete peers before groups, rather than after.  And then
    rather than deleting rsclients, verify that there are none at this
    point.

  - bgp_unlock(): Add assertion.

  - bgp_free(): Call bgp_table_finish() rather than doing XFREE() itself.

* lib/command.c,h: Compiler warning fixes.  Add cmd_terminate().  Fixed
  massive leak in install_element() in which cmd_make_descvec() was being
  called more than once for the same cmd->strvec/string/doc.

* lib/log.c: Make closezlog() check fp before calling fclose().

* lib/memory.c: Catch when alloc count goes negative by using signed
  counts.  Correct #endif comment.  Add log_memstats_stderr().

* lib/memory.h: Add log_memstats_stderr().

* lib/thread.c: thread->funcname was being accessed in thread_call() after
  it had been freed.  Rearranged things so that thread_call() frees
  funcname.  Also made it so thread_master_free() cleans up cpu_record.

* lib/vty.c,h: Use global command_cr.  Add vty_terminate().

* lib/zclient.c,h: Re-enable zclient_free().

15 years ago[bgpd] Fix compiler warnings related to MD5
Chris Caputo [Sat, 18 Jul 2009 05:42:34 +0000 (05:42 +0000)]
[bgpd] Fix compiler warnings related to MD5

This patch fixes:

bgp_network.c: In function 'bgp_md5_set':
bgp_network.c:107: warning: cast from pointer to integer of different size
bgp_network.c: In function 'bgp_socket':
bgp_network.c:447: warning: cast to pointer from integer of different size

15 years ago[build] fix default CFLAGS and squish warning
Paul Jakma [Sun, 19 Jul 2009 16:33:21 +0000 (17:33 +0100)]
[build] fix default CFLAGS and squish warning

* configure.ac: Move down the AC_SYS_LARGEFILE test - it was setting CFLAGS
  and so disabling the default CFLAGS setting section.
  Squish warning by adding AC_CONFIG_MACRO_DIR on the reccommendation of
  autoreconf.

15 years ago[bgpd] Bug #533: Fix crash with copy/pasted commands, inc 'no bgp ...'
Paul Jakma [Thu, 16 Jul 2009 18:27:32 +0000 (19:27 +0100)]
[bgpd] Bug #533: Fix crash with copy/pasted commands, inc 'no bgp ...'

* bgpd.c: Removal of (struct bgp *) from the master list was being left to
  bgp_free time.  This meant there was a window of time between bgp_delete
  and refcounts hitting 0 (e.g.  routes to be processed) where bgp_lookup's
  could return a deleted (struct bgp *).

  (bgp_delete) This is the logical place where a (struct bgp *) should lose
  its visibility, so move the deletion from the bgp-master list to here,
  from bgp_free.

  Many thanks to Fritz Reichmann for his thorough debugging of the problem
  and testing of fixes and Chris Caputo for his further analysis.

15 years ago[lib] Fix IPv6 normalisation
Stephen Hemminger [Sun, 12 Jul 2009 04:27:51 +0000 (21:27 -0700)]
[lib] Fix IPv6 normalisation

* lib/sockunion.c: (sockunion_normalise_mapped) The code to normalize
  address was not copying port value - probably reason why IPV4 in IPV6
  never worked right.

15 years ago[ospf6d] Fix regression in monotonic time patch - LSA max-aging broke
Tom Henderson [Thu, 16 Jul 2009 16:20:37 +0000 (17:20 +0100)]
[ospf6d] Fix regression in monotonic time patch - LSA max-aging broke

* ospf6_lsa.c: (ospf6_lsa_premature_aging) set age to MAX_AGE - don't
  rely on 0 magically meaning same.
  (ospf6_lsa_age_current) handle MAXAGE.

15 years ago[lib/cleanup] Use a typedef for the thread type
Paul Jakma [Tue, 30 Jun 2009 15:12:49 +0000 (16:12 +0100)]
[lib/cleanup] Use a typedef for the thread type

* lib/thread.{c,h}: As per subject. This will avoid head-scratching for next
  person who adds a thread-type and gets strange breakage.

15 years ago[ospfd] Do not use stale Network/Router LSAs
Joakim Tjernlund [Mon, 5 Jan 2009 16:44:46 +0000 (17:44 +0100)]
[ospfd] Do not use stale Network/Router LSAs

Should a self originated Network/Router LSA with higher
LS seq. nr. be received we should flood and install it in
the LSDB but we cannot use it for our internal calculations
as it is stale.
Reorginate an new LSA to replace the stale one as soon
as possible.

15 years ago[bgpd] Log a debug/update warning if filters are configured but don't exist
Paul Jakma [Thu, 25 Jun 2009 17:06:31 +0000 (18:06 +0100)]
[bgpd] Log a debug/update warning if filters are configured but don't exist

* bgp_route.c: (bgp_{input,output}_filter) Log a debug warning if a route is
  received or sent and a filter name is configured for a prefix, as or
  distribute list but none is found - guaranteed configuration mistake.

15 years agoAdd test for Internet checksum.
Joakim Tjernlund [Mon, 1 Dec 2008 15:25:06 +0000 (16:25 +0100)]
Add test for Internet checksum.

Add 2 impl. of the Internet Checksum. One new optimized nad
one form RFC 1071. Turns out that the current Quagga in_cksum()
is buggy. On Big Endian routers it miscalculates odd sized buffers.

15 years ago[ospfd] compare ifIndex too when matching paths
Joakim Tjernlund [Sun, 1 Feb 2009 10:12:11 +0000 (11:12 +0100)]
[ospfd] compare ifIndex too when matching paths

ospf_path_lookup(), ospf_route_match_same() and
ospf_ase_route_match_same() needs to
compare if the interface matches too.

15 years ago[doc] Add "--disable-doc" to configure
Joakim Tjernlund [Mon, 16 Feb 2009 08:40:39 +0000 (09:40 +0100)]
[doc] Add "--disable-doc" to configure

Configure option "--disable-doc" will prevent building
the documents under doc. Saves build time and the need to
have document building tools installed. Useful when your build
machine is different from your development machine.

15 years ago[ospfd] external LSA route_unlock_node() fixes
Joakim Tjernlund [Wed, 4 Feb 2009 14:05:19 +0000 (15:05 +0100)]
[ospfd] external LSA route_unlock_node() fixes

A few route_unlock_node() calls was missing.

15 years ago[ospfd] Fix a few LSA performance "bugs"
Joakim Tjernlund [Tue, 4 Nov 2008 13:37:29 +0000 (13:37 +0000)]
[ospfd] Fix a few LSA performance "bugs"

ospf_lsa_install() will calculate LSA checksum so no
need to do it before calling ospf_lsa_install().

Set the OSPF_LSA_SELF_CHECKED flag on own LSA's to
save ospf_lsa_is_self_originated() some work.

Do not memset() memory that is about to overwritten
with memcpy().

15 years agoMerge remote branch 'origin/master'
Paul Jakma [Wed, 24 Jun 2009 21:52:43 +0000 (22:52 +0100)]
Merge remote branch 'origin/master'

15 years agozebra: Static route does not reach kernel.
Joakim Tjernlund [Wed, 24 Jun 2009 17:15:36 +0000 (19:15 +0200)]
zebra: Static route does not reach kernel.

A static route like below: ip route 172.16.1.0/30 192.168.101.162 11
does not move properly to a new interface when the
interface used goes down. Zebra reports that it have
moved but kernel isn't informed so the route is lost.

* zebra_rib.c: (nexthop_active_update) if ifindex has changed, then the
  route should be considered to have changed.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
15 years ago[vtysh] Save vtysh history to a file
Tomasz Pala [Wed, 24 Jun 2009 21:23:11 +0000 (22:23 +0100)]
[vtysh] Save vtysh history to a file

vtsh_main.c: save 1000 last lines of history to $HOME/.history_quagga (the
file must be created by hand first, this is intended behaviour)

15 years ago[configure] Allow for large-file support, e.g. for log files >2GB
Tomasz Pala [Wed, 24 Jun 2009 21:09:46 +0000 (22:09 +0100)]
[configure] Allow for large-file support, e.g. for log files >2GB

15 years ago[cleanup] Add log.h includes
Tomasz Pala [Wed, 24 Jun 2009 20:48:22 +0000 (21:48 +0100)]
[cleanup] Add log.h includes

15 years ago[bgpd] Add 'show ip bgp view WORD neighbors IP (advertised|received)-routes'
Tomasz Pala [Wed, 24 Jun 2009 20:36:50 +0000 (21:36 +0100)]
[bgpd] Add 'show ip bgp view WORD neighbors IP (advertised|received)-routes'

* bgp_route.c: Was missing these commands.

15 years ago[ospfd] discount IP header size from a new LSA pkt
Dmitry Tejblum [Wed, 24 Jun 2009 16:14:30 +0000 (20:14 +0400)]
[ospfd] discount IP header size from a new LSA pkt

15 years ago[bgpd] review 32-bit AS-path hotfix for 0.99.12
Denis Ovsienko [Tue, 23 Jun 2009 17:10:45 +0000 (21:10 +0400)]
[bgpd] review 32-bit AS-path hotfix for 0.99.12

The patch by Chris Caputo, which was used to prepare 0.99.12
release, consists of three parts:

1. memory allocation fix itself
2. fix for warnings about constant variables
3. fix for printf format specs (%d was used instead of %u)

It was confirmed later, that:
a. a much simpler bugfix was available for memory allocation
b. committed version of the bugfix wasn't optimal CPU-wise

At this point I consider reasonable to revert the allocation
portion of that patch and to replace it with the shorter
version, which is:

-#define ASN_STR_LEN (5 + 1)
+#define ASN_STR_LEN (10 + 1)

Other two parts of Mr. Caputo's patch remain intact.

15 years ago[zebra] linux policy routing support with ipv6
Mathieu Goessens [Tue, 23 Jun 2009 14:59:45 +0000 (15:59 +0100)]
[zebra] linux policy routing support with ipv6

Quagga support linux policy routing (ip route ... table $X) with zebra.conf
table $X option.  It works fine on ipv4.  On ipv6 the parameter is ignored
(table 0 is used).

* zebra/...: Pass appropriate table arg to rib_{add,delete}_ipv6