commit 66b63aa036c75737c3a8cea9693eff4dec84f903
Author: David Lamparter <equinox@diac24.net>
Date:   Sun Feb 10 03:08:33 2013 +0100

    release: 0.99.22

commit b2baffe8d255890b85d93aee653bed2c18371128
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Sun Jan 27 04:46:02 2013 +0100

    build: fix "pragma weak" mixups
    
    Not only was there a minor typo in the "pragma weak" preprocessor
    checks, but also were the tests not behaving as needed - they only
    indicated support for the /first/ method of implementing weak aliases,
    which on Linux is __attribute__ and not #pragma.
    
    * m4/ax_sys_weak_alias.m4: set defines for _all_ weak alias methods
    * zebra/kernel_null.c: fix typo
    
    Cc: Doug VanLeuven <roamdad@sonic.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit b0baf0740e3d6a01980cef7ea0af0a61c10b1bcd
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Fri Jan 18 19:11:59 2013 +0100

    doc: update some introduction paragraphs
    
    in particular,
    - add IS-IS to some listings
    - list Solaris & OSX as "some work required"
    - remove OS version numbers.  We have no base to specify any of them.
    - list supported C compilers (gcc, clang, icc)
    - cut the Quagga 2.0 stuff that promises QoS and firewall functionality

commit d3c74d218bfbd9b5b9c39ef7d286f1dd007f2a74
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Fri Jan 18 18:56:39 2013 +0100

    doc: update NEWS for 0.99.22 changes

commit d53d8fda42e1ce43852d3b4cff914ce79b5c6785
Author: Christian Franke <chris@opensourcerouting.org>
Date:   Mon Jan 28 07:14:43 2013 +0100

    bgpd: fix crash in soft-reconfiguration
    
    Commit 8692c50652 introduced a bug where bgpd would crash on
    soft-reconfiguration.
    
    This happens e.g. when there are filtered unicast routes because
    rn->info is NULL in that case, which the code did not account for.
    
    Reported-by: Paweł Staszewski <pstaszewski@itcare.pl>
    Signed-off-by: Christian Franke <chris@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit aeef13b0d5b50a90f293c93eb5a34c2a099d140b
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Wed Jan 23 04:20:37 2013 +0100

    tests: fix missing init in bgp_mp_attr_test.c
    
    turns out, bgp_mp_reach_parse really doesn't like getting garbage
    attribute input.  In particular, attr->extra better be NULL or we
    merrily go trample random places (like our stack).
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 1cb9cf062ec3ed7a3f13fb5465eb5fb917ce3329
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue Jan 22 23:39:17 2013 +0100

    tests: update & extend AS_PATH tests
    
    NB: these tests test for current implementation state, not for RFC
    conformance.  In particular, behaviour with confederations in AS4_PATH
    as well as reconcilation of short AS_PATH + AS4_PATH is currently NOT
    conforming to RFC 4893/6793.
    
    * tests/aspath_test.c:  add capability to put both AS4_PATH & AS_PATH,
      add test for AS4_PATH w/o AS_PATH, update confederation test
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 5e728e929942d39ce5a4ab3d01c33f7b688c4e3f
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Wed Jan 23 05:50:24 2013 +0100

    bgpd: relax ORF capability length handling
    
    commit fe9bb64... "bgpd: CVE-2012-1820, DoS in bgp_capability_orf()"
    made the length test in bgp_capability_orf_entry() stricter and is now
    causing us to refuse (with CEASE) ORF capabilites carrying any excess
    data.  This does not conform to the robustness principle as laid out by
    RFC1122 ("be liberal in what you accept").
    
    Even worse, RFC5291 is quite unclear on how to use the ORF capability
    with multiple AFI/SAFIs.  It can be interpreted as either "use one
    instance, stuff everything in" but also as "use multiple instances".
    So, if not for applying robustness, we end up clearing sessions from
    implementations going by the former interpretation.  (or if anyone dares
    add a byte of padding...)
    
    Cc: Denis Ovsienko <infrastation@yandex.ru>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit f47e5a18b5beb00d6b5b94965e305dadb5aa5bad
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Sun Jan 20 18:29:28 2013 +0100

    bgpd: don't try to reconcile AS4_PATH with NULL
    
    bgp_attr_munge_as4_attrs would previously try to reintegrate an AS4_PATH
    with a NULL AS_PATH, leading to a rather nasty SEGV.  Let's go by
    RFC6793 and treat missing AS_PATH as 0-length AS_PATH, which in turn
    means discarding the AS4_PATH.
    
    [NB: we don't actually stick to the actual rule, which is discarding
    AS4_PATH if it's longer than AS_PATH; indeed we should probably fix that
    too]
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 955be06f8a647d1149d5547e1265fb66f55a9161
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Wed Jan 16 01:48:04 2013 +0100

    build: Quagga 0.99.22-rc1
    
    this is not a full release version, so neither release notes nor
    documentation are updated yet.  Also, signing the tag with my private
    GPG key instead of the Quagga one.

commit dcab1bb822161d55795aad59b14c5c5d79b71e1f
Author: Christian Franke <chris@opensourcerouting.org>
Date:   Fri Dec 7 16:45:52 2012 +0000

    bgpd: conditional default-originate using route-map
    
    Incorporate a patch by Svetozar Mihailov which implements
    default-originate route-maps to behave as expected, i.e. allowing
    the default route to be advertised conditionally, depending on a
    criterion given by the route-map.
    
    I am aware that the performance attributes of the following implementation
    are far from optimal. However, this affects only code paths belonging to
    a feature that is broken without this patch, therefore, it seems reasonable
    to me to have this in the mainline for now.
    
    Cc: Svetozar Mihailov <quagga@j.zarhi.com>
    Reported-by: Sébastien Cramatte <scramatte@gmail.com>
    Signed-off-by: Christian Franke <chris@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 86998bc2bc9506841250c8d49dd2df2464660a18
Author: Leonid Rosenboim <Leonid.Rosenboim@windriver.com>
Date:   Fri Dec 14 19:12:17 2012 +0000

    bgpd: uncork/nagle socket when sending BGP NOTIFY
    
    This pushes out the NOTIFY message before closing a connection.
    
    Previously, the TCP_CORK bandwidth optimization code caused NOTIFY
    messages to disappear prior to when the connection is closed.
    
    * bgpd/bgp_packet.c: unset CORK, set NODELAY, and replace
                         writen() by more correct write()
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit a6694fe8a89b957216f548938cc31602df04d495
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Wed Jan 16 01:28:36 2013 +0100

    Revert "bgpd: flock() dump files (BZ#742)"
    
    This reverts commit b07458a055493dd37cb955ae90f11ae8bc334d3a.
    
    On second thought, the right way to do this is with rename(), not by
    introducing a lock that can potentially even stall bgpd.
    
    Reported-by: Christian Franke <chris@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit ca3ccd8748434719e4670ce812d1310013fad518
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Wed Sep 26 14:52:39 2012 +0200

    zebra: fix sockaddr_dl length assumptions (BZ#737)
    
    Quagga makes bad assumptions about sockaddr_dl (on NetBSD, but possibly
    on other systems as well).  Particularly, sizeof(struct sockaddr_dl)
    returns a size that does not include the full sdl_data field, leading to
    not enough data being copied.  This breaks IPv6 RAs in particular, as
    a broken mac address from sockaddr_dl will be included in the packets.
    
    From: Matthias-Christian Ott <ott@mirix.org>
    Tested-by: Uwe Toenjes <6bone@6bone.informatik.uni-leipzig.de>
    [further simplified + more comments]
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 8d083b9ec5bb0375ebb6d8b2b05c848febd92cb5
Author: Leonid Rosenboim <lrosenbo@wrs.com>
Date:   Tue Nov 6 11:44:04 2012 -0800

    build: update .gitignore for all test programs

commit f6295c29070631b24a391f79d4d37ab9c0807ecc
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue Jan 15 17:59:08 2013 +0100

    build: add buildtest.sh script
    
    This script compiles Quagga in a variety of configurations and
    optionally with LLVM and ICC (if those are installed).
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit ea05767770d759d46f97d1dc33423de72ae20ccd
Author: Hasso Tepper <hasso.tepper@gmail.com>
Date:   Sun Jan 13 17:45:29 2013 +0000

    build: Fix build on MacOSX 10.8 (Mountain Lion)
    
    Newer MacOSX versions have support for both IPv6 advanced socket API
    RFCs (2292 and 3542) switchable in compile time, but neither of these
    is default for some strange reason. RFC3542 will be default in future,
    but for now we have to declare that we want to use the RFC3542 API
    before including <netinet/in.h>.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 303bb005889a843b0d7e07a9b67b68ee55653d8f
Author: Hasso Tepper <hasso.tepper@gmail.com>
Date:   Sun Jan 13 17:45:28 2013 +0000

    build: Remove deprecated AM_CONFIG_HEADER
    
    AM_CONFIG_HEADER has been deprecated for many years and is removed
    completely from automake 1.13.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 3a69f74a0a903659e8a5bb930b257d9d09a87626
Author: Stephen Hemminger <shemminger@vyatta.com>
Date:   Fri Jan 11 18:27:23 2013 +0000

    bgpd: uncork after each write
    
    Keep data flowing, uncork after each BGP_WRITE_PACKET_MAX.
    This makes TCP send data sooner, since thread may not be scheduled
    again for a a longish time because of new UPDATE's coming in.
    
    Signed-off-by: Stephen Hemminger <shemminger@vyatta.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit d61c1bbd4bf6ddf717dda88350668a9f1e2da0ac
Author: Stephen Hemminger <shemminger@vyatta.com>
Date:   Fri Jan 4 22:29:23 2013 +0000

    bgpd: use recent monotonic time for readtime
    
    The readtime value is for diagnostic, and doesn't have to be highly
    accurate. This also fixes a problem where the readtime was being measured
    with system clock, but the peer_uptime() was comparing with bgp_clock.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 47f6aef02b85c604bbd556574e2c724b7304e9e8
Author: Stephen Hemminger <shemminger@vyatta.com>
Date:   Fri Jan 4 22:29:22 2013 +0000

    configure: allow building without getrusage
    
    Measuring the resource usage of threads is moderately expensive
    since it requires doing an additional system call everytime a
    thread context switches. Make it possible to disable this with
    a configuration option.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 07ff4dc4d29f6f8db77e0e73da5d59e864ae2e66
Author: Stephen Hemminger <shemminger@vyatta.com>
Date:   Fri Jan 4 22:29:20 2013 +0000

    bgpd: mark route nodes scheduled into work queue
    
    The flag bit BGP_NODE_PROCESS_SCHEDULED is checked but never set.
    This causes route node to be scheduled multiple times under load.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 1e0ce7caa622f07c20bb74414a4a5b4cbd732c75
Author: Leonid Rosenboim <lrosenbo@wrs.com>
Date:   Fri Dec 7 21:31:07 2012 +0000

    bgpd: improve logging of invalid BGP Notifications
    
    Invalid BGP Notification messages should be logged locally, cf.
    RFC4271, Sect. 6.4, p 34,
      NOTIFICATION Message Error Handling
    
    Current notification for invalid Notification code:
    
      2012/10/10 02:17:54 BGP: message index 10 not found in bgp_notify_msg (max is 8)
      2012/10/10 02:17:54 BGP: 192.168.1.1 received NOTIFICATION 10/0 ((no item found)) 0 bytes
    
    the logging should be a bit more clear. The above logging really doesn't
    explain much and looks more like a programming error.
    
    [rewrote most of it to get in something I can call a shape -David]
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit a689e6a9f470d2a72493b907c94ef23516bbbda6
Author: Leonid Rosenboim <lrosenbo@wrs.com>
Date:   Fri Dec 7 21:25:00 2012 +0000

    bgpd: fix error response to invalid BGP version number
    
    BGP4-ANVL 20.1 ANVL tries to open BGP with version 5 and expects correct
    notification in response. Quagga sends notification, but with incorrect
    information in it.
    
    The data needs to be a 2-byte value, and for now we respond with 0004 for any
    peer version other than 4.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit a0de1d16cd00694b07b266d4a5dae5985e9072ff
Author: Christian Franke <chris@opensourcerouting.org>
Date:   Fri Dec 7 16:35:00 2012 +0000

    bgpd: fix a bug in bgp_attr_dup
    
    Commit 558d1fec11749d3257e improved bgp_attr_dup so it would be possible
    for the caller to provide attr_extra, allowing to use the stack instead
    of the heap for operations requiring only a short lived attr.
    
    However, this commit introduced a bug where bgp_attr_dup wouldn't copy
    attr_extra at all (but provide a reference to the original) if the
    caller provided attr_extra.
    
    Cc: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: Christian Franke <chris@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit b06b35f0754747f9f178be155a2903b360aa2b6c
Author: Christian Franke <chris@opensourcerouting.org>
Date:   Fri Dec 7 14:26:09 2012 +0000

    bgpd: fix a memleak on "set community none"
    
    Signed-off-by: Christian Franke <chris@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 9499bf2bc6daf0a9b7170d3cf994daef2f1a8920
Author: Leonid Rosenboim <lrosenbo@wrs.com>
Date:   Thu Dec 6 20:17:41 2012 +0000

    zebra: don't overrun afi/safi array boundaries
    
    zebra was not checking afi/safi values.  This was leading to crashes where
    these values were coming directly from some protocol's on-wire fields.
    Safeguarding them in zebra is a good start.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 15c713485699fd22dfa5b7ce3ca7c6be049f1033
Author: Christian Franke <chris@opensourcerouting.org>
Date:   Mon Nov 19 11:17:31 2012 +0000

    bgpd: store "no neighbor activate" for IPv4 unicast
    
    If a neighbor was in a peer group for any AFI/SAFI, bgpd would never write a
    "no neighbor activate" line for IPv4 unicast, so a valid setup like following
    could be configured, but not saved:
    
        router bgp 64600
         bgp router-id 198.51.100.1
         network 198.51.100.0/24
         neighbor peers peer-group
         neighbor 2001:db8::2 remote-as 64601
         no neighbor 2001:db8::2 activate
        !
         address-family ipv6
         network 2001:db8:1::/48
         neighbor peers activate
         neighbor peers soft-reconfiguration inbound
         neighbor 2001:db8::2 peer-group peers
         exit-address-family
        !
    
    Signed-off-by: Christian Franke <chris@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 24e50f2013e64a73b1f7ecdbd5688360002d09f7
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 15:17:33 2012 +0000

    bgpd: avoid heap fragmentation in bgp_clear_route_table
    
    In bgp_clear_route_table, moved cleanup code before the allocation
    of the work queue items. This returns the memory to the system
    allocator before allocating new and might therefore help avoiding
    heap fragmentation.
    
    * bgp_route.c: (bgp_clear_route_table) moved code blocks.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Reviewed-by: Leonid Rosenboim <Leonid.Rosenboim@windriver.com>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit ebbb5fca5ca899a9a125aa2770d3fdf857186bac
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 15:17:33 2012 +0000

    bgpd: fix for leaked struct bgp_adj_[in|out] on peer shutdown
    
        If a peer with soft-reconfiguration configured is cleared, the
    function bgp_clear_route_table() doesn't free the bgp_adj_in and bgp_adj_out
    structures of route nodes that for some reason, ej. denied by a filter,
    don't have routes attached "rn->info == NULL".
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Reviewed-by: Leonid Rosenboim <Leonid.Rosenboim@windriver.com>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit a5c851c7ff41ef846e83d62394176ac1753ebf45
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue Nov 27 03:21:44 2012 +0100

    lib: remove ALL_LIST_ELEMENTS dead code branch
    
    ALL_LIST_ELEMENTS is checking node == NULL twice, which is causing a
    whole slew of false positives in Coverity.  In this particular case,
    addressing this in the code is reasonable; being a macro, this appears
    all over the place without easy remedy.
    
    Acked-by: Scott Feldman <sfeldma@cumulusnetworks.com>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 913ff66ba30093d2fdc26af215f4bc0b3d359d75
Author: 高鹏 <gpstrive@gmail.com>
Date:   Wed Nov 21 18:15:43 2012 +0800

    zebra: fix netlink NL_PKT_BUF_SIZE
    
    Change default value of variable NL_PKT_BUF_SIZE to 8192UL.  Cf.
    NLMSG_GOODSIZE definition of linux in include/linux/netlink.h for detail.
    
    Previously, on platforms with a page size greater than 8192, if you had added
    too many interfaces, zebra would not have enough buffer space to get the entire
    interface list.  This resulted in an incomplete interface list.
    
    From: 高鹏 <gpstrive@gmail.com>
    [updated to apply after FPM patches]
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 61be0ee8824b30e94ddd2bfe8b51fcfd330c41dd
Author: Hasso Tepper <hasso.tepper@gmail.com>
Date:   Fri Dec 14 14:58:32 2012 +0200

    build: Fix build for systems with no /bin/true
    
    There are systems with no /bin/true - it might have different path
    (/usr/bin/true) or even a shell builtin.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 675769b1b17a068526d90786e1c35304656faba7
Author: Hasso Tepper <hasso.tepper@gmail.com>
Date:   Fri Dec 14 14:58:31 2012 +0200

    build: MacOSX needs BSD struct ip_mreq hack too
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 327c4cdf7578debcc140f04f03d02479771c9e11
Author: Doug VanLeuven <roamdad@sonic.net>
Date:   Fri Dec 14 14:58:30 2012 +0200

    testzebra: pragma weak: detect systems with weak alias and provide alternative
    
    LLVM clang does not support #pragma weak (bug 3679) on OS X. There are
    other systems where the #pragma weak has varying syntax.
    
    Added m4 file from the autoconf archives:
    http://www.gnu.org/software/autoconf-archive/ax_sys_weak_alias.html
    
    Fix up zebra/*_null.c files to use #pragma weak alias or stub functions
    if not available. It's incomplete in that the different format #pragma
    enable easier fixes on need.
    
    Tested on 64bit OS X 10.7, FreeBSD 9.0 amd64 & i386 (32bit) using
    gcc & clang. Tested on linux 64bit.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit b2e5bdbe10c4145f508fcf1486ffe29d5ce516f7
Merge: a16dcf7 e0630cb
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Fri Jan 11 21:46:18 2013 +0100

    Merge remote-tracking branch 'savannah/sf/ospfd'
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit e0630cb4d61557f956318a088f68f1fc4d261ef3
Author: Dinesh G Dutt <ddutt@cumulusnetworks.com>
Date:   Mon Jan 7 10:12:52 2013 -0800

    ospfd: Remove dup MaxAge LSA flood
    
    Stop additional, unnecessary flooding of MaxAge LSAs.
    
    When a MaxAge LSA is installed, if the LSA is prematurely aged or the LSA is
    not self-originated, the LSA is flushed. This results in a the LSA being
    flooded a second time and in some cases flooded back to the receiver
    (unless the receiver is also the advertising router). A MaxAge'd LSA has
    already been flooded in ospf_flood() as part of the LSA receive processing
    (ospf_ls_upd). A self-originated LSA will be flooded from the originate/refresh
    routine. Thus, in the install routine, a MaxAge'd LSA only needs to be added
    to the MaxAge LSA list.
    
    Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit d265548ffb8da9ba3e1dd327efbff31c7cd15027
Author: Vishal Kumar <vishal3.kumar@gmail.com>
Date:   Fri Dec 7 14:47:58 2012 -0800

    ospfd: Corrected ospfd Type-4/Type-5 ls update handling
    
    This fix is for Type-4 LS updates handling at a ABR router where
    ospf daemon is not distributing Type-4 LS updates with correct LS-Age
    after learning about a ASBR router in a ospf network. Because of this
    Type-5 LS updates are not learnt in ospf network.
    Testing Scenario:
    This can be re-produced by restarting the ospfd daemon on DUT
    (mentioned in figure below)before the Hello time interval expires
    for area 0.0.0.1.
    
     ____                       _______                       ____                    _________
    |    |   area: 0.0.0.1     |       |   area: 0.0.0.0     |    |   area: 0.0.0.2  |         |
    | R1 |---------------------|DUT/ABR|---------------------| R2 |------------------| R3/ASBR |
    |____|     x.x.x.0/24      |_______|    y.y.y.0/64       |____|     z.z.z.0/24   |_________|
    
    In the above setup when ospfd is restarted (imp:before the Hello interval
    at R1 expires) and DUT learns about ASBR router R3 (Type-4) in the
    network from R2, but this ls-update is not propagates in area
    0.0.0.1. So R1 never comes to know about the ASBR router in the
    network, so all the type-5 LS updates coming from R3 are not learnt
    by R1. Further if we again restart ospfd daemon it starts working fine.
    With the fix given this issue can be resolved.
    
    More Discussion on this is available at:
    http://www.gossamer-threads.com/lists/quagga/dev/23892
    
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit 0798cee34f5c436cd2a4b6e1d9a1ca90eee94292
Author: Andrew Certain <certain@amazon.com>
Date:   Tue Dec 4 13:43:42 2012 -0800

    ospfd: compile warning cleanups
    
    A set of patches to clarify some comments as well as cleanup code that was
    causing warnings.  After these patches, the code can be compiled with
    
    -Wall -Wsign-compare -Wpointer-arith -Wbad-function-cast -Wwrite-strings
    -Wmissing-prototypes -Wmissing-declarations -Wchar-subscripts -Wcast-qual
    -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
    
    (what is current in trunk plus -Wextra -Wno-unused-parameter
    -Wno-missing-field-initializers).
    
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit de54b26caca7442af29656282e753b02aac6f093
Author: Andrew Certain <certain@amazon.com>
Date:   Tue Dec 4 13:40:58 2012 -0800

    ospfd: Update nsm_change_state to static scope, as it is not called from elsewhere
    
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit 703819a9314692f3a3b7f888887b0cebc15c18ae
Author: Andrew Certain <certain@amazon.com>
Date:   Tue Dec 4 13:36:41 2012 -0800

    ospfd: Changed TE instance check to remove -Wtype-limits warning
    
    Since LEGAL_TE_INSTANCE_RANGE() was being passed an unsigned int, a warning
    was being thrown due to the compare against >= 0.  Since this macro was used
    only in one place, I removed the macro for an explict compare against a
    constant for the MAX.
    
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit 7798b6321cd0c6281b1a119ac894ff3749e88cc1
Author: Andrew Certain <certain@amazon.com>
Date:   Tue Dec 4 13:33:24 2012 -0800

    lib: Changes to VTY string-parsing macros to remove warnings
    
    The VTY_GET_INTEGER_RANGE macro was being used also just to check the range
    on a variable that wasn't used (for the "no" version of a VTY command), so I
    split the macro into two.  Also, since the variable is unsigned, if MIN is
    zero, you get a warning about comparing an unsigned number against 0, giving
    rise to slightly convoluted logic.  Note that the previous two patches were
    found by the -Wtype-limits and -Wunused-variables warnings.  Without the
    changes to these macros, these warnings are triggered erroneously, making it
    harder to find the real problems.
    
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit f92c57f8ba4f1e856934ec1736be3cad62be4785
Author: Andrew Certain <certain@amazon.com>
Date:   Tue Dec 4 13:29:21 2012 -0800

    ospfd: Update comments to be more clear in packet processing
    
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit fbc043a847149499436fe4083b6384bde43fe578
Author: Andrew Certain <certain@amazon.com>
Date:   Tue Dec 4 12:54:18 2012 -0800

    ospfd: Fixed signed/unsigned masking of negative metrics
    
    In the original code, negative metrics would be converted successfully by
    atoi() and then converted to an unsigned int that would always compare
    successfully against >= 0, leaving a large positive metric in the route map.
    
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit 1a61ad1011c498c4ae66cc145db673e53ef02962
Author: Andrew Certain <certain@amazon.com>
Date:   Tue Dec 4 12:50:23 2012 -0800

    ospfd: Fixed typo bug in ospf_vty.h:ospf_neighbor
    
    Typo bug. ospf_nbr_nbma_poll_interval_set() was being sent priority instead
    of interval.
    
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit bda3c326a3fe843417726bfe1bc8d4bafbb51fa9
Author: Christian Franke <chris@opensourcerouting.org>
Date:   Tue Dec 4 11:31:16 2012 -0800

    ospfd: fix argument parsing for distribute-list
    
    Use the correct argument for the protocol lookup in
    ospf distribute-list commands.
    
    Signed-off-by: Christian Franke <chris@opensourcerouting.org>
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit 822d8f55199c0aee32c64f91532f637694d30e11
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue Dec 4 11:11:41 2012 -0800

    ospf: fix apiserver enable
    
    The ospf_apiserver_enable flag was being cleared _after_ the "-a"
    command-line option set it to 1.  Move up the initialisation, so
    enabling the OSPF API is actually possible.
    
    Reported-by: Rosario Mattera <rosmattera@gmail.com>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit 2345a2221aa0a02b96846beab6088815f41e791b
Author: Leonard Tracy <letracy@amazon.com>
Date:   Tue Dec 4 11:02:35 2012 -0800

    ospf: Fix type-4 network mask to 0 per RFC
    
    The OSPF RFC (2328) states that the network mask field of a type 4
    LSA "is not meaningful and must be zero".  OSPFD has been setting
    the mask as /32.  This patch changes OSPFD to set the mask to 0 per
    the RFC
    
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit faf9875832539f00940904e1424f2e789fef52d4
Author: Ayan Banerjee <ayan@cumulusnetworks.com>
Date:   Tue Dec 4 10:49:12 2012 -0800

    ospf: Reduce MaxAge log level
    
    Reduce the log level for the MaxAge LSA reception when such an LSA does
    not exist in the database.
    
    Signed-off-by: Ayan Banerjee <ayan@cumulusnetworks.com>
    Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com>
    Reviewed-by: Nolan Leake <nolan@cumulusnetworks.com>
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit 91e6a0e5ca973c7183f638987b67aa370e9b484c
Author: Dinesh Dutt <ddutt@cumulusnetworks.com>
Date:   Tue Dec 4 10:46:37 2012 -0800

    ospf: Convert MAX_AGE LSA list to tree
    
    Store the MaxAge LSA list in a tree instead of a linked list for efficient access.
    Walking the list can be quite inefficient in some large systems and under certain tests.
    
    ospfd maintains the list of LSA's that have been MaxAge'd out in a separate
    linked list for removal by a remover/walker thread. When a new LSA is to be
    installed, the old LSA is ejected and when it is ejected, the MaxAge LSA list
    is traversed to ensure that the old LSA is also removed from this list if it
    exists on this list.
    
    When a large number (> 5K) MaxAge LSAs are bombarding the system, walking this
    list takes a significant time causing timers to fire and actions to be taken
    such as expiring neighbors due to expiry of DeadInterval (especially when timer
    is really low, <= 12s), creating a spiral of instability.
    
    By making this MaxAge LSA list be a tree, this problem is mitigated.
    
    Signed-off-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
    Reviewed-by: Ayan Banerjee <ayan@cumulusnetworks.com>
    Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com>
    Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit 4ba4fc857685bfe31c7127826652012a750367c5
Author: Ayan Banerjee <ayan@cumulusnetworks.com>
Date:   Mon Dec 3 11:17:24 2012 -0800

    ospf: forward ref. of areas for "max-metric router-lsa administrative" cmd
    
    In the event areas are created at a later point of time with respect
    to the playback of the "max-metric router-lsa administrative" command,
    those areas do not get into indefinite max-metric mode. This patch is
    inteneded to store the configuration and apply it to all future areas
    that may be created.
    
    In the process, some other bugs that were there with respect to restart
    etc are fixed up.
    
    Tested locally to see that the fix works across multiple
    areas and across multiple restarts.
    
    Signed-off-by: Ayan Banerjee <ayan@cumulusnetworks.com>
    Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com>
    Reviewed-by: JR Rivers <jrrivers@cumulusnetworks.com>
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit 16a86b3e2f82d3e19a722e2ab34c2c77f62ed926
Author: Ayan Banerjee <ayan@cumulusnetworks.com>
Date:   Mon Dec 3 10:48:46 2012 -0800

    ospf: suppress delete using replacement
    
    After a SPF run, OSPF deletes routes that have changed in terms of any
    metric, type, and/or next-hops and re-adds them. Given that the Zebra-RIB
    already support replacement semantics, we suppress deletes for routes
    that will be added back again.
    
    This has the following advantages. It reduces the number of IPC messages
    between OSPF/Zebra. Also, in the current flow, a batch of route deletes
    were followed by a batch of adds even for say a metric change.
    
    With the change, routes are sent as "add" when they are modified. Zebra
    already implicitly deletes older routes.
    
    Signed-off-by: Ayan Banerjee <ayan@cumulusnetworks.com>
    Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com>
    Reviewed-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>

commit a16dcf7c11d80775b07a0fa6f3ac5527190fb486
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Thu Dec 13 11:20:50 2012 +0100

    build: check for .git in configure.ac
    
    Don't error out when someone tries using --with-pkg-git-version on
    something that isn't actually a git checkout (like a dist tarball).
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 4209a88759c41aac54465b6d4389b7daaad6ac80
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Thu Dec 13 10:59:00 2012 +0100

    build: fix dist tarball
    
    automake file lists haven't quite kept up with recent changes, time to
    fix them up so the dist tarball actually works...
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit fd76f41ac0267dc4cf5438ac8f5e23fae6810d31
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Thu Dec 13 10:35:45 2012 +0100

    build: update ICC warning CFLAGS
    
    Intel's icc doesn't accept "-wd <number>" anymore, it's "-wd<number>"
    these days.  But, anyhow, the warnings disabled in Quagga's configure.ac
    don't seem to appear anywhere at all, so let's just remove the option
    completely.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit e1a555b67cc868f95ea2b53c278bd8d091333e5f
Author: Nick Hilliard <nick@inex.ie>
Date:   Wed Nov 28 14:39:56 2012 +0000

    isisd: fix ipv6 metric endianness
    
    the isis ipv6 reachability metric is transmitted in big endian / network
    format, but isis_spf_process_lsp() does not convert this into host endian
    format when mucking around with local cost + received metric.  This patch
    fixes this problem and makes received ipv6 metrics work properly on
    little-endian machines.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 478c1125cfcf92c3f2a574d6b76eea28126284dc
Author: Christian Franke <chris@opensourcerouting.org>
Date:   Tue Nov 27 19:52:00 2012 +0000

    isisd: verify metrics on metric-style transition
    
    When switching to metric-style transition, circuit metrics should also be
    verified to be in the narrow range 0..63.
    
    Signed-off-by: Christian Franke <chris@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 4fb7c84f1b5e282c7dc413a578d3f42353ac7fec
Author: Christian Franke <chris@opensourcerouting.org>
Date:   Tue Nov 27 19:51:59 2012 +0000

    isisd: fix metrics check for metric-style narrow
    
    When switching to narrow metric style, all configured circuits are
    verified to have a valid narrow style metric. Check te_metric instead
    of metric_default as the latter is only 8bit wide and may overflow for
    wide style metrics.
    
    Signed-off-by: Christian Franke <chris@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit e8aca32f312cbef1cb0b0dd9e87b7e59dc9fa251
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue Nov 27 01:10:30 2012 +0000

    isisd: address Coverity warnings
    
    this fixes a bunch of issues found by Coverity SCAN and flagged as
    "high" impact -- although, they're all rather minute issues.
    
    * isisd/isis_adjacency.c: one superfluous check, one possible NULL deref
    * isisd/isis_circuit.c: two prefix memory leaks
    * isisd/isis_csm.c: one missing break
    * isisd/isis_lsp.c: one possible NULL deref
    * isisd/isis_pfpacket.c: one error-case fd leak
    * isisd/isis_route.c: one isis_route_info memory leak
    * isisd/isis_routemap.c: one... fnord
    * isisd/isis_tlv.c: one infinite loop
    
    Reported-by: Coverity SCAN
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 318c8040abc1b8a737c941382e8aca82e546da09
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue Nov 27 01:10:29 2012 +0000

    isisd: always join all IS-IS multicast groups
    
    The socket is only created once when an interface is brought up, and the
    multicast groups were joined according to configuration at that point.
    This breaks when later switching an interface to another IS-IS level.
    
    Since, for a separate conformance issue (ANVL ISIS-6.4), we should be
    inspecting the destination address anyway, the simplest fix here is to
    just join all groups unconditionally.  There shouldn't be much traffic
    on these anyway, worst case we might be picking up some unrelated
    multicast groups due to NIC filter aliasing though...
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
    Tested-by: Martin Winter <mwinter@opensourcerouting.org>

commit f818c8f3fb9c98490df29e99aa9cddde8e0296d5
Author: Christian Franke <chris@opensourcerouting.org>
Date:   Tue Nov 27 01:10:28 2012 +0000

    isisd: save metric-style narrow
    
    isisd defaults to wide metric style. So if narrow metric style is
    configured, a matching setting should be written to the configuration,
    allowing a narrow metric-style setting to be saved.
    
    Signed-off-by: Christian Franke <chris@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit de543de3d7682eaeb8c9b657e9a3bb4bcd17993d
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue Nov 27 01:10:27 2012 +0000

    isisd: fix spftree_area_del typo causing SEGV
    
    spftree_area_del didn't clear the IPv6 L2 spftree due to a simple typo,
    leading to a SEGV on shutdown when the still-armed timer would try to
    run an IPv6 L2 SPF calculation with its data free'd already.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit b72f345d2e078d4cd0559234d051214f58eef542
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue Nov 27 01:10:26 2012 +0000

    isisd: drop hellos without supported protocol list
    
    isisd should not form adjacencies on receiving an IS-IS Hello without a
    list of supported protocols (cf. RFC 1195 s4.4 p32 "Maintaining Router
    Adjacencies")  Also fixes memleaks in these error cases.
    
    * isisd/isis_pdu.c: improve TLVFLAG_NLPID handling
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
    Tested-by: Martin Winter <mwinter@opensourcerouting.org>

commit 19f78cebd2ce50f0d1f367cd759cdcfb1a500f59
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue Nov 27 01:10:25 2012 +0000

    isisd: refuse adjacencies with our own system ID
    
    isisd would form an adjacency with another router despite the system IDs
    being identical.  This would later cause an assertion failure like this:
    
      assertion=0x555555596db8 "isis_find_vertex (spftree->paths, id, vtype) == ((void *)0)",
      file=0x555555596c60 "isis_spf.c", line=515, function=0x555555597900 "isis_spf_add2tent") at log.c:619
    
    which is caused by trying to add a path expected to not exist, but
    suddenly colliding due to the duplicate system ID.
    
    * isis_pdu.c: check for system ID collision on receiving Hello
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 91d799e8cdd24ad3c195ed9d11882aacc91cc2ea
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue Nov 27 01:10:24 2012 +0000

    isisd: do not add >63 IP addresses to hello
    
    RFC1195 s4.2 "Multiple IP Addresses per Interface" explicitly forbids us
    from adding multiple tuples of IP addresses, putting a hard cutoff at 63
    IP addresses.
    
    * isisd/isis_tlv.c: cut off (and return success) at 63 addrs.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
    Tested-by: Martin Winter <mwinter@opensourcerouting.org>

commit 0be793e674c8b076f0e8bf327257f15803480f49
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue Nov 27 01:34:56 2012 +0000

    build: include git info
    
    If enabled with --with-pkg-gitversion on ./configure, this will append
    git version strings and branch information at the following places:
     - overall version number: 0.99.21-g0123456
     - login motd and show version: tag information + git id + branches
    
    Sample output:
      Hello, this is Quagga (version 0.99.21-g14b49ad-dirty).
      Copyright 1996-2005 Kunihiro Ishiguro, et al.
    
      This is a git build of quagga_0_99_21_release-106-g14b49ad-dirty
      Associated branch(es):
    	local:master
    
    [v2]: fix build without gitinfo (add "else" branch)
    [v2]: fix for repos without any tags (different git describe output)
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 324ed1f87aedf30a45aea951edb2e717c5f9b7fb
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Tue Nov 13 22:49:01 2012 +0000

    zebra: include intf when sending IPv4 nexthop to FPM
    
    * zebra/zebra_fpm_netlink.c
    
        Change the zebra FPM code to include an interface index when
        encoding a nexthop even if the protocol only provided a gateway
        address (e.g, NEXTHOP_TYPE_IPV4).
    
    Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit b9c24cd23091e817942d4eaab95712e84dbec8aa
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Tue Nov 13 22:49:00 2012 +0000

    doc: add blurbs on zebra FPM interface and commands
    
    Update documentation with some text on the zebra interface to the
    optional Forwarding Path Manager component, and the related cli
    commands.
    
    Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 5adc2528d386f037cc39e8029616295c3fec2db4
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Tue Nov 13 22:48:59 2012 +0000

    zebra: add module to communicate routes to FPM
    
    Enhance zebra to send routes to the (optional) Forwarding Path Manager
    component using the interface defined by fpm/fpm.h.
    
      * configure.ac
    
        - Add --enable-fpm flag.
    
          The FPM-related code in zebra is activated only if the build is
          configured with '--enable-fpm'.
    
        - Add HAVE_NETLINK automake conditional.
    
          This allows us to conditionally build netlink-dependent C code.
    
      * zebra/{rib.h,zebra_rib.c}
    
        - Add the 'fpm_q_entries' field to the rib_dest_t structure. This
          allows dests to be placed on the fpm queue.
    
        - Define a couple new rib_dest_t flags that hold FPM-related
          state.
    
        - Invoke the zfpm_trigger_update() function for a route_node
          whenever the information to be sent to the FPM changes.
    
        - rib_can_delete_dest(): Return FALSE if we have to update the FPM
          about the given dest. This ensures that the dest is not deleted
          even if there are no ribs hanging off of it.
    
      * zebra/zebra_fpm.c
    
        This file holds most of the code for interacting with the FPM.
    
        - If quagga was configured with '--enable-fpm', periodically try
          to connect to the FPM.
    
        - When the connection comes up, enqueue all relevent dests to the
          FPM queue.
    
        - When the FPM socket is readable, dequeue the next rib_dest_t
          from the FPM queue, encode it in to a message and send the
          message to the FPM.
    
        - When the connection to the FPM goes down, remove all dests from
          the FPM queue, and then start trying to connect to the FPM
          again.
    
        - Expose the following new operational commands:
    
          show zebra fpm stats
          clear zebra fpm stats
    
      * zebra/zebra_fpm_netlink.c
    
        - zfpm_netlink_encode_route(): Function to encode information
          about a rib_dest_t in netlink format.
    
      * zebra/zebra_fpm_private.h
    
        Private header file for the zebra FPM module.
    
      * zebra/zebra_fpm.h
    
        Header file exported by zebra FPM module to the rest of zebra.
    
      * zebra/debug.c
    
        Add the 'debug zebra fpm' command.
    
      * zebra/main.c
    
        Initialize the zebra-FPM code on startup.
    
      * zebra/misc_null.c
    
        Add stub for zfpm_trigger_update().
    
      * zebra/Makefile.am
    
        - Include new file zebra_fpm.c in build.
    
        - Include zebra_fpm_netlink.c in build if HAVE_NETLINK is defined.
    
      * vtysh/Makefile.am
    
        Include zebra_fpm.c in list of files that define cli commands.
    
    Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 443b993777e3e86fceb988f647d1c5b57661a182
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Tue Nov 13 22:48:58 2012 +0000

    fpm: Add public header for Forwarding Plane Manager
    
    The Forwarding Plane Manager (FPM) is an optional component that may
    be used in scenarios where the router has a forwarding path that is
    distinct from the kernel, commonly a hardware-based fast path. It is
    responsible for programming forwarding information (such as routes and
    nexthops) in the fast path.
    
    In Quagga, the Routing Information Base is maintained in the 'zebra'
    infrastructure daemon. Routing protocols communicate their best routes
    to zebra, and zebra computes the best route across protocols for each
    prefix. This latter information comprises the bulk of the Forwarding
    Information Base.
    
    The new header file added by this patch, 'fpm/fpm.h', defines a
    point-to-point interface using which zebra can update the FPM about
    changes in routes. The communication takes place over a stream
    socket. The FPM listens on a well-known TCP port, and zebra initiates
    the connection.
    
    All messages sent over the connection start with a short 'FPM header'.
    In the case of route add/delete messages, the header is followed by a
    netlink message. Zebra should send a complete copy of the forwarding
    table(s) to the FPM, including routes that it may have picked up from
    the kernel.
    
    The FPM interface uses replace semantics. That is, if a 'route add'
    message for a prefix is followed by another 'route add' message, the
    information in the second message is complete by itself, and replaces
    the information sent in the first message.
    
    If the connection to the FPM goes down for some reason, the client
    (zebra) should send the FPM a complete copy of the forwarding table(s)
    when it reconnects.
    
    Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 04f7dd64dfa0f339208f0d4833276b7684ee3343
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Tue Nov 13 22:48:57 2012 +0000

    lib: bring in sys/queue.h from FreeBSD tree
    
    Bring in sys/queue.h from the FreeBSD tree as lib/queue.h.
    
    This header implements lists of various flavors using inline
    linkages. The imported file corresponds to SVN revision 221843 (url
    below) and is available under the terms of the New BSD license
    (3-clause).
    
      http://svnweb.freebsd.org/base/head/sys/sys/queue.h?revision=221843
    
    Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 78deec450cfa5ddcad290c13b36dd1d187da213e
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Tue Nov 13 22:48:56 2012 +0000

    zebra: extern/extract some functions from rt_netlink.c
    
    * zebra/{rib.h,zebra_rib.c}
    
        Add nexthop_type_to_str(), which returns a human-readable string
        corresponding to a nexthop type.
    
      * zebra/rt_netlink.[hc]
    
        - Add new header file that exposes some existing and new
          netlink-related functions from rt_netlink.c to the rest of
          zebra.
    
            addattr32
            addattr_l
            rta_addattr_l
            nl_msg_type_to_str (new)
            nl_rtproto_to_str (new)
    
        - Use nexthop_type_to_str() instead of the static array
          'nexthop_types_desc'.
    
    Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 0915bb0ce2ca6b5fee2cd214be4499eeeaf1c9af
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Tue Nov 13 22:48:55 2012 +0000

    zebra: add iterator for walking all tables in RIB
    
    * lib/zebra.h
    
        Add macro ZEBRA_NUM_OF, which returns the number of elements in a
        static array.
    
      * zebra/rib.h
    
        Add the rib_tables_iter_t structure and associated functions,
        which allow one to walk all tables in the rib.
    
      * zebra/zebra_rib.c
    
        - Add vrf_id_get_next() to retrieve the first VRF id (if any) that
          is greater than a given VRF id.
    
        - Add rib_tables_iter_next().
    
    Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 1b5ed1b054b955275bb7cf0f80fb7767094bc28b
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Tue Nov 13 22:48:54 2012 +0000

    zebra: add way to determine VRF/AFI/SAFI of table
    
    Add some code that allows us to determine which VRF and AFI/SAFI a
    given RIB table corresponds to.
    
      * zebra/rib.h
    
        Add rib_table_info_t structure, which contains information about
        the VRF, AFI and SAFI that a table is for.
    
      * zebra/zebra_rib.c
    
        - Add the vrf_table_create() function, which creates a table and
          sets its 'info' pointer to a newly created rib_table_info_t.
          The 'info' pointer allows us to go from a route_node or a table
          to the associated vrf.
    
        - vrf_alloc(): Use vrf_create_table() to create tables.
    
      * lib/memtypes.c
    
        Add memory type for rib_table_info_t.
    
    Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 9fd92e3c4bdcc78e0f0d94d53a2d4c7b0e893fcb
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Tue Nov 13 22:48:53 2012 +0000

    zebra: add structure to hold per-prefix state in RIB
    
    Add the rib_dest_t structure to hold per-prefix state in the routing
    information base. This gives us an appropriate place to maintain the
    queueing state of a route_node. Queuing state was previously being
    stored on the first rib in the list of ribs hanging off the
    route_node.
    
      * zebra/rib.h
    
        - Add new structure rib_dest_t.
    
        - Remove the rn_status field from 'struct rib', it is no longer
          required.
    
        - Add macros (RNODE_FOREACH_RIB, RNODE_FOREACH_RIB_SAFE) for
          walking all 'struct ribs' corresponding to a route_node. These
          hide the fact that there is an intermediate rib_dest_t
          structure.
    
        - Add a few utility inlines to go between a rib_dest_t and
          associated structures.
    
      * zebra/zebra_rib.c
    
        - rib_link()/rib_unlink()
    
          Tweak for new behavior, where the 'info' pointer of a route_node
          points to a rib_dest_t. The list of ribs for a prefix now hangs
          off of the dest.
    
          Change the way we ref count route_nodes. We now hold a single
          ref count on a route_node if there is a corresponding
          rib_dest_t.
    
        - Maintain the queuing state of a route_node on the flags field of
          the rib_dest_t.
    
        - Add the rib_gc_dest() function, which deletes a rib_dest_t if it
          is no longer required. A rib_dest_t can be deleted iff there are
          no struct ribs hanging off of it.
    
        - Call rib_gc_dest() any time we unlink a rib from the
          rib_dest_t. Currently we only need to call it once, just before
          we return from rib_process().
    
      * zebra/{redistribute,zebra_rib,zebra_snmp,zebra_vty}.c
    
        Use new macros to walk over route_node ribs.
    
      * lib/memtypes.c
    
        Add memory type for rib_dest_t.
    
    Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 5aebb9c77fc2257c9d9df72db66668fabb24fc52
Author: Andrew Certain <certain@amazon.com>
Date:   Wed Nov 7 23:50:09 2012 +0000

    bgpd: document bgp neighbor local-as peer command
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 8b366b9cfd1f3ec1a45e0f82db7fdb27e3bb3594
Author: Andrew Certain <certain@amazon.com>
Date:   Wed Nov 7 23:50:08 2012 +0000

    bgpd: Fixed out-of-date comment
    
    When going through the code to write the documentation for local-as,
    I discovered that one of the comments was out-of-date.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 9d3f9705d8b386ccf006c106967c700141e5d049
Author: Andrew Certain <certain@amazon.com>
Date:   Wed Nov 7 23:50:07 2012 +0000

    bgpd: add replace-as modifier for BGP neighbor
    
    Added replace-as modifier for BGP neighbors when using
    local-as. If the replace-as modifier is specified, only the
    replacement AS as specified by the local-as modifier is
    prepended to the AS_PATH, not the process's AS.
    
    In bgp_attr.c, I decided that
    
    if (peer->change_local_as) {
      /* If replace-as is specified, we only use the change_local_as when
         advertising routes. */
      if( ! CHECK_FLAG (peer->flags, PEER_FLAG_LOCAL_AS_REPLACE_AS) ) {
        aspath = aspath_add_seq (aspath, peer->local_as);
      }
      aspath = aspath_add_seq (aspath, peer->change_local_as);
    } else {
      aspath = aspath_add_seq (aspath, peer->local_as);
    }
    
    was clearer than the alternative that didn't duplicate the prepending of the
    process's AS:
    
    /* First, append the process local AS unless we have an alternate local_as
     * and we're replacing it (as opposed to just prepending it). */
    if (! (peer->change_local_as
           && CHECK_FLAG (peer->flags, PEER_FLAG_LOCAL_AS_REPLACE_AS) ) ) {
      aspath = aspath_add_seq (aspath, peer->local_as);
    }
    
    if (peer->change_local_as)
      aspath = aspath_add_seq (aspath, peer->change_local_as);
    }
    
    But I could be convinced otherwise.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 3b96b78136d04ddb7e39d86577cad75acb25237a
Author: Hasso Tepper <hasso.tepper@gmail.com>
Date:   Thu Oct 11 11:31:54 2012 +0000

    lib: Implement monotonically increasing clock for Darwin.
    
    There is no Posix CLOCK_MONOTONIC in Darwin, but monotonically
    increasing clock can be implemented using mach_absolute_time().
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 43057bf22a4240b5e163c30a1f66deb702ce746e
Author: Hasso Tepper <hasso.tepper@gmail.com>
Date:   Thu Oct 11 11:19:51 2012 +0000

    isisd: clock_gettime() -> quagga_gettime() conversion.
    
    * isisd/isis_spf.c: Use portable quagga_gettime() like the rest of
        the Quagga code.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 8c9ed279852393804c26e3c8c556a13d08654907
Author: Hasso Tepper <hasso.tepper@gmail.com>
Date:   Thu Oct 11 11:15:18 2012 +0000

    ospfd: remove some buggy extra ';' symbols.
    
     * ospfd/ospf_apiserver.c: extra ; causing lookup to fail always
     * ospfd/ospf_lsa.c: extra ; causing debug output even when disabled
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 9234b382735b690f403ce018ce392316b2ad6e38
Author: Doug VanLeuven <roamdad@sonic.net>
Date:   Wed Oct 10 16:12:32 2012 -0700

    build: check actually-used BSD link state fields
    
    ifi_link_state missing in OS X. There could be other *BSD's that haven't
    implemented it and possibly affects older implementations.
    
    The existing HAVE_BSD_LINK_DETECT configure.ac check is only confirming
    the link state detection using ifmediareq.ifm_status found in
    <net/if_media.h>. This is the link state detection used in
    zebra/ioctl.c. Later, *BSD redefined struct if_data in <net/if.h> and
    included link state detection. This is the method used in
    zebra/kernel_socket.c
    
    Additional test defined in config.ac to test for member struct
    if_data.ifi_link_state defined in <net/if.h> separate from test for
    <net/if_media.h> ifmediareq.ifm_status
    
    Fixed #ifdef's in zebra/kernel_socket.c to use the new #define
    No impact on older function calls in zebra/ioctl.c
    
    Tested on 64bit OS X 10.7, FreeBSD 9.0 amd64 & i386 (32bit)
    using gcc & clang. Tested on linux 64bit.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit a05df8fd279e4af0f077de181fb6c4e7d7174267
Author: Doug VanLeuven <roamdad@sonic.net>
Date:   Wed Oct 10 16:11:36 2012 -0700

    zebra: kernel_socket: fix overflow in RTA_ADDR & RTA_ATTR
    
    In zebra/kernel_socket.c, copying sockaddr from *_msghdr:
    
    There are really 2 different lengths that need to be determined.
      1) the length required to point to the next sockaddr in the mesg
         buffer which might include any required padding and
      2) the actual length of the sockaddr data that needs to be copied
         into the destination field.
    They may or may not be the same value.
    
    Sizeof sockaddr_in6 is 28, which to pad for alignment purposes on 32
    bit systems with a long of 4 bytes is evenly divided and requires
    no padding. On 64 bit systems, with a long of 8 it is padded with 4
    extra bytes.So the current RTA_* macros are copying 32 bytes into a 28
    byte field on 64 bitsystems, where the field overflow did not occur
    on the 32 bit systems.
    
    Since using sa_len required the use of an #ifdef which couldn't be used
    directly inside a #define, it made sense to move the copy into the
    function to allow typdef checking throughout and eliminate the hack
    to suppress compiler warnings.
    
    Fixed declaration of cp in ifm_read after compiler noticed type mismatch.
    
    Tested on 64bit OS X 10.7, FreeBSD 9.0 amd64 & i386 (32bit)
    using gcc & clang
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 3b33de676ac8e84b82f40520ecd0f4722e16b349
Author: Doug VanLeuven <roamdad@sonic.net>
Date:   Wed Oct 10 22:10:14 2012 +0000

    zebra: kernel_socket: fix 64bit MacOS X alignment
    
    In OS X 10.7 zebra crashed on invalid execution address.
    
    sockaddr padding in *_msghdr is observed to be 4 bytes in 64bit OS X.
    
    The ROUNDUP macro assumed alignment on sizeof(long) which
    allocates 8 bytes on 64bit systems, 4 bytes on 32bit systems
    which is true for BSD generally.
    
    Test for Apple and use sizeof(int) which allocates 4 bytes on 32 & 64bit
    systems.
    
    Tested on 64bit OS X 10.7, FreeBSD 9.0 amd64 & i386 (32bit)
    using gcc & clang
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 7d50ad444ffadd4110152113cc9583db96b3ad67
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Sat Nov 3 11:19:52 2012 -0700

    doc: update installation instructions
    
    configure parameters have changed quite a bit, several options are
    enabled by default now and there's --disable-tests.  Update
    documentation to match.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit e2b1580cbc450b55491efd2cf03c967e53e63f5f
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Sat Nov 3 09:14:29 2012 -0700

    build: compile tests/ by default
    
    Broke the tests again... let's just build them by default so it's easier
    to notice.  If anyone doesn't want to build tests, there's
    --disable-tests.
    
    NB: tests will be neither run nor installed.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 326fe3df2c659d62fc76f8579a414ba271e7f3e9
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Sat Nov 3 09:13:23 2012 -0700

    tests: fix missing array_size() include
    
     * tests/test-sig.c: add #include "lib/memory.h" to get array_size()
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit fe9bb6459afe0d55e56619cdc5061d8407cd1f15
Author: Denis Ovsienko <infrastation@yandex.ru>
Date:   Thu Apr 19 20:34:13 2012 +0400

    bgpd: CVE-2012-1820, DoS in bgp_capability_orf()
    
    An ORF (code 3) capability TLV is defined to contain exactly one
    AFI/SAFI block. Function bgp_capability_orf(), which parses ORF
    capability TLV, uses do-while cycle to call its helper function
    bgp_capability_orf_entry(), which actually processes the AFI/SAFI data
    block. The call is made at least once and repeated as long as the input
    buffer has enough data for the next call.
    
    The helper function, bgp_capability_orf_entry(), uses "Number of ORFs"
    field of the provided AFI/SAFI block to verify, if it fits the input
    buffer. However, the check is made based on the total length of the ORF
    TLV regardless of the data already consumed by the previous helper
    function call(s). This way, the check condition is only valid for the
    first AFI/SAFI block inside an ORF capability TLV.
    
    For the subsequent calls of the helper function, if any are made, the
    check condition may erroneously tell, that the current "Number of ORFs"
    field fits the buffer boundary, where in fact it does not. This makes it
    possible to trigger an assertion by feeding an OPEN message with a
    specially-crafted malformed ORF capability TLV.
    
    This commit fixes the vulnerability by making the implementation follow
    the spec.

commit d1d3ac9bad0caf7a9c465bb382b924009f0d9168
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Thu Oct 4 16:21:34 2012 +0000

    build: reorder libraries to address linker error
    
    The linker on some systems (for example, Ubuntu 12.04 LTS x86_64)
    appears to be sensitive to the order in which libraries are
    specified. On these systems, if a library 'A' depends on a library
    'B', it has to be specified before 'B' when linking an executable.
    
      * zebra/Makefile.am: Make sure LIBCAP comes after libzebra.
    
      * tests/Makefile.am: Ensure libm comes after libbgp.
    
    Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit b07458a055493dd37cb955ae90f11ae8bc334d3a
Author: Daniel Kozlowski <dkozlowski@sevone.com>
Date:   Wed Sep 26 12:01:24 2012 +0000

    bgpd: flock() dump files (BZ#742)
    
    flock()ing the BGP dump files helps consumers determine when they're
    safe to read.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 3f0bfc9e82e0d735be2cb06d5c4a3028650637bf
Author: Doug VanLeuven <roamdad@sonic.net>
Date:   Wed Sep 26 12:01:23 2012 +0000

    lib: treat OSX as BSD for IP_HDRINCL (BZ#739)
    
    Mac OS X needs HAVE_IP_HDRINCL_BSD_ORDER defined like BSD. If it's not
    defined, it'll fail like this:
    
      *** sendmsg in ospf_write failed to 224.0.0.5, id 0, off 0, len 64,
      interface en0, mtu 1500: Invalid argument
    
    Which is caused by reordering iph->ip_len in
    sockopt_iphdrincl_swab_htosys.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 837d16ccbe0fca413f8927da6a34b1e97ccada8a
Author: Balaji.G <balajig81@gmail.com>
Date:   Wed Sep 26 14:09:10 2012 +0530

    *: use array_size() helper macro
    
    Use the array_size() helper macro.  Replaces several instances of local
    macros with the same definition.
    
    Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 655071f44aab42e89bcece3a93da456fdd0d913a
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue May 8 13:32:53 2012 +0200

    isisd: don't overrun list of protocols
    
    isisd currently has a list of supported protocols as a fixed array of
    size 4.  this can be overran, leading to an overwrite of the ipv4_addrs
    pointer.
    
      * isisd/isis_pdu.c: don't accept more protocols than there's space for
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 80a21dc60fa007bb00437fdc047c3e059232639f
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue May 8 13:32:12 2012 +0200

    lib: add array_size() helper
    
    implement array_size as sizeof(array) / sizeof(array element)
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit f02a09925db53d3e1d29b1917ebbcaa8edf72c12
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue May 8 13:15:45 2012 +0200

    isisd: don't process invalid prefixes from TLVs
    
    it's possible to feed invalid prefixes (1.2.3.4/40 or dead::beef/200) on
    IS-IS.  if this is not checked, it will later cause an assert in
    processing.  let's simply abort processing the TLV if the prefix is
    invalid.
    
      * isisd/isis_tlv.c: check prefix lengths for validity
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 948b6bef7f9cf841a98fe3ea40419696500c8c4c
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Tue May 8 06:27:04 2012 +0200

    isisd: pull up invalid prefix assert()
    
    processing invalid prefixes causes isisd to assert() or otherwise
    misbehave in ip_masklen/apply_mask.  pull up the assert() to indicate
    better there's broken data in isisd's LSDB.
    
      * isisd/isis_spf.c: assert() prefix lengths
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 0fece074e8c9e282ae2cecf9a0a79dc6c930cfb1
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Sun May 6 00:03:07 2012 -0700

    isisd: fix null pointer dereference in send_lsp()
    
      * isisd/isis_pdu.c: (send_lsp) Handle case where there are no LSPs
        on the LSP transmission queue. This can happen if, for instance,
        the queue is cleared because of protocol events before the
        send_lsp thread gets a chance to run.

commit a22ab5a560c7a46f6ecc6feb874c0dbbde9699c6
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Sat May 5 23:50:30 2012 -0700

    isisd: tighten checks on ISIS pdu length
    
      * isisd/isis_pdu.c: Fix problem where isisd would crash if it
        received a LAN IIH with the 'pdu length' field set to zero.
        Similar problems can occur in parsing other ISIS PDUs as well --
        check that the PDU length in an ISIS hello, LSP or SNP packet is
        at least as big as the size of the respective fixed header.

commit 4effc29fb1c33a87a8d386de39c20d36a6956645
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Sat May 5 17:42:43 2012 -0700

    lib: improve sanity checks in stream_set_endp()
    
      * lib/stream.c: (stream_set_endp) Add checks to make sure that the
        supplied 'endp' is within the 'size' of the stream, and that the
        current read pointer 'getp' is not beyond the specified 'endp'.

commit b4154c145a2d1d0679983130413b81d44fbb04ab
Author: JR Rivers <jrrivers@cumulusnetworks.com>
Date:   Mon Sep 24 17:26:53 2012 +0000

    ospfd: respect max-metric over configured cost for summary LSAs
    
    ISSUE
    
    When max-metric router-lsa administrative is invoked on an ABR created with...
    area <area> range <addr/mask>
    the summary LSAs are sent out with 65535 (max-metric) added to the normal cost.
    
    When max-metric router-lsa administrative is invoked on an ABR created with...
    area <area> range <addr/mask> cost <cost>
    the summary LSAs are sent out with <cost> (the max-metric is ignored).  This
    second behavior effectively incapacitates the max-metric function.
    
    PATCH
    
    This patch evaluates the state of the router and if it's isolated as a stub
    router (rfc3137) via `max-metric router-lsa`, we unconditionally uses the
    value of 0xff0000 when advertising summary LSAs.
    
    Signed-off-by: JR Rivers <jrrivers@cumulusnetworks.com>
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
    Reviewed-by: Ayan Banerjee <ayan@cumulusnetworks.com>
    Reviewed-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 821755530e328182c885c98891af799926bd56bd
Author: JR Rivers <jrrivers@cumulusnetworks.com>
Date:   Mon Sep 24 17:26:50 2012 +0000

    ospfd: ABR algorithm not propagating MAXAGE LSAs into area
    
    When a range (or sub-range) is deleted, the area is notified by propagating a
    MAXAGE LSA.  This LSA stays in the database for a while to both insure
    propagation as well as in the off chance that it's useful in the near future.
    
    Unfortunately, the ABR algorithm was treating these MAXAGE LSAs as unchanged and
    not propagating them within the areas.
    
    Signed-off-by: JR Rivers <jrrivers@cumulusnetworks.com>
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
    Reviewed-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
    Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 8fc9e007ee752a982fe47311702d7ff3b9c5b5cd
Author: JR Rivers <jrrivers@cumulusnetworks.com>
Date:   Mon Sep 24 17:26:46 2012 +0000

    ospfd: blackhole route removal for area range
    
    ISSUE
    
    When an area range is created in which there the sub-area has routes that are
    smaller than the range, an ABR creates a blackhole route to cover the range.
    When the range is removed, the blackhole route is not removed.
    
    --A----B----C---
    
    B is an ABR with A in area 1 and C in area 0.  If A advertises `10.2.0.0/30` and
    `10.2.0.4/30` and B is configured with `area 0.0.0.1 range 10.2.0.0/29` a
    blackhole is created on B (`blackhole 10.2.0.0/29 proto zebra`).  When the
    area/range is removed via the command line, the blackhole remains in existence
    even though the "range" route is removed from area 0 and the individual routes
    are propagated.
    
    PATCH
    
    The reason for this behavior is that, prior to this patch, the range is deleted
    from the area's list, so when ospf_abr_manage_discard_routes() gets called,
    there is nothing to clean up.  The patch removes the discard route as part of
    the processing of the command line (ospf_area_range_unset()).
    
    Signed-off-by: JR Rivers <jrrivers@cumulusnetworks.com>
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
    Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit d8a4e42b7d19a87eacc00c825e913907a58f39ee
Author: JR Rivers <jrrivers@cumulusnetworks.com>
Date:   Thu Sep 13 17:17:36 2012 +0000

    lib: improve fletcher checksum validation
    
    OVERVIEW
    
    The checksum used in OSPF (rfc2328) is specified in rc905 annex B.  There is an
    sample implementation in rfc1008 which forms the basis of the quagga
    implementation.  This algorithm works perfectly when generating a checksum;
    however, validation is a bit problematic.
    
    The following LSA (generated by a non-quagga implementation) is received by
    quagga and marked with an invalid checksum; however, it passes both the rfc905
    and rfc1008 validation checks.
    
    static uint8_t lsa_10_121_233_29[] = {
       0x0e, 0x10, 0x02, 0x03,
       0x09, 0x00, 0x35, 0x40,
       0x0a, 0x79, 0xe9, 0x1d,
       0x80, 0x00, 0x00, 0x03,
       0x00, 0x8a, 0x00, 0x1c,
       0xff, 0xff, 0xff, 0xe0,
       0x00, 0x00, 0x36, 0xb0
    };
    
    LS Type: Summary-LSA (IP network)
       LS Age: 3600 seconds
       Do Not Age: False
       Options: 0x02 (E)
       Link-State Advertisement Type: Summary-LSA (IP network) (3)
       Link State ID: 9.0.53.64
       Advertising Router: 10.121.233.29 (10.121.233.29)
       LS Sequence Number: 0x80000003
       LS Checksum: 0x008a
       Length: 28
       Netmask: 255.255.255.224
       Metric: 14000
    
    You'll note that one byte of the checksum is 0x00; quagga would calculate the
    checksum as 0xff8a.
    
    It can be argued that the sourcing implementation generates an incorrect
    checksum; however, rfc905 indicates that, for 1's complement arithmetic, the
    value 255 shall be regarded as 0, thus either values are valid.
    
    EXPLANATION
    
    The quagga ospfd and ospf6d implementations operate by copying the PDU's
    existing checksum in a holding variable, calculating the checksum, and comparing
    the resulting checksum to the original.  As a note, this implementation has the
    side effect of modifying the contents of the PDU.
    
    Evaluation of both rfc905 and rfc1008 shows that checksum validation should
    involve calculating the sum over the PDU and checking that both resulting C0 and
    C1 values are zero.  This behavior is enacted in the rfc1008 implementation by
    calling encodecc with k = 0 (checksum offset); however, this functionality had
    been omitted from the quagga implementation.
    
    PATCH
    
    This patch adds the ability to call the quagga's fletcher_checksum() with a
    checksum offset value of 0xffff (aka FLETCHER_CHECKSUM_VALIDATE) which returns
    the sum over the buffer (a value of 0 indicates a valid checksum).  This is
    similar to the mechanism in rfc1008 when called with k = 0.  The patch also
    introduces ospf_lsa_checksum_valid().
    
    ospf6d had it's own implementation of the fletcher checksum in
    ospf6_lsa_checksum(); it's the same algorithm as in fletcher_checksum().  This
    patch removes the local implementation in favor of the library's as well as creates
    and uses ospf6_lsa_checksum_valid().
    
    quagga's ISIS implementation suffers from the same problem; however, I do not
    have the facilities to validate a fix to ISIS, thus this change has been left to
    the ISIS maintainers.  The function iso_csum_verify() should be reduced to
    running the fletcher checksum over the buffer using an offset of 0.
    
    Signed-off-by: JR Rivers <jrrivers@cumulusnetworks.com>
    Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com>
    Reviewed-by: Nolan Leake <nolan@cumulusnetworks.com>
    Reviewed-by: Ayan Banerjee <ayan@cumulusnetworks.com>
    Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit b0145ddb4bf75d2c8853aa3d0bc7c522f4f17531
Author: Nolan Leake <nolan@cumulusnetworks.com>
Date:   Thu Sep 13 17:17:31 2012 +0000

    zebra: make static routes respect table setting
    
    Make static routes respect non-default routing tables.
    
    BEFORE PATCH
    ------------
    
    ! in zebra.conf
    table 1
    
    ! add static route
    vtysh> ip route 10.0.0.0/30 eth0
    
    cumulus@net-top0:~$ ip route
    default via 192.168.0.2 dev eth0
    10.0.0.0/30 dev eth0  proto zebra
    192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.15
    
    ! nothing in table 1
    cumulus@net-top0:~$ ip route show table 1
    
    AFTER PATCH
    -----------
    
    ! in zebra.conf
    table 1
    
    ! add static route
    vtysh> ip route 10.0.0.0/30 eth0
    
    cumulus@net-top0:~$ ip route
    default via 192.168.0.2 dev eth0
    192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.15
    
    ! static route in table 1
    cumulus@net-top0:~$ ip route show table 1
    10.0.0.0/30 dev eth0  proto zebra
    
    Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com>
    Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 945ea293399af6c9ff3efd07686ff30c3d2a3e8b
Author: Paul Jakma <paul@quagga.net>
Date:   Mon Aug 6 12:17:12 2012 +0100

    Revert "ospfd: Do not fall back to intervening router."
    
    This reverts commit 9289c6ff55cd96c943d23e43fc9e5f987aa965ed.
    
    The commit reverted an earlier change which was fixed a bug that caused
    black-holes to remote destinations with multiple paths, that could occur
    during convergence. Overall, the previous code is more correct.

commit 28971c8cb1138700e87dc7da673e59b5596bb51b
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Fri Aug 17 08:19:50 2012 -0700

    lib/table: add route_table_get_next() and iterator
    
      * lib/table.[ch]
    
        - Add a function (route_table_get_next()) to get the route_node in
          a tree that succeeds a given prefix in iteration order.
    
          This allows one to reliably walk nodes in a tree while allowing
          modifications, and is useful for achieving scale and
          performance. Other approaches are also possible -- the main plus
          point of this one is that it does not require any state about
          the walk to be maintained in the table data structures.
    
        - Add an iterator for walking the nodes in a tree. This introduces
          a new structure (route_table_iter_t) and the following main
          functions.
    
            route_table_iter_init()
            route_table_iter_pause()
            route_table_iter_next()
            route_table_iter_cleanup()
    
          The iterator normally uses node pointers and the existing
          route_next() function to walk nodes efficiently. When an
          iteration is 'paused' with route_table_iter_pause(), it stores
          the last prefix processed. The next call to
          route_table_iter_next() transparently invokes
          route_table_get_next() with the prefix to resume iteration.
    
      * bgpd/bgp_table.[ch]
    
        Add wrappers for the new table features described above.
    
      * tests/table_test.c
    
        Add tests for the new table code.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 67174041d2d9d8908f8b2c915bc0d186d8442c68
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Fri Aug 17 08:19:49 2012 -0700

    bgpd: make bgp_table a wrapper around table library
    
    Make the BGP table code a thin wrapper around the table implementation
    in libzebra.
    
      * bgpd/bgp_table.[ch]
    
        - Use the ROUTE_NODE_FIELDS macro to embed the fields of a
          route_node in the bgp_node structure.
    
        - Add a route_table field to the bgp_table structure.
    
          Initialize the route_table with a delegate, such that the nodes
          in the table are bgp_node structures.
    
        - Add inline wrappers that call route_table functions underneath,
          and accept/return the correct BGP types.
    
      * bgpd/bgp_route.c
    
        Change some code to use inline wrappers instead of accessing
        fields of nodes/tables directly. The latter does not always work
        because the types of some fields need to be translated now.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit f9c1b7bb9b98342f1f3b0bfe3af01844f364dce9
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Fri Aug 17 08:19:48 2012 -0700

    lib: prepare table code for reuse by bgp_table
    
      * lib/table.[ch]
    
        - Add a macro (ROUTE_NODE_FIELDS) that expands to all the fields
          of a route_node structure.
    
        - Add the route_table_delegate_t structure, a function vector
          which allows clients to customize the behavior of one or more
          tables.
    
          The delegate currently contains the 'create_node' and
          'destroy_node' functions, and hence enables a table to use an
          alternative node structure. The alternative node is expected to
          embed the fields of a route_node using ROUTE_NODE_FIELDS.
    
        - Add route_table_init_with_delegate() to create a new table with
          a given delegate.
    
        - Make route_table_init() a thin wrapper around
          route_table_init_with_delegate(). The delegate it passes in
          simply creates/destroys route_node structures as before.
    
        - Add a user data pointer (info) to the route_table
          structure. This can be used by a client to keep per-table state.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 3eb8ef37bc463f88bfa36bd26fd43f7f6ad36c20
Author: Avneesh Sachdev <avneesh@opensourcerouting.org>
Date:   Fri Aug 17 08:19:47 2012 -0700

    lib: bring some changes over from bgp_table to table
    
      * lib/table.c
    
        - Maintain table node count. Expose it via the route_table_count()
          function (from revision cbdfbaa5).
    
        - route_unlock_node(): Add assertion (from revision 228da428).
    
        - route_table_free(): Make static and fix up cleanup code (from
          revision 228da428).
    
        - route_node_delete(): Change to be static.
    
        - Add 'const' qualifier in a couple places.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit ed6e297972318a0070ad4d973401fbc6e0def558
Author: Serj Kalichev <serj.kalichev@gmail.com>
Date:   Fri Sep 7 13:29:42 2012 +0400

    build: fix extract.pl for cross compilation
    
    extract.pl should invoke the C preprocessor for the target system, not the
    host.
    
    * vtysh/extract.pl.in: use @CPP@ to get target cpp
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit bb2315f2878da685fae094aece13409667d21f97
Author: Nick Hilliard <nick@inex.ie>
Date:   Sat Aug 18 15:10:57 2012 +0000

    ripd: clear sockaddr_in before using
    
    ripd_create_socket() failed in bind() on Mac OS X 10.7 since there was garbage
    in unused fields of struct sockaddr_in.
    
    * ripd/ripd.c: zero out struct sockaddr_sin from before filling.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 1b54f798d3cc359bec036db83c1c9bfab75d1244
Author: Brad Smith <brad@comstyle.com>
Date:   Thu Aug 9 00:44:28 2012 +0000

    build: fix autoconf multicast check on OpenBSD
    
    Fix the "BSD struct ip_mreq hack" autoconf test to work with OpenBSD.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 4bed21c402fa1079301d47811a4579985997c881
Author: Brad Smith <brad@comstyle.com>
Date:   Thu Aug 9 00:40:09 2012 +0000

    build: correct libtool parameter used within Makefiles
    
    This corrects the parameters passed to libtool when linking
    the shared libraries. The paramter name is -version-info not
    -version.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 9289c6ff55cd96c943d23e43fc9e5f987aa965ed
Author: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Date:   Sat Jul 7 17:06:14 2012 +0200

    ospfd: Do not fall back to intervening router.
    
    The patch in bug 330 did two things. It add a return value
    whether ospf_nexthop_calculation() failed or not and also
    moved the return stmt for 16.1.1 para 5 so now SPF
    will fallback to the intervening router when no back links are found
    by 16.1.1 para 5. This is wrong and can potentially create black holes
    or routing loops according to Dave Katz and Acee Lindem at ospf@ietf.org
    
    Even if the current code could be proved to be harmless in all cases,
    it adds substantial extra processing and memory allocations.
    
    Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit ba281d3d04053b7c59ecdfdbea91a62c09e9f8a4
Author: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Date:   Sat Jul 7 17:06:13 2012 +0200

    ospfd: use ZEBRA_NEXTHOP_IPV4_IFINDEX
    
    OSPF really needs to specify interface in its routes. Otherwise
    ospf may change the wrong route.
    
    Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
    [fixed up some whitespace errors, split patch in two]
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit c963c20346c0e3cd75735b88beded98389607cd5
Author: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Date:   Sat Jul 7 17:06:13 2012 +0200

    zebra: Add support for ZEBRA_NEXTHOP_IPV4_IFINDEX
    
    Actually implement the IPV4_IFINDEX nexthop type that has been drifting
    around as a definition forever (without any warning about it being a
    placeholder).
    
    Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 57c639f01ec6be70ac858f412d32b638a9756bed
Author: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Date:   Sat Jul 7 17:06:12 2012 +0200

    ospf_spf_process_stubs: use LSA pos to find OSFP interface
    
    This is better than a prefix lookup as prefixes may not be
    unique, that is, the same prefix can exist on several interfaces.
    
    Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit c81ee5c94f5b34375f3ef276fdb9bde9098e7ecb
Author: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Date:   Sat Jul 7 17:06:11 2012 +0200

    ospfd: Optimize and improve SPF nexthop calculation
    
    Maintain router LSA positions in OSPF interface.
    Find the OSPF interface in nexthop_calculation using
    the position in the router LSA. This is possible because
    the only time nexthop_calculation needs to look up interfaces
    is when dealing with its own Router LSA.
    
    This has the following advantages:
     - Multiple PtP interfaces with the same IP address between two routers.
     - Use Unnumbered PtP on just one end of the link.
     - Faster OI lookup for the OSPF interface and only
       done once for PtoP links.
    
    *ospf_interface.h: (struct ospf_interface) Add storage for
    		   storing router LSA position.
    
    *ospf_interface.c: (ospf_if_lookup_by_lsa_pos)
    		   lookup OSPF I/F in an area using LSA position.
    
    *ospf_lsa.c: (router_lsa_link_set) record Router LSA position.
    
    *ospf_spf.c: (ospf_spf_next) Count and pass along lsa position.
    	     (ospf_nexthop_calculation) Add lsa position argument.
    	     call ospf_if_lookup_by_lsa_pos() for OSFP interface handle.
    	     Clean up and remove all calls ospf_if_is_configured() the
    	     rest. Adjust a few debug logs.
    
    Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 7b92589c225ae46417fc3fa0714a1b6f53f19c51
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Mon Jul 23 18:17:57 2012 +0200

    ospfd: avoid exhausting memory with OSPF vertices (BZ#476)
    
    This was found in scale testing at OSR;  ospfd is adding the same link
    over and over again to the SPF tree.  This fix prevents the resulting
    memory corruption from happening and adds a debug message to track
    occurence of this issue and/or confirm a proper fix.
    
    (This version was improved by Scott Feldman over the earlier RFC.)
    
    * ospfd/ospf_spf.c: (ospf_spf_add_parent) loop over existing vertices
      and refuse to add duplicates.
    
    Tested-by: Martin Winter <mwinter@opensourcerouting.org>
    Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit aa5cf24b9de96245f2166ef1c4e9612890ced1b3
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Thu Jul 19 16:11:50 2012 +0200

    lib: make IPv6 prefix parser slightly more strict
    
    This makes it possible to have both "show babel route A.B.C.D/M"
    and "show babel route X:X::X:X/M" commands at the same time without
    the parser complaining about ambiguity.
    
    * lib/command.c: only accept STATE_DOT after : was seen.
    
    Reported-by: Juliusz Chroboczek <jch@pps.jussieu.fr>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit ee1ac2d52a6656e589ca2fb4feb3ec5fd366ecb7
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Thu Jul 19 12:58:59 2012 +0200

    build: fix isisd topology out of tree build
    
    isisd got the include directory wrong on building with a separate build
    directory.
    
      * configure.ac: adjust ISIS_TOPOLOGY_INCLUDES
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 7f062c217b262e362a3362c677dea6c5e820adf1
Author: David Lamparter <equinox@diac24.net>
Date:   Mon Feb 1 16:41:26 2010 +0100

    zebra: lingering IP address after deletion (BZ#486)
    
    zebra address bookkeeping is a mess. this is just a workaround to have
    IPv4 address deletion somewhat working on Linux.
    
    the if_unset_prefix call is synchronous, when it returns success the
    address deletion completed successfully. this is either signaled by a
    netlink ACK or by an OK return value from ioctl().
    
    This version is wrapped by #ifdef HAVE_NETLINK so we don't touch the
    BSDs for now.
    
    * zebra/interface.c: On Linux, update zebra internal state after
      deleting an address.
    
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 1080c13f5d3979149c1950a1c46f45e2d4bd0dc8
Author: Joachim Nilsson <troglobit@gmail.com>
Date:   Wed May 30 08:15:48 2012 +0200

    configure: Add --with-pkg-extra-version=VER for packagers/distributions.
    
    This change adds a --with-pkg-extra-version option to ./configure to allow
    packagers and distributions to fine tune the version displayed to the end
    user to assist in support. It is also very useful when reporting bugs on
    the official Quagga mailing lists.
    
    There are two ways of utilsing this functionality:
    
          a) ./configure --with-pkg-extra-version=-wmo1
          b) EXTRAVERSION=-wmo1 ./configure
    
    The latter is a common way for many distributions to add extra version
    strings to signify their own patch level to a given package.
    
    Also, minor whitespace fix in configure summary.
    
    Signed-off-by: Joachim Nilsson <joachim.nilsson@westermo.se>
    Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit f710888ddd413730f6025ed5d9a89b124836cde6
Merge: 18a4e37 0402ca4
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Fri Jul 13 14:05:55 2012 +0200

    Merge remote branch 'vincentbernat/feature/ospfv3-mib'

commit 18a4e3715f89337ac8b70f6f63cc131c3218c82c
Merge: a47c583 8046ba6
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Fri Jul 13 14:05:36 2012 +0200

    Merge remote branch 'vincentbernat/feature/agentx'

commit 0402ca4e92fa0904d5ee0926482ebca08ffd5c81
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Tue Jul 10 09:27:57 2012 +0200

    ospf6d: fix segfault when requesting inexistant interfaces or areas

commit bf836661ef8ef880350bc41f0a82566ed5075066
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Mon Jun 4 14:36:12 2012 +0200

    ospf6d: add SNMP notifications/traps support
    
    Only implement ospfv3NbrStateChange and ospfv3IfStateChange.

commit c349bb86927d1f5fc8aa8ebc6f553786f8e70634
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Mon Jun 4 12:59:20 2012 +0200

    ospf6d: add SNMP support for ospfv3*LsdbTable
    
    This includes:
     - ospfv3AsLsdbTable
     - ospfv3AreaLsdbTable
     - ospfv3LinkLsdbTable

commit 3bc4f84efe147ebc65fccbe898b81d78341c542b
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Mon Jun 4 11:40:04 2012 +0200

    ospf6d: add SNMP implementation of ospfv3IfTable

commit ea86e4042b7459fbf5d96835c509cb743bf013c0
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Mon Jun 4 10:29:49 2012 +0200

    ospf6d: complete SNMP implementation of ospfv3AreaTable

commit 2c5f148065c074d51ff10808a2b6ac2b3296a828
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Fri Jun 1 11:38:34 2012 +0200

    ospf6d: complete SNMP implementation for scalar objects

commit 061bc735b4fb3b8768fa5f52295d85838ed55770
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Thu May 31 20:21:15 2012 +0200

    ospf6d: add SNMP support for ospfv3NbrTable

commit 0f0ab5180877559e92b71daacb8a106a815a5ade
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Tue May 22 13:34:24 2012 +0200

    snmp: fix OSPFV3-MIB implementation
    
    Use the real MIB from RFC 5643. Fix used ASN1 types. Indexes are not
    exported any more (they are "no access"). Fix some endian
    issues. Also, ID are just integers, not IPv4 addresses.
    
    No additional OID are supported in this commit.

commit 8046ba6ec4d6e87bf8da6563c0f3e5e66c4652b3
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Thu May 31 13:30:28 2012 +0200

    snmp: let handlers accept OID from a lesser prefix
    
    Most table handlers do not expect to be given an OID whose prefix is
    outside what they can handle. This is not a problem with the SMUX
    implementation since it always correct the OID such that the prefix
    matches. However, this is not the case for the AgentX
    implementation. A new function, smux_header_table() is used to do this
    normalization.

commit 0ff4b9c96793898429052de576d8da368e48997e
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Fri May 25 12:04:51 2012 +0200

    agentx: add appropriate documentation

commit b7c0d0651cd64f644d02ef5e4d1b82febe7e57d8
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Fri May 25 11:17:01 2012 +0200

    agentx: handle SNMP traps
    
    smux_trap() signature has been changed to provide appropriate level
    information to send SNMPv2 notifications. This includes the addition
    of the enterprise OID to use (from which is derived the SNMP trap OID)
    and the MIB registry to locate the appropriate function for variable
    bindings provided by the trap.
    
    The SMUX implementation has been updated but ignore the provided
    enterprise OID. Instead, it still uses the SMUX peer OID to keep
    compatibility with previous versions of Quagga. The SMUX
    implementation also ignores the provided MIB registry since it uses
    smux_get() function to grab the appropriate values. This is not
    possible with the AgentX implementation since there is no such
    function provided by NetSNMP.

commit b8cf46b715b2c21db5dce8118c70b4dd9b5255a3
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Fri May 25 08:56:44 2012 +0200

    smux: drop findVar element from trap object struct
    
    This element was not unused.

commit 4b89e45d928d41bb5d32a00ba7b402d6a3bbdf44
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Thu May 24 21:22:01 2012 +0200

    smux: remove `tick` argument from smux_trap()
    
    smux_trap() contains an argument whose use appears to be to set
    sysUpTime.0/timestamp field in SNMP trap. However, this value is not
    used in smux_trap(). Moreover, it is expected that this field is the
    value of sysUpTime.0 when the trap was sent and not any other time
    related to the trap. To avoid any confusion, we remove this field from
    the signature of the function.

commit d6be5fb9bc41ea77547204eeedd12132b26ad662
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Thu May 24 09:44:43 2012 +0200

    agentx: add AgentX support to Quagga.
    
    --enable-snmp will enable AgentX support in Quagga. SMUX is still here
    and can be enabled with --enable-snmp=smux. AgentX support can be
    enabled with "agentx" in configuration file. As for SMUX, this command
    is not understood by vtysh. It can be disabled with "no agentx",
    though there is no real use of this since this command cannot be used
    with vtysh.
    
    If "agentx" and "no agentx" command were added to vtysh, it would not
    be possible to disable agentx support after enabling it because
    NetSNMP does not expose the appropriate methods for this.
    
    The internals of AgentX are hidden by NetSNMP. Therefore, we don't
    have a file descriptor to add to the threading system. We do not have
    the timers to set either. Therefore, the event loop is modified to
    make use of snmp_select_info() from NetSNMP.
    
    Traps are not supported yet.

commit 3a4c96885ec878ae4631b0fb7bb7839578725976
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Wed May 23 00:52:46 2012 +0200

    smux: isolate SMUX implementation from SNMP implementation
    
    lib/snmp.c gets OID related helper functions that can be used with
    another SNMP interface. smux.h is cleaned of SMUX specific bits to
    only expose functions that may be used by an alternative
    implementation. We also do not redefine functions already present in
    NetSNMP. Just use the appropriate headers.

commit 08d7f6533ecc0f935a76918c462982004534864d
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Tue May 22 22:29:17 2012 +0200

    build: use net-snmp-config to configure NetSNMP
    
    The correct method to link to NetSNMP is to use net-snmp-config (which
    is like pkg-config). Explicit link to libcrypto is also dropped
    (NetSNMP libs are linked to libcrypto, no need to link Quagga to
    it). Moreover, @SNMP_INCLUDES@ is dropped because useless. Due to a
    bug in configure.ac, it was properly populated.

commit 6b1e37f8537fa2a4560de32e83ca5089763e2d39
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Tue May 22 22:15:20 2012 +0200

    build: only define HAVE_SNMP
    
    NetSNMP is the only SNMP implementation for Quagga. We don't need two
    different symbols.

commit 9e7a548ce421660b0d22bfeb90c2b2b53742aac7
Author: Vincent Bernat <bernat@luffy.cx>
Date:   Tue May 22 14:32:22 2012 +0200

    build: allow configure and build in a separate directory
    
    Some .h files in lib/ are autogenerated. The search path should
    include the build directory and the source directory. They usually
    match but sometimes, they may be different. For example:
    
     $ mkdir build
     $ cd build
     $ ../configure
     $ make

commit a47c5838e9f445ab887ad927706b11ccbb181364
Author: David Lamparter <equinox@opensourcerouting.org>
Date:   Thu Jun 21 09:55:38 2012 +0200

    isisd: fix typo in topology generator (BZ#731)
    
    There was a "lsp->" missing before "level" in line 2416.
    (introduced by git commit e38e0df)
    
    Reported-by: Seblu <seblu@seblu.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit bb782fb50efcd972d4357f9a7164de2c317d2eef
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Wed Jun 20 16:34:01 2012 +0200

    bgpd: Partially revert f018db8, fixes BZ#730
    
      The change from bgp_node_get() to bgp_node_lookup() broke aggregation.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Tested-by: Martin Winter <mwinter@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit e2c38e6c9767e30d5683022653b1cf91b186f9d4
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Wed Jun 20 17:45:50 2012 +0200

    bgpd: Fix for commit 6a4677b7, fixes BZ#729
    
      The timers are rearmed after events processing. After 6a4677b7 we
    do not generate events that can rearm the holdtime timer.
    
      Fix it's to call bgp_timer_set() directly as it's done from bgp_event().
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Tested-by: Martin Winter <mwinter@opensourcerouting.org>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit c9e4f8623642fc005c97830256000bef5680aa26
Author: Paul Jakma <paul@quagga.net>
Date:   Thu Jun 14 10:42:39 2012 +0100

    tests: BGP unit tests to set BGP_OPT_NO_LISTEN so they can run
    
    BGP tests had been broken by auto-creation of listen socket. This allows
    them to run at least, though at least 1 test seems to have other breakage,
    aspath_test.

commit cccbc0151883cfb4f43d6fa0a4a3caedc27e6cf5
Author: Paul Jakma <paul@quagga.net>
Date:   Thu Jun 14 10:40:26 2012 +0100

    bgpd: Add "no listen" socket option for the BGP master configuration
    
    * bgpd.h: add a BGP_OPT_NO_LISTEN option for the master BGP configuration,
      to prevent any listen socket being created automatically. Allows code
      to be used outside of BGP daemon settings.
    * bgpd.c: (bgp_get) honour above the flag, suppress auto-creation of listen
      socket on first BGP instance if set.
      (bgp_option_set) whitelist BGP_OPT_NO_LISTEN

commit 2fb2a455263c569119ca32be59b0337a3d8cd9b3
Author: Paul Jakma <paul@quagga.net>
Date:   Thu Jun 14 10:37:40 2012 +0100

    lib: Add back sockunion_str2su
    
    * sockunion.h: Add back sockunion_str2su, its removal breaks things needlessly
      (e.g. our own unit tests).
    * sockunion.c: (sockunion_str2su) implement on top of str2sockunion.

commit ad12dde6f9596997337ebc210dd2d4593438556b
Author: Paul Jakma <paul@quagga.net>
Date:   Wed Jun 13 22:50:07 2012 +0100

    Revert "bgpd: Make socket init separate, so unit tests work again."
    
    This reverts commit 7621f336e2f346edee43227f0b1ef93fe769720b. See bug #727

commit 22714f99c4ffeb4d1bade7ad6374adeba0e06e4c
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:53:14 2012 +0000

    lib: do not allocate/free thread funcnames
    
      This avoids memory heap fragmentation and imposses less load on the
    system memory allocator.
    
    * thread.h: FUNCNAME_LEN defined to 64 (ISO C99 says max 63)
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    [changed FUNCNAME_LEN to a less arbitrary value]
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 64018324d5e5071eea3b3f72f939d91dc7aef029
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:53:13 2012 +0000

    lib: micro-op for thread_get()
    
    thread_trim_head() already checks that the list is not empty.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 41af338ecd56b9891d996f0fc850e02318b0c01a
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:53:12 2012 +0000

    lib: remove RUSAGE_T from struct thread
    
    * thread.c: It's only temporarily used in thread_call() to calculate the
      diffs. Saves 80 bytes per copy.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 47d3b6078a6c885e03d28bae3397b71a827473f5
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:53:11 2012 +0000

    micro-op bgp_node_[get|lookup]() and route_node_[get|lookup]()
    
      Reduce indirection for values that doesn't change in the loop.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    [adjusted after dropping previous patch]
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit f018db83a0746f9336d04e50dd06f3bbf6565f1c
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:53:10 2012 +0000

    bgpd: optimize bgp_aggregate_[increment|decrement]()
    
      If there were no aggregates configured this functions were allocating
    and freeing a struct bgp_node for every call, and it's called for every
    prefix received.
    
    * bgp_route.c: Bail out early if the there are no aggregates configured.
      Change from bgp_node_get() to bgp_node_lookup() that does not allocate
      a new struct bgp_node if not found.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 343aa82219c0cab0315e29267eb303127215caea
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:53:08 2012 +0000

    bgpd: optimize bgp_update_main() in the soft_reconfig case
    
    Avoids 3 checks per call.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 6a4677b723b6f79997ca15ee202c36d528d3dfcf
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:53:07 2012 +0000

    bgpd: optimize holdtime timer cancelling
    
    * bgp_packet.c: (bgp_update_receive) for every update received we queue
      an event just to cancel the holdtime timer, done in bgp_fsm_update().
      Instead cancel the timer directly an avoid a scheduling pass.
    
      This incidently fixes another problem found on a slow box, where thousands
    of events threads were queued, and run, but never freed, because they are
    moved to the unused list that grows without bounds.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 577ac57b78e0ee3cbc5afdb5f54a660bd0126136
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:53:06 2012 +0000

    bgpd: Remove useless initialization
    
    It's initialized below
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 558d1fec11749d3257e32561d45b5c1ec0622cf4
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:53:05 2012 +0000

    bgpd: reduce struct attr_extra allocations/freeing
    
    Try to use on stack structs for temporary uses.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 489d005a9ad94675f40dc7bceff6176cfad36d45
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:53:03 2012 +0000

    bgpd: use on stack struct attr_extra in bgp_update_receive()
    
    Reduce memory heap fragmentation and pressure on the memory allocator.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 6182d65b23fc0362b173e2a9314fa4551523a1c2
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:53:02 2012 +0000

    bgpd: fix struct attr_extra leak in bgp_default_originate()
    
      The call to bgp_attr_default_set() above creates the attr_extra struct,
    but the attr.extra = NULL initialization was leaking it.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit b9f1dca10f9a9bf853a9999a117c8cdeec5b7b69
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:53:01 2012 +0000

    bgpd: use on stack struct attr_extra in bgp_attr_unintern()
    
      Reduce memory heap fragmentation and pressure on the memory allocator.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 1a2fd7078f943e2207ee0f1b0dafdcd2d9c81925
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:53:00 2012 +0000

    bgpd: cleanup bgp_attr_unintern()
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 938ef3a22535292dd36c250e5329f97d977e51df
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:52:59 2012 +0000

    bgpd: use on stack struct attr_extra on bgp_attr_aggregate_intern()
    
    Reduce memory heap fragmentation and pressure on the memory allocator.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 7fb0cd82c26492004a106bec7ca4afdf4684fabb
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:52:58 2012 +0000

    bgpd: reduce attrhash_make_key() indirections
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit e16a413313cf985ae2b8d2f1a9e8fd0ab6f5b9fc
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:52:57 2012 +0000

    bgpd: remove some useless initializations
    
    * bgp_attr.c: (bgp_attr_default_intern) bgp_attr_default_set() already
      initializes the memory. Fixes a struct attr_extra leak.
    * bgp_route.c: Remove useless on stack struct initializations.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 8ff56318a8bd188cfcc1cdab689c46c326b50d38
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:52:56 2012 +0000

    bgpd: optimize bgp_info_cmp()
    
    * bgp_route.c: (bgp_info_cmp) Reduce indirections, precalculate some
      values that are used several times, reduce conditionals.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit c76275ee960c708408646d8a680b201b27cb9c1a
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:52:55 2012 +0000

    bgpd: optimize loops on [e]community_hash_make()
    
      This change reduces loop count. Less jumps.
    
    * bgp_community.c: One loop per community.
    * bgp_ecommunity.c: One loop per ecommunity.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 6d85b15bbb2fd3c263d5d4b402c88ff348af877b
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:52:54 2012 +0000

    bgpd: remove calls to peer_sort() from fast-path
    
      peer_sort() it's called so much as to be annoying. In the assumption
    that the 'sort' of the peer doesn't change during an established session,
    I have changed all calls to peer_sort() in the 'fast-path' to only check
    the 'sort'. All the calls from the vty and such still recalculate the sort
    and store it in the peer.
    
      There's a lot of other calls to peer_sort() that could be changed but some
    maube tricky, someone more knowledgeable may try to reduce them.
    
      This hits peer_sort() from 5th out of the stadium^H^H list on a full
    internet table loading profiling session.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 14542f3edaa43113880e8bb69612c553f02bdf22
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:52:53 2012 +0000

    bgpd: debug buffers cleanup and optimization
    
    Just the first change pushes bgp_update_receive() from 6th to ~14th on a
    full internet table load profiling session.
    
    * bgp_debug.c: (bgp_update_receive) The attrstr initialization is expensive,
      moved under the debug conditional where it is used and just initialize the
      first char to NULL.
      (bgp_update_default_send) Initialize attrstr needed for bgp_dump_attr().
      Moved some buffers used for printing IP[4|6] addresses under the debug
      conditionals that use them and reduced its size.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 10f9bf3f2021f874e574e4ebae9413bee982ed2b
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:52:52 2012 +0000

    bgpd: optimize bgp_nexthop_self()
    
      This function scores 2nd, profiling a full internet table load. It's called
    for every prefix received.
      Instead of looping in the interface lists comparing addresses use a hash
    to mantain them.
    
    * bgpd.c: Init the own address hash.
    * bgp_nexthop.c: Introduce methods to maintain an own address hash.
      (bgp_connected_add) add addresses to the hash.
      (bgp_connected_delete) delete addresses from the hash.
      (bgp_nexthop_self) lookup addresses in the hash. Removed the unused afi_t
      parameter.
    * bgp_route.c: (bgp_update_main) Micro-optimization, rearranged condition to
      not lookup the hash for bogus nexthops (0.0.0.0 or a class D/E address)
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit f669f7d25f0f491d5e487897227ff434aef20406
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 16:52:51 2012 +0000

    bgpd: optimize aspath string representation and assegments handling
    
    * bgp_aspath.h: Add str_len to struct aspath.
    * bgp_aspath.c: Save the aspath string representation length and use it
      instead of strlen().
      (aspath_make_str_count) assign the string buffer directly for
      consistency with the string length and change the return type to void.
      (aspath_dup) use str_len and copy the string instead of calling
      aspath_make_str_count().
      (assegment_data_new) change from XCALLOC to XMALLOC. All users initialize
      the memory before use.
      (assegment_data_free) unused, removed.
      (aspath_intern) check that there's always a ->str pointer.
      (aspath_hash_alloc) reuse assegments and string representation instead of
      copying them.
      (aspath_parse) now aspath_hash_alloc does not dupes memory, free the
      temporary structures only if the aspath it is in the hash.
      (aspath_cmp_left) remove useless NULL initialization.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 8692c506520f6b268525b80890702432c95f13c4
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 15:17:34 2012 +0000

    bgpd: fix crash with vpnv4 soft-reconfiguration
    
    bgp_afi_node_get() expects a non-NULL prd for a SAFI_MPLS_VPN prefix.
    
    * bgp_route.c: pass down the struct prefix_rd from bgp_soft_reconfig_in()
      and bgp_soft_reconfig_rsclient().
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 1b79fcb646f66682a62cf34f3cc343b1a9706699
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon May 7 15:17:31 2012 +0000

    lib: fix thread_cancel_event()
    
      ospfd was crashing some times on neighbour going down. The cause was that
    ospf_nsm_event() was accessing already freed memory in ospf_nbr_delete()
    call from ospf_nsm_event().
    
      What happens is that since commit b5043aab (lib: fix incorrect thread
    list...) now a thread can be on the event and ready lists but
    thread_cancel_event() doesn't account for that.
    
    * thread.c: (thread_cancel_event) loop on the ready list too to cancel
      pending events.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 7c9c6aebe8daabece9e78d47727dcdcb757c0a63
Author: Roman Hoog Antink <rha@open.ch>
Date:   Wed May 9 06:35:34 2012 +0000

    lib: drop heuristic IPv6 address recognition
    
    * command.c: (cmd_ipv6_match) Drop IPv6 address recognition
      heuristics and solely rely on inet_pton, because strings
      like "abcd" were mistaken for IPv6 addresses.
      This affects e.g. the command "neighbour WORD peer-group",
      which won't work with words consisting of up to 4 characters
      between 'a' and 'f' and digits.
    
    From: Roman Hoog Antink <rha@open.ch>
    [full delete instead of #if 0]
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 36735ed988f96810e78d0ace2f7d8e6397db5c50
Author: Joachim Nilsson <troglobit@gmail.com>
Date:   Wed May 9 13:38:36 2012 +0200

    zebra: fix up compilation without rtadv/IPv6
    
    let's ground the rtadv.h file if route advertisements are disabled. And
    fix up the CLI for it, as well as move the "show ip mroute" to its
    proper place.
    
      * zebra/rtadv.h: #ifdef RTADV
      * zebra/main.c: #ifdef RTADV
      * zebra/zebra_vty.c: move "show ip mroute" out of #ifdef IPV6
    
    From: Joachim Nilsson <troglobit@gmail.com>
    [moved #ifdef RTADV to rtadv.h]
    Signed-off-by: David Lamparter <equinox@opensourcerouting.org>

commit 42cb6b6655d0cc141374ec373220d244f81fbba0
Author: G.Balaji <balajig81@gmail.com>
Date:   Mon Apr 2 23:31:29 2012 +0530

    zebra: feed Connected routes into MRIB
    
    The SAFI_MULTICAST RIB needs to contain Connected routes so that the
    nexthop lookup does not fail and so that multicast routing daemons do
    not need to sidestep and look into SAFI_UNICAST to be aware of connected
    subnets.
    
      * zebra/connected.c: add & delete connected in SAFI_MULTICAST
    
    Signed-off-by: G.Balaji <balajig81@gmail.com>
    [merged add/delete patches]
    Signed-off-by: David Lamparter <equinox@diac24.net>

commit a4c06dec1ebe41dd4444d387478500e6022e2209
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Fri Apr 20 14:28:40 2012 +0200

    zebra: no need to clear memory of the netlink buffers
    
    The memory is always written before sending. Clearing it before use
    slows netlink_route_multipath() down considerably and it's pretty
    noticeable in a full-internet table scenario loading.
    
      * zebra/rt_netlink.c: subtract bulk buffer size from clear
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    [reworded commit message]
    Signed-off-by: David Lamparter <equinox@diac24.net>

commit 682ca04c4032bfbf31e51df2472345fda1ff7b2c
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Tue Apr 10 16:57:27 2012 +0200

    bgpd: cleanup, use correct buffer sizes for sockunion2str()
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@diac24.net>

commit 37beff6feb7c1715a19b59b8a87edcb6b50d5ac2
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Tue Apr 10 16:57:26 2012 +0200

    lib: remove sockunion related unused definitions
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@diac24.net>

commit 128293286a8be01b99ed60db53e19ce6e2669558
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Tue Apr 10 16:57:25 2012 +0200

    lib, zebra: extend use of sockunion2ip macro
    
      * lib/sockunion.c,
      * zebra/zebra_rib.c: replace ->sin.sin_addr.s_addr with sockunion2ip
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    [reworded commit message]
    Signed-off-by: David Lamparter <equinox@diac24.net>

commit c63b83fe8d1addecc949258479b8d54180c4da60
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Tue Apr 10 16:57:24 2012 +0200

    bgpd: Fix memory leak of some "show ip bgp neighbor" commands
    
    sockunion_str2su() use is prone to memory leaks. Remove it's use all over
    the code.
    
    At least these commands leaked a sockunion union:
        - show ip bgp vpnv4 ... routes
        - show ip bgp ... received prefix-filter
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@diac24.net>

commit d227617a972bb20a974be68bea5032e692a0970f
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Tue Apr 10 16:57:23 2012 +0200

    lib: remove last uses of sockunion_su2str()
    
    Use of this function is prone to memory leaks.
    
    This fixes a memory accounting bug for vty denied connections.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@diac24.net>

commit 0c5ed3ed00f630ae95dc2dfd4b5a938683e2a99e
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Tue Apr 10 16:57:22 2012 +0200

    bgpd: Fix memory leak with 'set ip next-hop peer-address'
    
    A route-map with the mentioned statement causes a memory leak for every
    prefix that matches.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@diac24.net>

commit 4fe080d7ee4c924a962d14423d94b4b8d8aba110
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Fri Apr 13 13:46:08 2012 +0200

    bgpd: fix for route-maps with "match peer local" statements
    
    A route-map with a 'match peer local' statement it's shown like
    'match peer (null)' on config output...
    
    ... and it's unparsable on daemon startup.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: David Lamparter <equinox@diac24.net>

commit ddc943dec3c017583f81cce388c7d453293156c7
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Fri Apr 13 13:46:07 2012 +0200

    bgpd, zebra: Fix format for some metric outputs
    
    Metrics are unsigned values.
    
      * bgpd/bgp_{debug,route,vty}.c,
      * zebra/zebra_vty.c: replace %d with %u for metrics & distances
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    [reworded commit message]
    Signed-off-by: David Lamparter <equinox@diac24.net>

commit 8794e8d229dc9fe29ea31424883433d4880ef408
Author: Paul Jakma <paul@quagga.net>
Date:   Mon Feb 13 13:53:07 2012 +0000

    bgpd: Fix regression in args consolidation, total should be inited from args
    
    * bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args.

commit 7621f336e2f346edee43227f0b1ef93fe769720b
Author: Paul Jakma <paul@quagga.net>
Date:   Tue May 1 16:24:35 2012 +0100

    bgpd: Make socket init separate, so unit tests work again.
    
    * Separate out BGP socket initialisation from bgp_get, and make it an
      explicit function. Allows unit tests to work again and probably also
      benefits dry-run.
    * bgpd.c: (bgp_get) move socket init out...
      (bgp_socket_init) to here
    * bgp_main.c: and call it after dry-run.
    * bgpd.h: (bgp_socket_init) add prototype

commit 1dba254e107dd0c4254d58e9304fc6293b46fd4d
Author: Paul Jakma <paul@quagga.net>
Date:   Tue May 1 16:20:33 2012 +0100

    tests: Fix some compile errors and warnings
    
    * aspath_test.c: match changes in aspath_unintern. Fix printf size_t warning.
    * bgp_capability_test.c: compile warnings.
    * bgp_mp_attr_test.c: update for attr parser context struct
    * ecommunity_test.c: ecommunity_free/ecommunity
    * test-checksum.c: some unused vars and funcs without need of prototypes.

commit 6ebeebb50610cc86d16e56bc1a33d63340094215
Author: Paul Jakma <paul@quagga.net>
Date:   Wed May 2 11:01:01 2012 +0100

    Revert "tests: disable broken tests/bgp_mp_attr_test.c"
    
    This reverts commit d78e2b8b562f8496aaf2977f7371415b71e82433. Next 2
    commits fix it.