]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agoMerge pull request #1363 from donaldsharp/z_improvements
Russ White [Wed, 1 Nov 2017 00:27:19 +0000 (20:27 -0400)]
Merge pull request #1363 from donaldsharp/z_improvements

Z improvements

6 years agoMerge pull request #1367 from donaldsharp/mp_reach_parse
Russ White [Wed, 1 Nov 2017 00:23:32 +0000 (20:23 -0400)]
Merge pull request #1367 from donaldsharp/mp_reach_parse

bgpd: Treat empty reachable NLRI as a EOR

6 years agoMerge pull request #1382 from donaldsharp/eigrp_loop
Russ White [Wed, 1 Nov 2017 00:21:26 +0000 (20:21 -0400)]
Merge pull request #1382 from donaldsharp/eigrp_loop

Eigrp loop

6 years agoMerge pull request #1336 from donaldsharp/peer_name
Lou Berger [Tue, 31 Oct 2017 15:40:44 +0000 (11:40 -0400)]
Merge pull request #1336 from donaldsharp/peer_name

Peer name

6 years agoMerge pull request #1371 from donaldsharp/bgp_exit
Lou Berger [Tue, 31 Oct 2017 15:39:25 +0000 (11:39 -0400)]
Merge pull request #1371 from donaldsharp/bgp_exit

bgpd: exit on socket bind failures

6 years agoMerge pull request #1366 from donaldsharp/bgp_non_integrated_zebra_redistribution
Lou Berger [Tue, 31 Oct 2017 14:53:59 +0000 (10:53 -0400)]
Merge pull request #1366 from donaldsharp/bgp_non_integrated_zebra_redistribution

Bgp non integrated zebra redistribution

6 years agoMerge pull request #1376 from donaldsharp/mpls_replace_semantics
Renato Westphal [Tue, 31 Oct 2017 14:48:31 +0000 (12:48 -0200)]
Merge pull request #1376 from donaldsharp/mpls_replace_semantics

Mpls replace semantics

6 years agoMerge pull request #1377 from donaldsharp/bgp_json
Lou Berger [Tue, 31 Oct 2017 13:25:20 +0000 (09:25 -0400)]
Merge pull request #1377 from donaldsharp/bgp_json

bgpd: Cleanup some json output in bgp_route.c

6 years agoMerge pull request #1389 from donaldsharp/pim_nexthop_lookup_crash
Jafar Al-Gharaibeh [Tue, 31 Oct 2017 05:23:42 +0000 (00:23 -0500)]
Merge pull request #1389 from donaldsharp/pim_nexthop_lookup_crash

pimd: When doing a RPF for a route, note when we fail the lookup

6 years agoMerge pull request #1390 from donaldsharp/pim_ifp_flap_crash
Jafar Al-Gharaibeh [Tue, 31 Oct 2017 05:21:52 +0000 (00:21 -0500)]
Merge pull request #1390 from donaldsharp/pim_ifp_flap_crash

pimd: Fix crash with debug and ifp changes

6 years agopimd: Fix crash with debug and ifp changes
Donald Sharp [Mon, 30 Oct 2017 23:41:28 +0000 (19:41 -0400)]
pimd: Fix crash with debug and ifp changes

Certain interface flapping events can cause a lookup
that does not find any ifp pointer.  This is only causing
a crash in the `debug pim zebra` command due to only needing
to lookup the interface for it's name.

Modify code to ensure we have a valid pointer.  Follow other
debug statements lead in the same function for what to display
when an interface does not currently exist.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: When doing a RPF for a route, note when we fail the lookup
Donald Sharp [Mon, 30 Oct 2017 17:29:14 +0000 (13:29 -0400)]
pimd: When doing a RPF for a route, note when we fail the lookup

When we ask PIM to do a CLI search of a random (S,G) if the
(S,G) has no RPF due to no route, let the user know about
the issue instead of crashing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: When writing packet don't crash in some cases
Donald Sharp [Sun, 29 Oct 2017 12:51:57 +0000 (08:51 -0400)]
eigrpd: When writing packet don't crash in some cases

When we are writing a packet if we have gotten ourselves
into a bad situation, note it and move on.  Hopefully
dumping enough information so that we can find the offending
reason.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Fix crash in reply receive packet.
Donald Sharp [Sun, 29 Oct 2017 12:28:01 +0000 (08:28 -0400)]
eigrpd: Fix crash in reply receive packet.

When we receive a reply for a prefix we no longer
have we should note the issue and move on instead
of crashing eigrp.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Query Send is not incrementing the sequence number
Donald Sharp [Sun, 29 Oct 2017 12:27:08 +0000 (08:27 -0400)]
eigrpd: Query Send is not incrementing the sequence number

When we send a query make sure we increment the query
sequence number.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: On shutdown, delete list after we've cleared prefixes
Donald Sharp [Sat, 28 Oct 2017 22:56:34 +0000 (18:56 -0400)]
eigrpd: On shutdown, delete list after we've cleared prefixes

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Fix an issue found with metric change
Donald Sharp [Sat, 28 Oct 2017 22:45:08 +0000 (18:45 -0400)]
eigrpd: Fix an issue found with metric change

A past commit modified the change value to an enum
but did not bother to fix all the places where
change was used.  Fix this.

Additionally add some more output to the fsm prefix
string about the change.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Add ability to show packet type in log
Donald Sharp [Sat, 28 Oct 2017 22:35:56 +0000 (18:35 -0400)]
eigrpd: Add ability to show packet type in log

Allow us to examine the packet type that caused us to change
state.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Create enum for states and string name for display
Donald Sharp [Sat, 28 Oct 2017 22:04:19 +0000 (18:04 -0400)]
eigrpd: Create enum for states and string name for display

Create an enum for the different states and create
a string name display handler.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Create a function to return a string of prefix state
Donald Sharp [Sat, 28 Oct 2017 21:40:13 +0000 (17:40 -0400)]
eigrpd: Create a function to return a string of prefix state

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Cleanup some json output in bgp_route.c
Donald Sharp [Fri, 27 Oct 2017 15:32:17 +0000 (11:32 -0400)]
bgpd: Cleanup some json output in bgp_route.c

Cleanup the displayed json output to be a bit prettier
to look at.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Add back in lsp replace semantics.
Donald Sharp [Mon, 23 Oct 2017 14:27:22 +0000 (10:27 -0400)]
zebra: Add back in lsp replace semantics.

When we have a update, we need to use replace
semantics with the kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Move clear_nhlfe_installed to calling functions
Donald Sharp [Mon, 23 Oct 2017 14:10:06 +0000 (10:10 -0400)]
zebra: Move clear_nhlfe_installed to calling functions

The function clear_nhlfe_installed is to be called
when we get a install failure of some sort for
a lsp change.  Since an install failure can happen
in both linux and openBSD moving the function call
northbound is a good idea.

I've also added it to the kernel_del_lsp for completeness
on failure as well, even though neither linux or openBSD
currently can fail a uninstall.

This still leaves the hole where if we have multiple
nhlfes and have an install failure we are not quite
doing the right thing by just blanketly calling
clear_nhlfe_installed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1365 from donaldsharp/pim_vrf_cleanup
Jafar Al-Gharaibeh [Fri, 27 Oct 2017 14:32:13 +0000 (09:32 -0500)]
Merge pull request #1365 from donaldsharp/pim_vrf_cleanup

pimd: Cleanup vrf SA issues exposed by recent commits

6 years agoMerge pull request #1356 from opensourcerouting/linux-headers
Donald Sharp [Fri, 27 Oct 2017 14:12:43 +0000 (10:12 -0400)]
Merge pull request #1356 from opensourcerouting/linux-headers

build: include our own copies of some linux kernel headers

6 years agoMerge pull request #1174 from opensourcerouting/show_route_defpy
Donald Sharp [Fri, 27 Oct 2017 14:00:57 +0000 (10:00 -0400)]
Merge pull request #1174 from opensourcerouting/show_route_defpy

Refactor the 'show ip route' commands using DEFPY

6 years agobgpd: exit on socket bind failures
Donald Sharp [Thu, 26 Oct 2017 18:07:33 +0000 (14:07 -0400)]
bgpd: exit on socket bind failures

When we fail to bind to port 179 we are left in a situation
where we have not saved the bgp pointer created and when
the bgp cli mode is exited we leak the memory.

Additionally there is no recovery situation here that
could be easily programmed without fundamentally changing
the code.

So let's exit and output to the log file some useful
information to hopefully clue the user in on what is
going wrong.

Fixes: #1130
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Treat empty reachable NLRI as a EOR
Donald Sharp [Thu, 26 Oct 2017 03:07:21 +0000 (23:07 -0400)]
bgpd: Treat empty reachable NLRI as a EOR

This issue was discovered on a live session with an extremely
old cisco 7206VXR router running 12.2(33)SRE4.  The sending router
is sending us an empty NLRI that is MP_REACH.  From RFC
exploration(thanks Russ!) it appears that this was
considered a 'valid' way to send EOR.

Following discussion decided that we should treat
this situation as a EOR marker instead of bringing
down the session.

Applying this fix on the FRR router seeing this issue
allows it to continue it's peering relationship with
the ASR.  Since this is a point fix I do not see
a high likelihood of further fallout.

Fixes: #1258
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: When not fully connected to zebra gracefully ignore the issue
Donald Sharp [Thu, 26 Oct 2017 02:38:50 +0000 (22:38 -0400)]
bgpd: When not fully connected to zebra gracefully ignore the issue

When bgp is coming up and is reading a non-integrated config.
The bgp connection to zebra has not fully had a chance to start.
As such when a redistribute line is parsed the attempt is
made to install it but it was erroring out with a warning.
This caused the `redistribute XXX` line to create a error
message to the end user.

Since bgp calls zclient_send_reg_requests which re-registers
the redistribute call once the actual zebra connection is up
and once bgp comes alive this is ok.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Fix non-integrated config error display
Donald Sharp [Thu, 26 Oct 2017 02:35:35 +0000 (22:35 -0400)]
lib: Fix non-integrated config error display

When using a non-integrated config and starting up
of a protocol daemon, we were not properly handling
all possible cases and as such when an user hit
an actual error they were getting (null) listed
for the message string.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Remove strange line
Donald Sharp [Thu, 26 Oct 2017 02:34:45 +0000 (22:34 -0400)]
lib: Remove strange line

Remove a line that only has a semi-colon on it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1362 from dslicenc/cm18309-label-delete
Renato Westphal [Wed, 25 Oct 2017 18:56:50 +0000 (16:56 -0200)]
Merge pull request #1362 from dslicenc/cm18309-label-delete

zebra: only pass mpls proto type if doing install

6 years agozebra: unify the ipv4/ipv6 'show ip route' commands - part 2/2
Renato Westphal [Wed, 13 Sep 2017 20:40:19 +0000 (17:40 -0300)]
zebra: unify the ipv4/ipv6 'show ip route' commands - part 2/2

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agopimd: Cleanup vrf SA issues exposed by recent commits
Donald Sharp [Wed, 25 Oct 2017 17:30:45 +0000 (13:30 -0400)]
pimd: Cleanup vrf SA issues exposed by recent commits

A recent commit has shown that we were not consistent with
handling of the vrf lookup.  Adjust pim to do the right
thing with vrf lookup to be consistent and to make SA
happier.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Add Hidden 'zebra zapi-packets (1-10000)' command
Donald Sharp [Wed, 25 Oct 2017 15:13:42 +0000 (11:13 -0400)]
zebra: Add Hidden 'zebra zapi-packets (1-10000)' command

Allow the end user to specify how many packets we want
to process at one time coming down the zapi, before
we yield and let other things process.

This is a Hidden command because it is not necessarily
something that we want end users to be able to play with

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Store packets to process in `struct zebra_t`
Donald Sharp [Wed, 25 Oct 2017 15:03:41 +0000 (11:03 -0400)]
zebra: Store packets to process in `struct zebra_t`

Store the number of packets we should process at
one time in `struct zebra_t`.  A future commit
will allow the user to control this via
a hidden cli.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Allow user to specify work-queue processing hold time
Donald Sharp [Wed, 25 Oct 2017 14:47:55 +0000 (10:47 -0400)]
zebra: Allow user to specify work-queue processing hold time

Allow the user to modify the work-queue processing hold time
from 10ms to a value from (0-10000).  Make the command hidden
as that it's a semi-dangerous command and it could cause
issues.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib, ospf6d, ospfd, zebra: Add ZEBRA_STR
Donald Sharp [Wed, 25 Oct 2017 14:52:24 +0000 (10:52 -0400)]
lib, ospf6d, ospfd, zebra: Add ZEBRA_STR

Allow us to use a ZEBRA_STR for commands

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: Update route-map match section
Donald Sharp [Wed, 25 Oct 2017 14:02:03 +0000 (10:02 -0400)]
doc: Update route-map match section

The 'match peer ...' command for bgp did
not exist.  Add this into the code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Allow 'match peer' for all route-map types
Donald Sharp [Wed, 18 Oct 2017 14:19:58 +0000 (10:19 -0400)]
bgpd: Allow 'match peer' for all route-map types

There are multiple places that we use route-maps in bgp
There is no need to limit the route-map 'match peer ...' command
to just import and export route-map types.  I see need for
using this in table-maps as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Allow route-map `match peer...` to have auto-complete
Donald Sharp [Wed, 18 Oct 2017 12:57:12 +0000 (08:57 -0400)]
bgpd: Allow route-map `match peer...` to have auto-complete

The match peer command doees not currently have an auto-complete
ability.  Let's add it in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Allow peer interface name to match
Donald Sharp [Wed, 18 Oct 2017 13:34:57 +0000 (09:34 -0400)]
bgpd: Allow peer interface name to match

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1358 from opensourcerouting/isis-lsp_tick-fixes
Donald Sharp [Wed, 25 Oct 2017 13:19:06 +0000 (09:19 -0400)]
Merge pull request #1358 from opensourcerouting/isis-lsp_tick-fixes

Isis lsp_tick fix and improve perfomance for processing LSP updates

6 years agozebra: only pass mpls proto type if doing install
Don Slice [Mon, 16 Oct 2017 16:07:15 +0000 (09:07 -0700)]
zebra: only pass mpls proto type if doing install

Problem reported with not deleting LSPs from the zebra kernal mpls table
when a delete occurred in bgp.  Found that we were exiting the delete
process incorrectly due to not being able to derive the route_type from
the best_nhlre on the lsp while deleting. Since this info was only
needed for route installation, removed this early exit in the case of
deleting the lsp.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-18309
Reviewed By: CCR-6781
Testing Done:  Manual testing looks good.  mpls tests successful

6 years agoMerge pull request #1361 from opensourcerouting/vtysh_mem_leak
Donald Sharp [Wed, 25 Oct 2017 11:00:19 +0000 (07:00 -0400)]
Merge pull request #1361 from opensourcerouting/vtysh_mem_leak

vtysh: properly fix memory leak

6 years agovtysh: properly fix memory leak
Renato Westphal [Wed, 25 Oct 2017 09:43:32 +0000 (07:43 -0200)]
vtysh: properly fix memory leak

Commit 44f12f20 fixed the memory leak in the wrong way and introduced a
"uninitialized variable" warning.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoMerge pull request #1357 from opensourcerouting/coverity_fixes
Donald Sharp [Tue, 24 Oct 2017 23:36:30 +0000 (19:36 -0400)]
Merge pull request #1357 from opensourcerouting/coverity_fixes

Coverity fixes

6 years agolib: optimize sockunion_connect()
Renato Westphal [Mon, 23 Oct 2017 21:24:07 +0000 (19:24 -0200)]
lib: optimize sockunion_connect()

This function is only called with non-blocking sockets [1], so there's
no need to worry about setting O_NONBLOCK and unsetting it later if the
given fd was a blocking socket. This saves us 4 syscalls per connect,
which is not much but is something.

Also, remove an outdated comment about the return values of this
function. It returns a 'connect_result' enum now, whose values are
self-explanatory (connect_error, connect_success and connect_in_progress).

This also fixes a coverity scan warning where we weren't checking the
return value of the fcntl() syscall.

[1] bgp_connect() and pim_msdp_sock_connect().

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years ago*: fix coverity warnings - error handling issues
Renato Westphal [Mon, 23 Oct 2017 21:19:26 +0000 (19:19 -0200)]
*: fix coverity warnings - error handling issues

Ignore the return value of some functions in the places we know they
can't fail, and other small fixes.

Regarding the change in bgpd/rfapi/rfapi_rib.c, asserting that
rfapiRaddr2Qprefix() didn't fail is the common idiom inside the rfapi
code.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years ago*: fix coverity warnings - resource leaks
Renato Westphal [Sun, 22 Oct 2017 23:14:21 +0000 (21:14 -0200)]
*: fix coverity warnings - resource leaks

These are mostly trivial fixes for leaks in the error path of some functions.

The changes in bgpd/bgp_mpath.c deserves a bit of explanation though. In
the bgp_info_mpath_aggregate_update() function, we were allocating memory
for the lcomm variable but doing nothing with it. Since the code for
communities, extended communities and large communities is pretty much
the same in this function, it's clear that this was a copy and paste
error where most of the ext. community code was copied but not all of
it as it should have been.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoospfd: fix coverity warnings - security best practices violations
Renato Westphal [Sun, 22 Oct 2017 18:36:13 +0000 (16:36 -0200)]
ospfd: fix coverity warnings - security best practices violations

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years ago*: add missing \n in some help strings
Renato Westphal [Sat, 21 Oct 2017 00:16:57 +0000 (22:16 -0200)]
*: add missing \n in some help strings

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agolib: fix coverity warnings introduced by the iface rb-tree conversion
Renato Westphal [Sat, 21 Oct 2017 12:24:21 +0000 (10:24 -0200)]
lib: fix coverity warnings introduced by the iface rb-tree conversion

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoMerge pull request #1346 from donaldsharp/apply_routemap
Lou Berger [Tue, 24 Oct 2017 15:46:32 +0000 (11:46 -0400)]
Merge pull request #1346 from donaldsharp/apply_routemap

bgpd: Note routemap information even if peer not activated.

6 years agoMerge pull request #1337 from donaldsharp/debug_nht_bgp
Lou Berger [Tue, 24 Oct 2017 15:13:12 +0000 (11:13 -0400)]
Merge pull request #1337 from donaldsharp/debug_nht_bgp

bgpd: Allow turn off of 'debug bgp nht' from 'no debug bgp'

6 years agoMerge pull request #1296 from donaldsharp/eigrp_table
Rafael Zalamena [Tue, 24 Oct 2017 13:30:37 +0000 (11:30 -0200)]
Merge pull request #1296 from donaldsharp/eigrp_table

eigrpd: Convert topology list to a table

6 years agoeigrpd: Convert topology list to a table
Donald Sharp [Fri, 6 Oct 2017 13:19:45 +0000 (09:19 -0400)]
eigrpd: Convert topology list to a table

The EIGRP topology list is an extremely inefficient
way to store data about the known routes.  Convert
to using a table.

Signed-off-by: Donald Sharp <sharpd@cumulusnetorks.com>
6 years agozebra: fix route node leak on error path
Renato Westphal [Wed, 13 Sep 2017 20:45:16 +0000 (17:45 -0300)]
zebra: fix route node leak on error path

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agozebra: 'show ip route' with multiple options at the same time
Renato Westphal [Wed, 13 Sep 2017 18:25:39 +0000 (15:25 -0300)]
zebra: 'show ip route' with multiple options at the same time

Now it's possible to specify multiple options when viewing the RIB or
FIB.

Example: 'show ip route 192.168.0.0/16 longer-prefixes tag 10 ospf'

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agozebra: unify the ipv4/ipv6 'show ip route' commands - part 1/2
Renato Westphal [Wed, 13 Sep 2017 18:16:12 +0000 (15:16 -0300)]
zebra: unify the ipv4/ipv6 'show ip route' commands - part 1/2

Note: I had to remove one assert in clidef.py in order to fix a build
error when using a preprocessor string (FRR_IP_REDIST_STR_ZEBRA) inside
a DEFPY command. This should be revisited later.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobuild: include our own copies of some linux kernel headers
Renato Westphal [Thu, 21 Sep 2017 01:12:56 +0000 (22:12 -0300)]
build: include our own copies of some linux kernel headers

This is the definitive solution to avoid build issues on old Linux
systems, where the system kernel headers might not contain some constants
or macros used by FRR (e.g. MPLS_IPTUNNEL_DST, introduced on 2015).

This is the same strategy adopted by other projects, like iproute2,
libnl, lldpd, strongswan, etc. These header files don't need to be in
sync with upstream, they only need to be updated when necessary (e.g. if
we want to use a new feature introduced by a recent kernel).

Fixes #962 using the solution suggested by David Lamparter.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoMerge pull request #1330 from donaldsharp/zclient_shenanigans
Renato Westphal [Mon, 23 Oct 2017 23:54:09 +0000 (21:54 -0200)]
Merge pull request #1330 from donaldsharp/zclient_shenanigans

Zclient shenanigans

6 years agoMerge pull request #1354 from chiragshah6/mdev1
Renato Westphal [Mon, 23 Oct 2017 23:51:08 +0000 (21:51 -0200)]
Merge pull request #1354 from chiragshah6/mdev1

ospfd: show comand for ospf packet stats

6 years agobgpd: Use stored ifindex for zebra_announce
Donald Sharp [Mon, 23 Oct 2017 22:10:01 +0000 (18:10 -0400)]
bgpd: Use stored ifindex for zebra_announce

In some situations we already know the ifp and by extension
the ifindex there is no need to look it up for every
route we send to zebra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Allow zebra_client_read to handle up to 10 messages
Donald Sharp [Wed, 11 Oct 2017 19:05:06 +0000 (15:05 -0400)]
zebra: Allow zebra_client_read to handle up to 10 messages

The zebra_client_read functionality was reading 1 message
from a peer at a time.  Modify the code so that we can
read up to 10 at a time.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years ago*: Modify zclient_init to require privs data
Donald Sharp [Wed, 11 Oct 2017 14:37:20 +0000 (10:37 -0400)]
*: Modify zclient_init to require privs data

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoripngd: Make 'struct zebra_privs_t' available
Donald Sharp [Wed, 11 Oct 2017 14:23:12 +0000 (10:23 -0400)]
ripngd: Make 'struct zebra_privs_t' available

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoripd: Make 'struct zebra_privs_t' available
Donald Sharp [Wed, 11 Oct 2017 14:20:15 +0000 (10:20 -0400)]
ripd: Make 'struct zebra_privs_t' available

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoospf6d: Make 'struct zebra_privs_t' available
Donald Sharp [Wed, 11 Oct 2017 14:13:59 +0000 (10:13 -0400)]
ospf6d: Make 'struct zebra_privs_t' available

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoospfd: Make 'struct zebra_privs_t' available.
Donald Sharp [Wed, 11 Oct 2017 14:11:07 +0000 (10:11 -0400)]
ospfd: Make 'struct zebra_privs_t' available.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoisisd: Allow struct zebra_privs_t to be available
Donald Sharp [Wed, 11 Oct 2017 13:34:44 +0000 (09:34 -0400)]
isisd: Allow struct zebra_privs_t to be available

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Make struct zebra_privs_t available
Donald Sharp [Wed, 11 Oct 2017 13:29:39 +0000 (09:29 -0400)]
eigrpd: Make struct zebra_privs_t available

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agonhrpd: Let struct zebra_privs_t be available
Donald Sharp [Wed, 11 Oct 2017 13:24:09 +0000 (09:24 -0400)]
nhrpd: Let struct zebra_privs_t be available

signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>

6 years agobabeld: Make the zebra_privs_t available for use
Donald Sharp [Wed, 11 Oct 2017 13:19:43 +0000 (09:19 -0400)]
babeld: Make the zebra_privs_t available for use

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Set zapi send/receive buffer to a larger value
Donald Sharp [Wed, 11 Oct 2017 13:16:46 +0000 (09:16 -0400)]
zebra: Set zapi send/receive buffer to a larger value

Allow a bit more to buffer before we stop zebra
from sending/receiving.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Cleanup some missed reformat
Donald Sharp [Wed, 11 Oct 2017 13:06:02 +0000 (09:06 -0400)]
lib: Cleanup some missed reformat

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Add a function handler for zserv commands
Donald Sharp [Wed, 11 Oct 2017 12:58:02 +0000 (08:58 -0400)]
zebra: Add a function handler for zserv commands

The zserv command handlers make an already long function
even longer.  Isolate this code so that we can rearrange
the zebra_client_read function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Make all zserv handler functions use zvrf instead of vrf_id
Donald Sharp [Wed, 11 Oct 2017 12:41:29 +0000 (08:41 -0400)]
zebra: Make all zserv handler functions use zvrf instead of vrf_id

Some handler functions were using vrf_id, standardize onto
zvrf being passed around instead.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: No need to pass sock descriptor around.
Donald Sharp [Wed, 11 Oct 2017 12:31:35 +0000 (08:31 -0400)]
zebra: No need to pass sock descriptor around.

Standardize the api to read zapi requests from protocols.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Always read full zapi message in ptm code
Donald Sharp [Wed, 11 Oct 2017 12:09:28 +0000 (08:09 -0400)]
zebra: Always read full zapi message in ptm code

The ptm code when it encountered an error situation
was not fully reading all the data in the stream
meant for it.  Ensure that this is read.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoospfd: reset ospf interface protocol stats
Chirag Shah [Mon, 23 Oct 2017 18:59:29 +0000 (11:59 -0700)]
ospfd: reset ospf interface protocol stats

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoospfd: show comand for ospf packet stats
Chirag Shah [Thu, 19 Oct 2017 23:57:31 +0000 (16:57 -0700)]
ospfd: show comand for ospf packet stats

Display OSPFv2 Protocol packets stats per interface.

tor-1# show ip ospf vrf all interface traffic

Interface    HELLO    DB-Desc   LS-Req LS-Update   LS-Ack
             Rx/Tx    Rx/Tx     Rx/Tx  Rx/Tx       Rx/Tx
------------------------------------------------------------
swp1         1/0      2/3       1/1    2/2         1/1
swp2         6/0      2/7       1/1    1/4         3/2

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoMerge pull request #1341 from chiragshah6/ospf_vrf_dev
Renato Westphal [Mon, 23 Oct 2017 13:27:02 +0000 (11:27 -0200)]
Merge pull request #1341 from chiragshah6/ospf_vrf_dev

ospf6d: Divide LSupdate to keep size small

6 years agoMerge pull request #1353 from opensourcerouting/rpm-fix-master
Donald Sharp [Mon, 23 Oct 2017 12:33:30 +0000 (08:33 -0400)]
Merge pull request #1353 from opensourcerouting/rpm-fix-master

Rpm fix master

6 years agoMerge pull request #1349 from opensourcerouting/bgpd_listen_queue
Donald Sharp [Sat, 21 Oct 2017 12:19:09 +0000 (08:19 -0400)]
Merge pull request #1349 from opensourcerouting/bgpd_listen_queue

bgpd: bump listen() backlog

6 years agoredhat: Fix doc by removing outdated package information and point to main doc/ direc...
Martin Winter [Sat, 21 Oct 2017 01:22:24 +0000 (18:22 -0700)]
redhat: Fix doc by removing outdated package information and point to main doc/ directory for it

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoredhat: Fix rpm scripts to correctly restart daemons on upgrade
Martin Winter [Fri, 20 Oct 2017 23:33:39 +0000 (16:33 -0700)]
redhat: Fix rpm scripts to correctly restart daemons on upgrade

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoredhat: Add fix to correct watchfrr config during upgrade
Martin Winter [Fri, 20 Oct 2017 21:06:05 +0000 (14:06 -0700)]
redhat: Add fix to correct watchfrr config during upgrade

- /etc/frr/daemon is a config file and won't be replaced, do quick sed fix
- Updated changelog

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Conflicts:
redhat/frr.spec.in

6 years agoredhat: systemd file should not be executable
Martin Winter [Fri, 20 Oct 2017 02:36:59 +0000 (19:36 -0700)]
redhat: systemd file should not be executable

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoredhat: Always reference main frr start/stop script in /usr/lib/frr
Martin Winter [Fri, 20 Oct 2017 01:02:45 +0000 (18:02 -0700)]
redhat: Always reference main frr start/stop script in /usr/lib/frr

* Fixes issue where daemon default config tried to use /etc/init.d/frr script which doesn't exist on systemd systems

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Conflicts:
redhat/daemons

6 years agoospf6d: Divide LSupdate to keep size small
Chirag Shah [Wed, 18 Oct 2017 04:54:29 +0000 (21:54 -0700)]
ospf6d: Divide LSupdate to keep size small

Within OSPFv3 area, Disect Router LSA and
Intra-prefix LSA in order to keep LSA size Small.
Each LSA has unique Link State ID assigned.

Intra-Area-Prefix LSA:
Spread prefixes across multiple intra-area-prefix-LSAs.

Ticket:CM-18069
Testing Done:
Tested 92 ospf6 enabled (point-to-point) interfaces
between two routers.
92 adajancy comes up with Full Neighborship.
Validated 'show ipv6 ospf6 database router detail' &
'show ipv6 ospf6 database intra-prefix detail', each adv-router
has two distinct LSA of such catgory.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agobgpd: bump listen() backlog
Rafael Zalamena [Fri, 20 Oct 2017 21:29:07 +0000 (19:29 -0200)]
bgpd: bump listen() backlog

Handle better stress situations when multiple peers are trying to
connect at the same time by bumping the TCP connection backlog limit.

This reduces the convergence time of BGPerf stress test.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agoMerge pull request #1347 from medallia/all-routes-to-fpm
Donald Sharp [Fri, 20 Oct 2017 17:43:20 +0000 (13:43 -0400)]
Merge pull request #1347 from medallia/all-routes-to-fpm

Send all routes to FPM, including VRF and multicast

6 years agobgpd: Note routemap information even if peer not activated.
Donald Sharp [Fri, 20 Oct 2017 13:56:12 +0000 (09:56 -0400)]
bgpd: Note routemap information even if peer not activated.

If upon bgp startup we have this config:

router bgp 64540
 neighbor 192.168.201.134 remote-as external
 !
 address-family ipv4 unicast
  no neighbor 192.168.201.134 activate
  neighbor 192.168.201.134 route-map NEXTHOP in
 exit-address-family

The route-map map pointer for the incoming(or outgoing)
filter was not being saved due to a pre-mature optimization
of not handling the routemap callback if the peer is not
activated.  The function that handles the peers route-maps
is making sure that the peer is in established state
before attempting to actually apply anything so just
call it to set the map pointer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoSend all routes to FPM, including VRF and multicast
Thorvald Natvig [Fri, 20 Oct 2017 06:34:42 +0000 (23:34 -0700)]
Send all routes to FPM, including VRF and multicast

Signed-off-by: Thorvald Natvig <thorvald@medallia.com>
6 years agoMerge pull request #1331 from donaldsharp/hash_speedup
Renato Westphal [Thu, 19 Oct 2017 01:52:41 +0000 (23:52 -0200)]
Merge pull request #1331 from donaldsharp/hash_speedup

lib: Allow hash_get to sidestep expensive hash key generation in someā€¦

6 years agoMerge pull request #1332 from chiragshah6/ospf_vrf_dev
Renato Westphal [Thu, 19 Oct 2017 01:46:48 +0000 (23:46 -0200)]
Merge pull request #1332 from chiragshah6/ospf_vrf_dev

ospf6d: Handle lsupdate upto max ospf6 payload

6 years agoMerge pull request #1272 from donaldsharp/peer_group_ordering
Renato Westphal [Thu, 19 Oct 2017 01:12:31 +0000 (23:12 -0200)]
Merge pull request #1272 from donaldsharp/peer_group_ordering

bgpd: Fix peer group copying of data for late activation

6 years agoMerge pull request #1339 from donaldsharp/bgp_compile_issues
Martin Winter [Thu, 19 Oct 2017 00:05:46 +0000 (17:05 -0700)]
Merge pull request #1339 from donaldsharp/bgp_compile_issues

Bgp compile issues

6 years agobgpd: Fix 'not initialized' possibly on older compilers
Donald Sharp [Wed, 18 Oct 2017 22:39:04 +0000 (18:39 -0400)]
bgpd: Fix 'not initialized' possibly on older compilers

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>