]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #2641 from donaldsharp/pim_igmp_dr
Russ White [Mon, 23 Jul 2018 20:50:59 +0000 (16:50 -0400)]
Merge pull request #2641 from donaldsharp/pim_igmp_dr

pimd: Do not create upstream state when not DR for igmp request

5 years agoMerge pull request #2668 from dslicenc/cm21722-v6-vrf-display
Renato Westphal [Mon, 23 Jul 2018 17:56:29 +0000 (14:56 -0300)]
Merge pull request #2668 from dslicenc/cm21722-v6-vrf-display

zebra: remove default vrf output for kernel vrf ipv6 blackhole default

5 years agoMerge pull request #2689 from dslicenc/vrf-exit-reload
Renato Westphal [Mon, 23 Jul 2018 17:46:10 +0000 (14:46 -0300)]
Merge pull request #2689 from dslicenc/vrf-exit-reload

tools: handle exit-vrf as end of context block

5 years agoMerge pull request #2652 from LabNConsulting/working/master/confdate_cleanup
Donald Sharp [Mon, 23 Jul 2018 12:46:26 +0000 (08:46 -0400)]
Merge pull request #2652 from LabNConsulting/working/master/confdate_cleanup

Simplify deprecation check

5 years agoMerge pull request #2672 from pcarana/pcarana-add-rpki-rh
Martin Winter [Fri, 20 Jul 2018 20:29:56 +0000 (22:29 +0200)]
Merge pull request #2672 from pcarana/pcarana-add-rpki-rh

RedHat spec: Add the rpki module when needed

5 years agoMerge pull request #2692 from manuhalo/module_param_docs
Quentin Young [Fri, 20 Jul 2018 16:09:57 +0000 (12:09 -0400)]
Merge pull request #2692 from manuhalo/module_param_docs

doc: add cmd line param section to modules.rst

5 years agoMerge pull request #2690 from opensourcerouting/fix-srcdest-route-display
Donald Sharp [Fri, 20 Jul 2018 05:55:53 +0000 (01:55 -0400)]
Merge pull request #2690 from opensourcerouting/fix-srcdest-route-display

zebra: fix do_show_route_helper to include srcdest routes

5 years agoMerge pull request #2688 from pguibert6WIND/vrf_delete_on_netns_fail
Donald Sharp [Fri, 20 Jul 2018 05:54:10 +0000 (01:54 -0400)]
Merge pull request #2688 from pguibert6WIND/vrf_delete_on_netns_fail

zebra: cancel vrf creation if netns activation failed

5 years agoMerge pull request #2691 from adharkar/frr-bgp_cli
Donald Sharp [Fri, 20 Jul 2018 00:05:19 +0000 (20:05 -0400)]
Merge pull request #2691 from adharkar/frr-bgp_cli

bgpd: Changes to BGP show json commands

5 years agoMerge pull request #2687 from opensourcerouting/fix-cpp-notice-on-old-compilers
Quentin Young [Thu, 19 Jul 2018 21:10:45 +0000 (17:10 -0400)]
Merge pull request #2687 from opensourcerouting/fix-cpp-notice-on-old-compilers

lib/compiler.h: Always define CPP_NOTICE

5 years agobgpd: Changes to BGP show json commands
Ameya Dharkar [Thu, 19 Jul 2018 20:46:46 +0000 (13:46 -0700)]
bgpd: Changes to BGP show json commands
Added localRouterID to "show bgp neighbor json"
Added json O/P to "show bgp [AFI] community <community>"

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
5 years agozebra: fix do_show_route_helper to include srcdest routes
Christian Franke [Thu, 19 Jul 2018 19:16:06 +0000 (15:16 -0400)]
zebra: fix do_show_route_helper to include srcdest routes

5 years agotools: handle exit-vrf as end of context block
Don Slice [Thu, 19 Jul 2018 18:26:38 +0000 (18:26 +0000)]
tools: handle exit-vrf as end of context block

Ticket: CM-21048
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agodoc: add cmd line param section to modules.rst
Emanuele Di Pascale [Thu, 19 Jul 2018 16:28:25 +0000 (18:28 +0200)]
doc: add cmd line param section to modules.rst

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agoMerge pull request #2679 from qlyoung/fix-zapi-fuzzing
Jafar Al-Gharaibeh [Thu, 19 Jul 2018 15:54:33 +0000 (10:54 -0500)]
Merge pull request #2679 from qlyoung/fix-zapi-fuzzing

Fix zapi fuzzing

5 years agozebra: cancel vrf creation if netns activation failed
Philippe Guibert [Thu, 19 Jul 2018 15:51:41 +0000 (17:51 +0200)]
zebra: cancel vrf creation if netns activation failed

To keep configuration consistent, vrf that have not been able to be
associated with netns are removed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #2635 from donaldsharp/more_pim_neighbor
Jafar Al-Gharaibeh [Thu, 19 Jul 2018 15:47:10 +0000 (10:47 -0500)]
Merge pull request #2635 from donaldsharp/more_pim_neighbor

More pim neighbor

5 years agoMerge pull request #2686 from opensourcerouting/master-fix-isis-issue-2584
Donald Sharp [Thu, 19 Jul 2018 15:41:23 +0000 (11:41 -0400)]
Merge pull request #2686 from opensourcerouting/master-fix-isis-issue-2584

isisd: don't crash when isis_sock_init fails

5 years agoisisd: don't crash when isis_sock_init fails
Christian Franke [Tue, 17 Jul 2018 19:14:54 +0000 (15:14 -0400)]
isisd: don't crash when isis_sock_init fails

When isis_sock_init fails in isis_circuit_up, isis_circuit_down would
be called to cancel timers which were scheduled. However
isis_circuit_down would immediately return, since the state had not been
changed to 'UP' yet.

Fix this by having isis_circuit_down always cancel all the timers.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agolib/compiler.h: Always define CPP_NOTICE
Christian Franke [Thu, 19 Jul 2018 14:09:17 +0000 (10:09 -0400)]
lib/compiler.h: Always define CPP_NOTICE

On old compilers CPP_NOTICE should be a macro evaluating to an empty
statement, instead of being undefined.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoMerge pull request #2608 from pacovn/PVS-Studio_dead_code_1
Donald Sharp [Thu, 19 Jul 2018 12:50:01 +0000 (08:50 -0400)]
Merge pull request #2608 from pacovn/PVS-Studio_dead_code_1

eigrpd lib pimd zebra: dead code (PVS-Studio)

5 years agoMerge pull request #2678 from pguibert6WIND/sanity_netns
Donald Sharp [Wed, 18 Jul 2018 19:36:53 +0000 (15:36 -0400)]
Merge pull request #2678 from pguibert6WIND/sanity_netns

zebra: sometimes, it is not possible to assign a NSID to a vrf

5 years agozebra: fix some cli option descriptions
Quentin Young [Wed, 18 Jul 2018 16:39:20 +0000 (16:39 +0000)]
zebra: fix some cli option descriptions

Couple typos / clarity fixes.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agozebra: fix zapi fuzzing infra
Quentin Young [Wed, 18 Jul 2018 16:32:07 +0000 (16:32 +0000)]
zebra: fix zapi fuzzing infra

Some of this stuff got broken with the introduction of pthreads.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agozebra: sometimes, it is not possible to assign a NSID to a vrf
Philippe Guibert [Wed, 18 Jul 2018 15:58:45 +0000 (17:58 +0200)]
zebra: sometimes, it is not possible to assign a NSID to a vrf

This test case happens in scenarios with mininet, where external netns
may be impossible for the local instance to be modified. The error is
ignored and the netns parsed is ignored too.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: fix nexthop type check for kernel default route display
Don Slice [Wed, 18 Jul 2018 13:05:50 +0000 (13:05 +0000)]
zebra: fix nexthop type check for kernel default route display

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #2669 from netravnen/hotfix/documentation/activate-bgp-rpki
Quentin Young [Tue, 17 Jul 2018 18:51:48 +0000 (14:51 -0400)]
Merge pull request #2669 from netravnen/hotfix/documentation/activate-bgp-rpki

doc: Update rpki.rst for how-to enable rpki module

5 years agoRedHat spec: Add the rpki module when needed
pcarana [Tue, 17 Jul 2018 17:49:14 +0000 (12:49 -0500)]
RedHat spec: Add the rpki module when needed

Additional help complementing #2669, this adds the rpki module to the bgpd daemon at RPM creation.

5 years agodoc: Update rpki.rst for how-to enable rpki module
Christoffer [Tue, 17 Jul 2018 16:43:49 +0000 (18:43 +0200)]
doc: Update rpki.rst for how-to enable rpki module

It has not been properly documented yet how to enable the RPKI module with BGP when having installed FRR with RPKI support. This PR seeks to add a section to the user documentation about this. So users will not have to resolve to searching the internet and looking through the FROG mailing list threads for answers.

5 years agoMerge pull request #2625 from pguibert6WIND/ipv4_ipv6_bgp_show
Quentin Young [Tue, 17 Jul 2018 15:19:13 +0000 (11:19 -0400)]
Merge pull request #2625 from pguibert6WIND/ipv4_ipv6_bgp_show

doc: add more information about show ip bgp and show bgp

5 years agoMerge pull request #2647 from pguibert6WIND/fix_routemap_vpnv4
Lou Berger [Tue, 17 Jul 2018 15:02:42 +0000 (11:02 -0400)]
Merge pull request #2647 from pguibert6WIND/fix_routemap_vpnv4

bgpd: ability to set vpnv4 nexthop with route-map

5 years agozebra: remove default vrf output for kernel vrf ipv6 blackhole default
Don Slice [Tue, 17 Jul 2018 14:20:52 +0000 (14:20 +0000)]
zebra: remove default vrf output for kernel vrf ipv6 blackhole default

It was reported that "show ipv6 route vrf <vrfname>", "show ipv6 route
vrf <vrfname> ::/0 " or "show ipv6 route vrf <vrfname> json" all
displayed that the nexthop was in the default vrf.  This was because
the kernel netlink messages would supply the RTA_OIF of the loopback
interface for the kernel-created default route for the vrf, where ipv4
did not supply any RTA_OIF.  This fix suppresses the display if the
nexthop and route entry are in different vrfs and the nexthop is
NEXTHOP_TYPE_BLACKHOLE.

Ticket: CM-21722
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #2589 from donaldsharp/admiral_ACK_bar
Renato Westphal [Sat, 14 Jul 2018 14:48:40 +0000 (11:48 -0300)]
Merge pull request #2589 from donaldsharp/admiral_ACK_bar

Netlink sockets are synchronous

5 years agoMerge pull request #2658 from mjstapp/srcdest_test_const
Renato Westphal [Sat, 14 Jul 2018 14:47:54 +0000 (11:47 -0300)]
Merge pull request #2658 from mjstapp/srcdest_test_const

tests: align with srcdest lib changes, remove bgp binary

5 years agotests: add test_bgp_table to gitignore
Mark Stapp [Fri, 13 Jul 2018 11:56:38 +0000 (07:56 -0400)]
tests: add test_bgp_table to gitignore

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: Remove need for ACK for netlink messages
Donald Sharp [Fri, 29 Jun 2018 13:49:08 +0000 (09:49 -0400)]
zebra: Remove need for ACK for netlink messages

Kernel requests via netlink are synchronous.

Therefore we do not need to specify a need for a ACK and
we can make the netlink_cmd NONBLOCKING

1) If the netlink message is going to cause an error
we will still get one.  Since results from the kernel
are synchronous we will get the error message on the
netlink_cmd socket and handle it

2) If the netlink message is going to send more than
one packet we will still get them all.  Since the results
from the kernel are synchronous we will receive all data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Listen to error codes from netlink_socket
Donald Sharp [Fri, 29 Jun 2018 11:33:39 +0000 (07:33 -0400)]
zebra: Listen to error codes from netlink_socket

When creating a netlink_socket, listen to error
codes and abandon ship if it crashes and burns.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2595 from pguibert6WIND/fix_netlink_rx_route_vrfnetns
Donald Sharp [Fri, 13 Jul 2018 02:22:34 +0000 (22:22 -0400)]
Merge pull request #2595 from pguibert6WIND/fix_netlink_rx_route_vrfnetns

zebra: upon RTM_NEWROUTE/DELROUTE, find appropriate interface

5 years agoMerge pull request #2660 from sworleys/master
Renato Westphal [Thu, 12 Jul 2018 21:39:09 +0000 (18:39 -0300)]
Merge pull request #2660 from sworleys/master

zebra: Fix function call in fuzzing code

5 years agozebra: Fix function call in fuzzing code
Stephen Worley [Thu, 12 Jul 2018 16:39:13 +0000 (12:39 -0400)]
zebra: Fix function call in fuzzing code

The fuzzing code was calling zebra_client_create which was refactored to zserv_client_create.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agotests: align with srcdest lib changes, remove bgp binary
Mark Stapp [Thu, 12 Jul 2018 13:51:52 +0000 (09:51 -0400)]
tests: align with srcdest lib changes, remove bgp binary

Align the srcdest table test with recent api changes that use
'const' more strictly. Remove test_bgp_table binary - looks
as if it was committed by mistake.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #2469 from ajones-rvbd/ajones-issue-2442
Quentin Young [Wed, 11 Jul 2018 17:34:52 +0000 (13:34 -0400)]
Merge pull request #2469 from ajones-rvbd/ajones-issue-2442

unit tests: support code coverage instrumentation and reports

5 years agoMerge pull request #2655 from mjstapp/lib_const_prefix
Donald Sharp [Wed, 11 Jul 2018 14:45:52 +0000 (10:45 -0400)]
Merge pull request #2655 from mjstapp/lib_const_prefix

zebra, libs: use const prefix ptrs in apis

5 years agozebra, libs: use const prefix ptrs in apis
Mark Stapp [Tue, 10 Jul 2018 20:02:03 +0000 (16:02 -0400)]
zebra, libs: use const prefix ptrs in apis

Add 'const' to prefix args to several zebra route update,
redistribution, and route owner notification apis.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #2651 from qlyoung/doc-cleanup-release-process
Martin Winter [Wed, 11 Jul 2018 00:39:15 +0000 (17:39 -0700)]
Merge pull request #2651 from qlyoung/doc-cleanup-release-process

doc: cleanup maintainer release document

5 years agoMerge pull request #2627 from rtrlib/revalidation
Russ White [Tue, 10 Jul 2018 22:50:47 +0000 (18:50 -0400)]
Merge pull request #2627 from rtrlib/revalidation

bgpd: rpki revalidation

5 years agoMerge pull request #2650 from mjstapp/nh_iter
Donald Sharp [Tue, 10 Jul 2018 22:20:00 +0000 (18:20 -0400)]
Merge pull request #2650 from mjstapp/nh_iter

libs: add ALL_NEXTHOPS_PTR iterator macro

5 years agoMerge pull request #2591 from LabNConsulting/working/master/bgp-delayed-default-instance
Russ White [Tue, 10 Jul 2018 20:46:00 +0000 (16:46 -0400)]
Merge pull request #2591 from LabNConsulting/working/master/bgp-delayed-default-instance

bgpd: fix NULL dereference in vrf-vpn leak config if before default instance

5 years agoospf6d: remove VERSION_TYPE_DEV from CONFDATE checks
Lou Berger [Tue, 10 Jul 2018 20:02:59 +0000 (16:02 -0400)]
ospf6d: remove VERSION_TYPE_DEV from CONFDATE checks

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgpd: remove VERSION_TYPE_DEV from CONFDATE checks
Lou Berger [Tue, 10 Jul 2018 20:02:59 +0000 (16:02 -0400)]
bgpd: remove VERSION_TYPE_DEV from CONFDATE checks

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agolib: remove VERSION_TYPE_DEV from CONFDATE checks
Lou Berger [Tue, 10 Jul 2018 20:02:58 +0000 (16:02 -0400)]
lib: remove VERSION_TYPE_DEV from CONFDATE checks

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agodoc: update doc to no longer requires use of VERSION_TYPE_DEV
Lou Berger [Tue, 10 Jul 2018 20:01:35 +0000 (16:01 -0400)]
doc: update doc to no longer requires use of VERSION_TYPE_DEV

Signed-off-by: Lou Berger <lberger@labn.net>
5 years ago*: VERSION_TYPE no longer needed -- remove it
Lou Berger [Tue, 10 Jul 2018 20:01:04 +0000 (16:01 -0400)]
*: VERSION_TYPE no longer needed -- remove it

Signed-off-by: Lou Berger <lberger@labn.net>
5 years ago*: ignore deprecated code statments in release versions
Lou Berger [Tue, 10 Jul 2018 19:43:09 +0000 (15:43 -0400)]
*: ignore deprecated code statments in release versions
   by setting CONFDATE to 0

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agoMerge pull request #2553 from opensourcerouting/release_proc
Quentin Young [Tue, 10 Jul 2018 19:39:49 +0000 (15:39 -0400)]
Merge pull request #2553 from opensourcerouting/release_proc

doc: Add document for Release Build by maintainer

5 years agodoc: cleanup maintainer release document
Quentin Young [Tue, 10 Jul 2018 19:38:11 +0000 (19:38 +0000)]
doc: cleanup maintainer release document

* Sphinx numbered lists use 1. not 1)
* Indents are three spaces
* Blocks under lists should be indented along with the rest of the list
  content
* Sphinx converts :: to : when used as a code block marker
* Apply some preformatted markup to things that should be preformatted
* Remove trailing whitespace

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolibs: add ALL_NEXTHOPS_PTR iterator macro
Mark Stapp [Tue, 12 Jun 2018 20:33:30 +0000 (16:33 -0400)]
libs: add ALL_NEXTHOPS_PTR iterator macro

Because sometimes we have a pointer to a nexthop_group.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agolib: remove if_lookup_by_index portion of code with unknown vrf
Philippe Guibert [Tue, 10 Jul 2018 12:34:44 +0000 (14:34 +0200)]
lib: remove if_lookup_by_index portion of code with unknown vrf

This function should be called with a known vrf_id. All other cases, the
other API should be called.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: mpls entry interface lookup adaptation for vrf backend
Philippe Guibert [Thu, 5 Jul 2018 08:04:48 +0000 (10:04 +0200)]
zebra: mpls entry interface lookup adaptation for vrf backend

The search algorithm for interface based on ifindex only is adapted to
vrf netns based too. Only the default netns will be used to search the
interface index.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: pbr rule lookup index adaptation for vrf netns
Philippe Guibert [Thu, 5 Jul 2018 08:02:57 +0000 (10:02 +0200)]
zebra: pbr rule lookup index adaptation for vrf netns

the interface lookup based on ifindex in the case the target vrf is
unknown is using the generic vrf api. Like that, in the case of vrf
based netns, the search across different netns other than the default
one are not searched.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: upon RTM_NEWROUTE/DELROUTE, find appropriate interface
Philippe Guibert [Mon, 2 Jul 2018 08:33:00 +0000 (10:33 +0200)]
zebra: upon RTM_NEWROUTE/DELROUTE, find appropriate interface

The interface lookup algorithm is different according to if we are on
netns vrf or not. If we are on the former case, then we only have to
parse the interfaces of the netns, while if we are on the other case, we
have to parse all the interfaces of all the vrfs ( since index is not
overlapping in the latter case).

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #2643 from qlyoung/doc-workflow-reviews
Renato Westphal [Tue, 10 Jul 2018 13:47:43 +0000 (10:47 -0300)]
Merge pull request #2643 from qlyoung/doc-workflow-reviews

doc: add dev docs on code review practices

5 years agobgpd: ability to set vpnv4 nexthop with route-map
Philippe Guibert [Tue, 10 Jul 2018 13:22:13 +0000 (15:22 +0200)]
bgpd: ability to set vpnv4 nexthop with route-map

Ability to set nexthop IP pointer with route-map.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agodoc: add more information about show ip bgp and show bgp
Philippe Guibert [Wed, 4 Jul 2018 15:49:09 +0000 (17:49 +0200)]
doc: add more information about show ip bgp and show bgp

Add some information to inform the user that one can either display ipv4
or ipv6 routing table, with the above commands.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agodoc: Add document for Release Build by maintainer
Martin Winter [Thu, 21 Jun 2018 21:01:43 +0000 (14:01 -0700)]
doc: Add document for Release Build by maintainer

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agopimd: Do not create upstream state when not DR for igmp request
Donald Sharp [Mon, 9 Jul 2018 13:22:56 +0000 (09:22 -0400)]
pimd: Do not create upstream state when not DR for igmp request

When we receive a IGMP report on an interface, do not create upstream
state for that request, unless we are the DR for the incoming interface.

This will prevent a interface on a LAN segment from causing traffic
to flow to itself.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2636 from ppmathis/cleanup/bgpd
Quentin Young [Mon, 9 Jul 2018 19:43:32 +0000 (15:43 -0400)]
Merge pull request #2636 from ppmathis/cleanup/bgpd

bgpd: Cleanup of bgp daemon code

5 years agoMerge pull request #2637 from donaldsharp/pim_malloc_me
Renato Westphal [Mon, 9 Jul 2018 19:02:47 +0000 (16:02 -0300)]
Merge pull request #2637 from donaldsharp/pim_malloc_me

pimd: Remove unnecessary alloc failures

5 years agodoc: add dev docs on code review practices
Quentin Young [Mon, 9 Jul 2018 17:47:25 +0000 (17:47 +0000)]
doc: add dev docs on code review practices

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #2642 from donaldsharp/deprecated
Renato Westphal [Mon, 9 Jul 2018 18:29:33 +0000 (15:29 -0300)]
Merge pull request #2642 from donaldsharp/deprecated

ospfd: Remove deprecated code

5 years agoMerge pull request #2632 from ppmathis/bugfix/bgp-autoshut
Quentin Young [Mon, 9 Jul 2018 17:55:33 +0000 (13:55 -0400)]
Merge pull request #2632 from ppmathis/bugfix/bgp-autoshut

bgpd: Fix bgp auto-shutdown behavior

5 years agoospfd: Remove deprecated code
Donald Sharp [Mon, 9 Jul 2018 16:22:21 +0000 (12:22 -0400)]
ospfd: Remove deprecated code

This code has been deprecated for over a year, let's remove it now.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Remove unnecessary alloc failures
Donald Sharp [Sun, 8 Jul 2018 16:09:21 +0000 (12:09 -0400)]
pimd: Remove unnecessary alloc failures

Remove from pim unnecessary alloc failure testing
as that alloc failure will cause an assert.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Cleanup of bgp daemon code
Pascal Mathis [Sat, 7 Jul 2018 20:34:25 +0000 (22:34 +0200)]
bgpd: Cleanup of bgp daemon code

This commit removes various parts of the bgpd implementation code which
are unused/useless, e.g. unused functions, unused variable
initializations, unused structs, ...

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
5 years agopimd: Fix up > 80 columns
Donald Sharp [Sat, 7 Jul 2018 20:00:48 +0000 (16:00 -0400)]
pimd: Fix up > 80 columns

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Make code consistent in regards to lookup
Donald Sharp [Sat, 7 Jul 2018 14:04:30 +0000 (10:04 -0400)]
pimd: Make code consistent in regards to lookup

In places where we do a pim_ecmp_nexthop_search, also
use pim_ecmp_nexthop_lookup instead of the single path
case of pim_nexthop_lookup.

This is in preparation of more serious surgery to fix
the weird api of pim_find_or_track_nexthop.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Remove duplicate parameter to functions
Donald Sharp [Sat, 7 Jul 2018 13:52:28 +0000 (09:52 -0400)]
pimd: Remove duplicate parameter to functions

Both pim_ecmp_nexthop_lookup and pim_ecmp_fib_lookup_if_vif_index
pass the address in 2 times.  Make function calls consistent
and just pass in the src once.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Refactor function to use pim_ecmp_nexthop_lookup
Donald Sharp [Sat, 7 Jul 2018 12:43:27 +0000 (08:43 -0400)]
pimd: Refactor function to use pim_ecmp_nexthop_lookup

The pim_ecmp_fib_looikup_if_vif_index does practically
the same work as pim_ecmp_nexthop_lookup, refactor to
use that function so that we do not have more code
that must parse the results from zclient_lookup_nexthop.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: When doing nexthop-lookups don't allocate perm memory
Donald Sharp [Fri, 6 Jul 2018 20:15:58 +0000 (16:15 -0400)]
pimd: When doing nexthop-lookups don't allocate perm memory

When doing nexthop lookups do not permanently allocate
memory in zebra and pim to track the nexthop specified
on the cli.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Figure neighbors -vs- paths when doing RPF
Donald Sharp [Fri, 6 Jul 2018 13:03:23 +0000 (09:03 -0400)]
pimd: Figure neighbors -vs- paths when doing RPF

When we are looking up a RPF with a ecmp path, there
are situations where we are failing to find a path change
because we were not considering the actual number of neighbors
we have available to us at the start of the loop.

Example:

Suppose 2 way ecmp with a neighbor on each path.  We have
multiple upstreams that are strewn across both paths.
If we loose a pim neighbor on one of the paths we would
initiate a rescan of the upstreams.  If the neighbor
we lost happened to be the last ecmp path we rescanned
we would not successfully find a new path and leave
the upstream stranded.

This code change looks at the number of available neighbors
that we have -vs- the number of paths we have and chooses
the smaller of the two for figuring out what to do.

There probably exist other failure scenarios as well that
I am missing here and quite frankly the current code muddies
the water between a RPF lookup failure -vs- a RPF lookup succeeded
and there are no paths.  Further work is needed here imo.

Additionally this idea of a pim_ecmp_nexthop_lookup and
pim_ecmp_nexthop_search is bogus.  They are the same function and
should be merged at some point in time.

Ticket: CM-21599
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: There is no reason a IGMP src should need a neighbor
Donald Sharp [Fri, 6 Jul 2018 12:36:34 +0000 (08:36 -0400)]
pimd: There is no reason a IGMP src should need a neighbor

There is no reason that a IGMP src should need a upstream
pim neighbor when doing a RPF lookup.

Ticket: CM-21599
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Fix bgp auto-shutdown behavior
Pascal Mathis [Sat, 7 Jul 2018 11:14:55 +0000 (13:14 +0200)]
bgpd: Fix bgp auto-shutdown behavior

The current behavior of the `bgp default shutdown` command is to set the
state of all newly configured peers to shutdown. This leads to a problem
when restarting bgpd, because all peers will then be seen as newly
configured, which leads to all peers being set to shutdown after each
restart.

This behavior is undesired and not common when comparing the
implementation against other vendors. This commit moves the `bgp default
shutdown` configuration underneath the peer-group and peer
configuration, to ensure that existing peers will not be set to shutdown
after a daemon restart.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
5 years agoMerge pull request #2630 from donaldsharp/hashables
Rafael Zalamena [Fri, 6 Jul 2018 15:30:06 +0000 (12:30 -0300)]
Merge pull request #2630 from donaldsharp/hashables

revert hash_walk/iterate optimizations

5 years agoMerge pull request #2628 from pguibert6WIND/realpath_debug
Quentin Young [Fri, 6 Jul 2018 15:24:25 +0000 (11:24 -0400)]
Merge pull request #2628 from pguibert6WIND/realpath_debug

lib: add the pathname to get the realpath in case of failure

5 years agoMerge pull request #2618 from pacovn/PVS-Studio_library_warnings
Quentin Young [Fri, 6 Jul 2018 15:23:29 +0000 (11:23 -0400)]
Merge pull request #2618 from pacovn/PVS-Studio_library_warnings

pimd: standard library usage (PVS-Studio)

5 years agoMerge pull request #2605 from pacovn/PVS-Studio_null_check
Jafar Al-Gharaibeh [Fri, 6 Jul 2018 15:22:47 +0000 (10:22 -0500)]
Merge pull request #2605 from pacovn/PVS-Studio_null_check

ospfd  pimd: null check (PVS-Studio)

5 years agovtysh: Remove unused variable
Donald Sharp [Fri, 6 Jul 2018 14:22:34 +0000 (10:22 -0400)]
vtysh: Remove unused variable

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Add some documentation
Donald Sharp [Fri, 6 Jul 2018 14:18:50 +0000 (10:18 -0400)]
lib: Add some documentation

Add some documentation to hash_walk/iterate to tell people
to not do something stupid.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoRevert "lib: A small optimization for the hash iterate and walk functions"
Donald Sharp [Fri, 6 Jul 2018 14:18:11 +0000 (10:18 -0400)]
Revert "lib: A small optimization for the hash iterate and walk functions"

This reverts commit fc61644e440c875eefa222ab34d726c6281ca806.

5 years agolib: add the pathname to get the realpath in case of failure
Philippe Guibert [Mon, 2 Jul 2018 16:27:46 +0000 (18:27 +0200)]
lib: add the pathname to get the realpath in case of failure

Sometimes, the file under /var/run/netns may not be authorised to be
read ( because it is not read permission for frr user, for instance).
so it is good to know what happened.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoeigrpd lib pimd zebra: dead code (PVS-Studio)
F. Aragon [Mon, 2 Jul 2018 16:50:20 +0000 (18:50 +0200)]
eigrpd lib pimd zebra: dead code (PVS-Studio)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agopimd: standard library usage (PVS-Studio)
F. Aragon [Tue, 3 Jul 2018 10:11:19 +0000 (12:11 +0200)]
pimd: standard library usage (PVS-Studio)

fread() function was not used properly.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoospfd pimd: null check (PVS-Studio)
F. Aragon [Mon, 2 Jul 2018 15:44:58 +0000 (17:44 +0200)]
ospfd pimd: null check (PVS-Studio)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2602 from pacovn/PVS-Studio_element_overflow
Quentin Young [Thu, 5 Jul 2018 21:49:49 +0000 (17:49 -0400)]
Merge pull request #2602 from pacovn/PVS-Studio_element_overflow

bgpd zebra: element overflow (PVS-Studio)

5 years agoMerge pull request #2623 from pacovn/PVS-Studio_memcpy_source_underflow
Quentin Young [Thu, 5 Jul 2018 21:41:25 +0000 (17:41 -0400)]
Merge pull request #2623 from pacovn/PVS-Studio_memcpy_source_underflow

ldpd: buffer underflow, thread safety (PVS-Studio)

5 years agoMerge pull request #2568 from pguibert6WIND/doc_mpls
Quentin Young [Thu, 5 Jul 2018 18:56:34 +0000 (14:56 -0400)]
Merge pull request #2568 from pguibert6WIND/doc_mpls

doc: add MPLS configuration commands

5 years agobgpd: add test for bgp_table_range_lookup
Marcel Röthke [Fri, 15 Jun 2018 11:28:06 +0000 (13:28 +0200)]
bgpd: add test for bgp_table_range_lookup

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
5 years agobgpd: add support for rpki revalidation on rpki updates
Marcel Röthke [Thu, 29 Mar 2018 09:15:18 +0000 (11:15 +0200)]
bgpd: add support for rpki revalidation on rpki updates

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
5 years agoMerge pull request #2624 from donaldsharp/PIM_ZOMILY_ZOM
Jafar Al-Gharaibeh [Wed, 4 Jul 2018 23:42:51 +0000 (18:42 -0500)]
Merge pull request #2624 from donaldsharp/PIM_ZOMILY_ZOM

pimd: Use generated interface name

5 years agounit tests: support code coverage instrumentation and reports
Arthur Jones [Thu, 14 Jun 2018 13:44:38 +0000 (06:44 -0700)]
unit tests: support code coverage instrumentation and reports

Currently, make check runs the unit tests and reports pass/fail,
but we have no way to guage how much of the code is covered by
these tests.  gcov provides those statistics on a per source
file basis, but requires special CFLAGS and LDFLAGS.  Here, we
add the --enable-gcov configure option to setup those options
correctly.  We also add a make target called check-coverage,
which runs the unit tests, runs gcov and uploads the data to
the codecov.io cloud service for display.

Finally, we include a Dockerfile-coverage which creates a
container image in alpine linux to run the tests.  To create
the image:

$ docker build \
--build-arg commit=`git rev-parse HEAD` \
--build-arg token=<upload token from codecov.io> \
-t frr-gcov:latest \
-f docker/alpine/Dockerfile-coverage .

and to create and upload the report:

$ docker run -it --rm frr-gcov:latest

Testing done:

Created and uploaded a report from my fork using alpine linux 3.7.
Non-coverage alpine 3.7 build still works.

Issue: https://github.com/FRRouting/frr/issues/2442
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>