summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* bgpd: Update dump to allow Extended Time FormatAlexis Fasquel2015-12-085-164/+182
| | | | | | | | | | | Allow the bgp dump functionality to handle the Extended Time format as specified in RFC 6396. Fixes a segmentation fault with multiple dump rules as well. Signed-off-by: Alexis Fasquel <alexis@pch.net> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* lib: add function to get precise remaining time of timer threadChristian Franke2015-12-082-0/+9
| | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ripd, isisd: fix warnings that make the build failChristian Franke2015-12-082-4/+4
| | | | | | | | | | | These issues have been found by running buildtest.sh using GCC 5.2.0 and Clang 3.7.0 Fixes pointer checks that can never be null Signed-off-by: Christian Franke <chris@opensourcerouting.org> Tested-by: NetDEF CI System <cisystem@netdef.org> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* zebra: Fix change of distance on ipv6 route creating duplicate routesDonald Sharp2015-12-081-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you enter: ipv6 route 2002:44:44:44::44/128 swp1 4 ipv6 route 2002:44:44:44::44/128 swp1 99 You get: host-111# show ipv6 route Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv6, I - IS-IS, B - BGP, A - Babel, T - Table, > - selected route, * - FIB route S 2002:44:44:44::44/128 [99/0] is directly connected, swp1 S>* 2002:44:44:44::44/128 [4/0] is directly connected, swp1 This problem is fixed in the ipv4 code path. Copying the same code from the ipv4 into the ipv6 code path fixes the issue. With the fix: host-111(config)# ipv6 route 2002:44:44:44::44/128 swp1 4 host-111(config)# do show ipv6 route Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv6, I - IS-IS, B - BGP, A - Babel, T - Table, > - selected route, * - FIB route S>* 2002:44:44:44::44/128 [4/0] is directly connected, swp1 C * fe80::/64 is directly connected, swp1 C>* fe80::/64 is directly connected, eth0 host-111(config)# ipv6 route 2002:44:44:44::44/128 swp1 99 host-111(config)# do show ipv6 route Codes: K - kernel route, C - connected, S - static, R - RIPng, O - OSPFv6, I - IS-IS, B - BGP, A - Babel, T - Table, > - selected route, * - FIB route S>* 2002:44:44:44::44/128 [99/0] is directly connected, swp1 C * fe80::/64 is directly connected, swp1 C>* fe80::/64 is directly connected, eth0 host-111(config)# Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* zebra: Combine static_uninstall_ipv[4|6] into one functionDonald Sharp2015-12-081-65/+4
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* zebra: combine static_ipv[4|6]_nexthop_same into one functionDonald Sharp2015-12-081-22/+16
| | | | | | Combine the static_ipv[4|6]_nexthop_same into static_nexthop_same. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* zebra: Combine static_install_ipv[4|6]Donald Sharp2015-12-081-100/+41
| | | | | | | Combine the static_install_ipv[4|6] function calls into static_install_route. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* zebra: Remove HAVE_IPV6 from rib.h and zebra_rib.cDonald Sharp2015-12-082-19/+4
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* zebra: Collapse struct static_ipv[4|6] into struct static_routeDonald Sharp2015-12-084-95/+61
| | | | | | | | The 'struct static_ipv4' and 'struct static_ipv6' structures are essentially the same. Collapse them into one data structure 'struct static_route'. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* zebra: implement per-route mtu handlingTimo Teräs2015-12-089-17/+93
| | | | | | | | This commits allow overriding MTU using netlink attributes on per-route basis. This is useful for routing protocols that can advertice prefix specific MTUs between routers (e.g. NHRP). Signed-off-by: Timo Teräs <timo.teras@iki.fi>
* zebra: make ZEBRA_FLAG_CHANGED internal statusTimo Teräs2015-12-083-5/+5
| | | | | | | | | This flag is used internally in zebra only. And it makes no sense to expose it over the zclient API, as having it set from client could corrupt the internal state. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
* lib: Memory reporting fails over 2GBDonald Sharp2015-12-081-28/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old style mallinfo() function uses an 'int' to report memory usage data to the program. Unfortunately modern architectures can chew through 2gb of memory like a buzz saw hitting some warm butter, especially in the case of a memory leak or memory fragmentation. When a daemon uses more than 2gb of memory, just indicate it's gotten large and we don't know anymore. Pre-change behavior: Robot-1# show memory System allocator statistics: Total heap allocated: 16777216 TiB Holding block headers: 1288 KiB Used small blocks: 0 bytes Used ordinary blocks: 535 MiB Free small blocks: 768 bytes Free ordinary blocks: 16777216 TiB Ordinary blocks: 266107 Small blocks: 24 Holding blocks: 2 Post-change behavior: Robot-1# show memory System allocator statistics: Total heap allocated: 1572 KiB Holding block headers: > 2GB Used small blocks: 0 bytes Used ordinary blocks: 1443 KiB Free small blocks: 32 bytes Free ordinary blocks: 129 KiB Ordinary blocks: 2 Small blocks: 1 Holding blocks: 2 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgpd: Add support for timer commands with peer-group syntaxDaniel Walton2015-12-082-27/+105
| | | | | | | The peer-groups parser is missing advertisement-interval and 'timers connect' Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Timo Teräs <timo.teras@iki.fi>
* bgpd: update rtt on soft clearTimo Teräs2015-12-081-0/+3
| | | | | | | | rtt is calculated dynamically by the kernel. Refresh it on soft clear. Fixes: ef757700d0 "bgpd: allow using rtt in route-map's set metric" Signed-off-by: Timo Teräs <timo.teras@iki.fi>
* bgpd: check rtt later after the real peer is knownTimo Teräs2015-12-081-1/+1
| | | | | | | | | | | OPEN message handler moves the connection from the temporary "struct peer" (used to accept it) to the real "struct peer" based on the configuration. RTT needs to be updated only to the real struct peer, and this patch moves the RTT query to point where realpeer is known. Fixes: ef757700d0 "bgpd: allow using rtt in route-map's set metric" Signed-off-by: Timo Teräs <timo.teras@iki.fi>
* zebra: fix rtadv detectionTimo Teräs2015-12-081-6/+2
| | | | | | | | | The GLIBC macro tests were just plain wrong. Glibc 2.1 is ancient and the support should be detected via configure.ac test, not macro test. Build with HAVE_RTADV but !RTADV is broke after vrf, so for now, just define RTADV always if HAVE_RTADV is there. Signed-off-by: Timo Teräs <timo.teras@iki.fi>
* pimd: Limit pim hello log messagesDonald Sharp2015-12-083-80/+89
| | | | | | | | pimd was outputting allot of data surrounding pim hello packets. In addition the debugging was inconsistent and not all turned on via 'debug pim packet hello'. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgpd: Fix bgp_btoa to compileDonald Sharp2015-12-082-18/+41
| | | | | | | | | bgp_btoa was abandoned at some point in time in the past. This commit gets it to compile and to be added to /usr/bin. At this point in time no work has done for 'correctness' of execution Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* lib: Add zlog_hexdump() for debuggingDaniel Walton2015-12-082-0/+44
| | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgpd: crash from not NULLing freed pointersDaniel Walton2015-12-082-31/+87
| | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> There was a crash from not NULLing out peer->hostname but I cleaned up a bunch of other suspect ones as well.
* ospfd: Lower the default OSPF spf timers to '0 50 5000'Daniel Walton2015-12-081-3/+3
| | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgpd: Lower BGP's default keepalive/holdtime to 3s/9sDaniel Walton2015-12-081-2/+2
| | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgpd: Remove BGP_ERROR_START_TIMER, it was no longer usedDaniel Walton2015-12-081-1/+0
| | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgpd: Enable "bgp log-neighbor-changes" by defaultDaniel Walton2015-12-081-2/+3
| | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgpd: Do not allow a timers connect of 0, this can hammer the CPUDaniel Walton2015-12-081-2/+2
| | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgpd: Remove BGP's asorig timer, it is no longer usedDaniel Walton2015-12-084-24/+2
| | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgpd: Lower the default 'timers connect' in BGP to 10 secondsDaniel Walton2015-12-081-1/+1
| | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
* doc: Add 'OSPF Fundamentals' section to OSPF docsPaul Jakma2015-11-253-1/+586
| | | | | | | | | * ospf_fundamentals.texi: New section explaining the fundamentals of OSPF for system admins, to help them debug their networks. * {Makefile.am,ospfd.texi}: include and build previous Conflicts: doc/Makefile.am
* pimd: Fix size_t zlog_err format string warningPaul Jakma2015-10-291-1/+1
| | | | * fc1c114aa / "pimd: Fix warning", the size_t arg should have a %zu format.
* Merge 'patch-tracking/4/proposed/netdef-solaris' into acceptedPaul Jakma2015-10-2840-66/+159
|\
| * pimd: Fix warningMartin Winter2015-10-161-1/+1
| | | | | | | | | | | | Fix long unsigned / unsigned mixup Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
| * zebra/if_ioctl_solaris: Make foo staticDavid Lamparter2015-10-161-2/+2
| | | | | | | | | | | | make interface_ioctl_ioctl() and if_get_index() static Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * zebra/rt_socket: Fix warningsDavid Lamparter2015-10-161-0/+6
| | | | | | | | | | | | Fix warning about unused sin_masklen / sin6_masklen Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * zebra/rtread_getmsg: fix sign warningsDavid Lamparter2015-10-161-3/+3
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * isisd/isis_dlpi: Fix warningDavid Lamparter2015-10-161-1/+1
| | | | | | | | | | | | 'fd' may be used uninitialized. Init to -1 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * solaris: more warnings fixedDavid Lamparter2015-10-161-6/+9
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * solaris: no ROUNDUPDavid Lamparter2015-10-161-0/+6
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * zebra/ioctl_solaris: Fix use of prefix2str in if_prefix_add/delete_ipv6Martin Winter2015-10-161-2/+2
| | | | | | | | | | | | | | First argument of prefix2str pointed to ifc->address->prefix, but no prefix exists in address. Should have been ifc->address. Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
| * isisd/solaris: fix size_t confusionsDavid Lamparter2015-10-161-11/+12
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * *: fix in_addr initialisersDavid Lamparter2015-10-163-3/+3
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * zebra/solaris: fix uninitialised varsDavid Lamparter2015-10-161-1/+1
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * build/solaris: create ioctl_solaris.hDavid Lamparter2015-10-164-3/+33
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * lib: add getgrouplist() for SolarisDavid Lamparter2015-10-162-1/+36
| | | | | | | | | | | | Of course Solaris doesn't have getgrouplist()... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * build: make libraries self-reliantDavid Lamparter2015-10-162-0/+2
| | | | | | | | | | | | | | | | libospf and libospfclient both need libzebra, so they should link against it. The days of libtool propagating upwards such dependencies are nearing their end... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * pimd: use IPPROTO_IP (not SOL_IP) for IP_PKTINFODavid Lamparter2015-10-162-5/+5
| | | | | | | | | | | | | | Solaris uses the same socket API for IP_PKTINFO as Linux, but doesn't have a SOL_IP define. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * ospf6d: fix uninitialized warning in SNMPDavid Lamparter2015-10-161-1/+1
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * ospfd: fix unused warning in ospf_writeDavid Lamparter2015-10-161-2/+2
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * build/solaris: drop duplicate __EXTENSION__ defineDavid Lamparter2015-10-161-1/+0
| | | | | | | | | | | | | | __EXTENSION__ is already defined in config.h by autoconf; drop the duplicate from zebra.h. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * *: make sure zebra.h is always included firstDavid Lamparter2015-10-1621-23/+34
| | | | | | | | | | | | | | | | zebra.h pulls in config.h, which results in fiddling with things like __FILE_OFFSET_BITS. It must always be included first, in order to set flags that influence the compiler via <features.h>. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | isisd: Fix LSPs not being regenerated after adjacency changeMichael Zingg2015-10-271-1/+12
| | | | | | | | | | | | | | | | | | | | In isisd LSP's are not regenerated after a change in adjacency if lsp-gen-interval has expired. I have tested this on Debian 6.0 with zebra and level1 isisd with point to point links. This problem is also listed in Test ISIS-18.3 on the opensourcerouting.org wiki: http://confluence.isc.org/display/osr/ANVL+ISIS+Compliance+Test+Plan http://confluence.isc.org/display/osr/ANVL+ISIS+Results