isisd: add a slight delay to lsp_regenerate_scheduleisisd implements a holdoff interval and will refrain from regenerating
an lsp if the difference between the current time and its last refresh
is less than the holdoff interval. Instead, it will schedule a timer
to regenerate the lsp after the holdoff interval has passed.
This implementation has one disadvantage in the case where there is a
succession of calls to lsp_regenerate_schedule. In suc...
isisd: initialize circuit to match area is_typeNew circuits should be initialized to match the is_type
of their area. Also add an additional check to make sure
that no IIHs are sent for levels which are not enabled.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
isisd: do remove ipv6 routes from ZebraWe can abort isis_zebra_route_del_ipv6 if the route in question has
ISIS_ROUTE_FLAG_ZEBRA_SYNCED unset, meaning it's not in the kernel.
Aborting the function if the flag is set prevents us from removing
any routes.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
isisd: don't corrupt memory for long hostnamesSigned-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
isisd: annotate some function arguments with constSigned-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib: don't have log functions change errnoSigned-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd: Update dump to allow Extended Time FormatAllow 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 threadSigned-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
ripd, isisd: fix warnings that make the build failThese 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 routesIf 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,...
zebra: combine static_ipv[4|6]_nexthop_same into one functionCombine 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]Combine the static_install_ipv[4|6] function calls into
static_install_route.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra: Collapse struct static_ipv[4|6] into struct static_routeThe '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 handlingThis 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 statusThis 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 2GBThe 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...
bgpd: Add support for timer commands with peer-group syntaxThe 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 clearrtt 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 knownOPEN 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 detectionThe 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 messagespimd 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 compilebgp_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 debuggingSigned-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 pointersSigned-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'Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd: Lower BGP's default keepalive/holdtime to 3s/9sSigned-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd: Remove BGP_ERROR_START_TIMER, it was no longer usedSigned-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd: Enable "bgp log-neighbor-changes" by defaultSigned-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 CPUSigned-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd: Remove BGP's asorig timer, it is no longer usedSigned-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd: Lower the default 'timers connect' in BGP to 10 secondsSigned-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
doc: Add 'OSPF Fundamentals' section to OSPF docs* 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
isisd: Fix LSPs not being regenerated after adjacency changeIn 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
bgpd, lib: memory cleanups for valgrind, plus debug changesDescription:
We use valgrind memcheck quite a bit to spot leaks in
our work with bgpd. In order to eliminate false positives,
we added code in the exit path to release the remaining
allocated memory.
Bgpd startup log message now includes pid.
Some little tweaks by Paul Jakma <paul.jakma@hpe.com>:
* bgp_mplsvpn.c: (str2prefix_rd) do the cleanup in common code at the end
...
ospfd: PointToPoint neighbors are identified by router IDAccording to RFC 2328, section 10.5 PointToPoint neighbors
should be identified by router ID instead of source IP address.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Revert "Fix to take care of ordering between interface and router ospf command."This reverts commit 4bab6806914dbb4b43f376ebf966a034a0ea72cd, as Joakim's
version of 'ip ospf area' and the 2 follow-up patches should avoid the issue
Vipin reported.
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospfd: Extend 'ip ospf area' to take address argument + rationalise ospf enable* ospfd.c: (general) Clean up the whole running of OSPF on interfaces.
(add_ospf_interface) taking (struct interface *) arg is pointless here.
(ospf_is_ready) new helper.
(ospf_network_run_subnet) Put all the code for choosing whether to enable
OSPF on a subnet, and if so which area configuration to use, here. If a
subnet should not be enabled, ensure an existing oi is freed.
(ospf_...
ospfd: Impl. per interface 'ip ospf area' commandUse with interface command:
interface ppp0
ip ospf area 0.0.0.0
This will enable OSPF on ppp0 with area 0.0.0.0
Remove with "no ip ospf area"
* ospf_vty.c: add "ip ospf area (A.B.C.D|<0-4294967295>)" interface command
* ospfd.c: (ospf_interface_{un,}set) new helper function to enable/disable
OSPF on a specific interface.
(ospf_if_update) 2 possible paths now to deal with interface upda...
ospfd: split up network interface enable a bit, for per-interface area cmd* ospfd.c: (ospf_network_run_interface) Move out core to ..
(add_ospf_interface) .. here
(ospf_network_{un,}set) move redistribute update out to..
(update_redistributed) .. here, so it can be re-used in upcoming commit.
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd: fix using of two pointers for struct thread_master *bgp is using both bm->master and master pointers interchangebly
for thread manipulation. Since they are the same thing consolidate
to one pointer.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib: Fix duplicate variable name in smux.c and vty.cBoth smux.c and vty.c have the same:
static struct thread_master *master;
as global variables for the file. This can and will lead to confusion
name the variables something appropriate for the file it is in.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>