David Lamparter [Wed, 8 Aug 2018 10:32:21 +0000 (12:32 +0200)]
pimd: fix bogus uninitialized warning
pimd/pim_nht.c: In function ‘pim_ecmp_nexthop_search’:
pimd/pim_nht.c:523:17: error: ‘nbr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
nexthop->nbr = nbr;
(on gcc 5.4.0; this is the only warning with that version.)
Signed-off-by: David Lamparter <equinox@diac24.net>
Quentin Young [Thu, 2 Aug 2018 18:34:37 +0000 (18:34 +0000)]
tools: improve checkpatch slicing
checkpatch cuts from the diff between the outputs of pre-patch and
post-patch runs of `checkpatch.pl`, but fixed-length greps sometimes
don't cut correctly.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Donald Sharp [Fri, 3 Aug 2018 12:18:11 +0000 (08:18 -0400)]
lib, bgpd, ospf6d, ospfd, pimd: Allow finish to cleanup a bit more
When calling route_map_finish, every place that we do we must
first set the deletion event to NULL, or we will create an infinite
loop, if we are using the delayed route-map application code.
As such we might as well just make the route_map_finish code
do this work, as that there is really no viable alternative here
and route_map_finish should only be called on shutdown.
This fixes an infinite loop in zebra on shutdown when there
are route-maps.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Christian Franke [Thu, 26 Jul 2018 13:08:11 +0000 (15:08 +0200)]
isisd: don't infer spftree from address family
Instead of using the address family to determine which spftree structure
should be used, specify it explicitly. With the advent of ipv6 dst-src
routing, the tree cannot be uniquely determined from the family.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Christian Franke [Thu, 26 Jul 2018 08:02:15 +0000 (10:02 +0200)]
isisd: fix isis_route_merge_verify logic
This addresses two issues for L1L2 operation:
a) If an L1 route has ROUTE_ACTIVE unset and an L2 route for the same
destination has ROUTE_ACTIVE set, isisd would still put the L1 route
into the merged table. This causes the route for the destination to
get uninstalled from zebra until the next SPF run, which is incorrect.
To fix this, look at the ROUTE_ACTIVE flag and allow L2 routes to win
against L1 routes, when the L1 has ROUTE_ACTIVE unset.
b) If an L1 route wins against an existing L2 route, the ZEBRA_SYNCED
flag would remain on the L2 route. This leads to the problem that when
the L1 route disappears again, the L2 doesn't get reinstalled, since
isisd assumes it's already in the RIB because ZEBRA_SYNCED is set.
Solve this by clearing ZEBRA_SYNCED on L2 routes, if they lose against
an L1 route.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Christian Franke [Tue, 24 Jul 2018 15:40:24 +0000 (17:40 +0200)]
isisd: move route_table into spftree
As isisd's route_tables are directly related to spf trees, move
the route tables into the spftree instead of maintaining them
alongside of the spftrees.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Christian Franke [Sun, 22 Jul 2018 17:59:43 +0000 (13:59 -0400)]
isisd: add debug message if adjacency is ignored because IP is unusable
isisd verifies whether the neighboring IPv4 addresses overlap with its own
unless the interface is running in unnumbered mode. If no overlap is found
and IPv6 is also not enabled, IIHs will be ignored.
Add a debug message for this case, to avoid people wondering why adjacencies
are not coming up.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Donald Sharp [Thu, 2 Aug 2018 14:36:59 +0000 (10:36 -0400)]
vtysh: Respect order dependancy of some pim commands
If `ip igmp query-max-respone-time ` is specified allow it
to show up before `ip igmp query-interval ` since there
are order dependancies that may show up.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
Donald Sharp [Tue, 31 Jul 2018 19:11:42 +0000 (15:11 -0400)]
pimd: pim_socket_join_source is only called from one place
The pim_socket_join_source function only ever calls
pim_igmp_join_source and pim_socket_join_source is only
called from 1 place. Skip the level of indirection.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Quentin Young [Wed, 1 Aug 2018 19:27:13 +0000 (19:27 +0000)]
zebra: don't close client socket from I/O pthread
The client socket value can only be modified by the main thread.
Modifying the client socket from within the client I/O pthread
introduces race conditions.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Arthur Jones [Wed, 1 Aug 2018 16:22:52 +0000 (09:22 -0700)]
tools/frr: make frr reload error message clearer on missing frr-reload.py
Only frr-reload.py pulls in a python depenedency for frr, we can
reduce the size of the base frr package by a lot if we separate
out frr-pythontools. When we do this, we get a somewhat cryptic
error message when frr-reload.py is missing on frr reload.
Here, we pull the error message from frr-reload script, which is
much clearer.
Testing done:
frr reload both with and without the frr-reload.py script, see
the frr-reload message when missing and it runs frr-reload.py when
not missing.
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
Donald Sharp [Wed, 1 Aug 2018 13:29:43 +0000 (09:29 -0400)]
bgpd: Intentionally stop some timers on instance removal
When a bgp instance is stopped, with a `no router bgp..`
make sure any timers associated with the instance are stopped
as well.
This issue was discovered when a customer issued a `no router bgp`
while a maxmed timer was operative. The max-med timer used the
`struct bgp *` as the passed in value for the thread. The
thread eventually popped after the cleanup and attempted to use
data off in lala land and crashed
Ticket: CM-21895 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Rafael Zalamena [Wed, 30 May 2018 20:04:57 +0000 (17:04 -0300)]
lib: fix getsockopt_cmsg_data retrieval
The `type` parameter was not being compared with `cmsg_type`, so the
result of this function was always a pointer to the first header
matching the level.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Quentin Young [Thu, 26 Jul 2018 00:27:40 +0000 (00:27 +0000)]
zebra: dont delete pthreads from under themselves
* Rename some things to be less confusing
* Convert client close function to take a client struct rather than a
task
* Extern client close function and use it when handling SIGTERM
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Mon, 30 Jul 2018 18:58:38 +0000 (18:58 +0000)]
doc: remove unknown option role from rpki.rst
Options must be documented before they can be cross-referenced, and the
scope for configure options is not present in rpki.rst. Remove the
option role tag from the `-M` option to remove the build warning.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Donald Sharp [Thu, 19 Jul 2018 14:09:51 +0000 (10:09 -0400)]
lib: Set proper write file when using backup config
When we read in a backup file, we should save the original
host.config so that we can put it back to the correct original
location after we read in the backup config.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 22 Jun 2018 01:49:03 +0000 (21:49 -0400)]
lib, zebra: Allow protocols to use Distance as part of RR semantics
Allow protocols to specify to zebra that they would like zebra
to use the distance passed down as part of determine sameness for
Route Replace semantics.
This will be used by the static daemon to allow it to have
backup static routes with greater distances.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>