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>
Updated the list with listed well-known communities from document IANA's https://www.iana.org/assignments/bgp-well-known-communities/bgp-well-known-communities.txt with last update date as of 2018-03-07.
- GRACEFUL_SHUTDOWN moved to 2nd entry in all lists in touched code.
- Added ACCEPT_OWN - [RFC7611]
- Added ROUTE_FILTER_TRANSLATED_v4 - currently [draft-l3vpn-legacy-rtc]
- Added ROUTE_FILTER_v4 - currently [draft-l3vpn-legacy-rtc]
- Added ROUTE_FILTER_TRANSLATED_v6 - currently [draft-l3vpn-legacy-rtc]
- Added ROUTE_FILTER_v6 - currently [draft-l3vpn-legacy-rtc]
- Added LLGR_STALE - currently [draft-uttaro-idr-bgp-persistence]
- Added NO_LLGR - currently [draft-uttaro-idr-bgp-persistence]
- Added accept-own-nexthop - currently [draft-agrewal-idr-accept-own-nexthop]
- Added BLACKHOLE - [RFC7999]
- Added NOPEER - [RFC3765]
Chirag Shah [Sat, 28 Jul 2018 18:23:10 +0000 (11:23 -0700)]
zebra: display consistant mac count
show evpn mac vni all
show evpn mac vni x
does not display local svi and anycast mac into count.
Ticket:CM-20456
Testing Done:
Before:
TOR1# show evpn mac vni 1008
Number of MACs (local and remote) known for this VNI: 4
MAC Type Intf/Remote VTEP VLAN
44:38:39:00:6b:4c local vlan1008 1008
00:02:00:00:00:04 local hostbond5 1008
00:02:00:00:00:02 local hostbond4 1008
00:00:5e:00:01:01 local vlan1008-v0 1008
00:02:00:00:00:0c remote 27.0.0.15
00:02:00:00:00:0a remote 27.0.0.15
dell-s6000-07#
After:
TOR1# show evpn mac vni 1008
Number of MACs (local and remote) known for this VNI: 6
MAC Type Intf/Remote VTEP VLAN
44:38:39:00:6b:4c local vlan1008 1008
00:02:00:00:00:04 local hostbond5 1008
00:02:00:00:00:02 local hostbond4 1008
00:00:5e:00:01:01 local vlan1008-v0 1008
00:02:00:00:00:0c remote 27.0.0.15
00:02:00:00:00:0a remote 27.0.0.15
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>