Commit Graph

12044 Commits

Author SHA1 Message Date
Don Slice
fc132690b4 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>
2018-07-17 14:35:33 +00:00
Renato Westphal
972388dd5c
Merge pull request #2589 from donaldsharp/admiral_ACK_bar
Netlink sockets are synchronous
2018-07-14 11:48:40 -03:00
Renato Westphal
0e2f00b0d5
Merge pull request #2658 from mjstapp/srcdest_test_const
tests: align with srcdest lib changes, remove bgp binary
2018-07-14 11:47:54 -03:00
Mark Stapp
432eaa5d97 tests: add test_bgp_table to gitignore
Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-07-13 07:56:38 -04:00
Donald Sharp
8c85e8ea92 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>
2018-07-12 22:43:06 -04:00
Donald Sharp
19d5a4fead 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>
2018-07-12 22:43:06 -04:00
Donald Sharp
51034b787f
Merge pull request #2595 from pguibert6WIND/fix_netlink_rx_route_vrfnetns
zebra: upon RTM_NEWROUTE/DELROUTE, find appropriate interface
2018-07-12 22:22:34 -04:00
Renato Westphal
25666e25af
Merge pull request #2660 from sworleys/master
zebra: Fix function call in fuzzing code
2018-07-12 18:39:09 -03:00
Stephen Worley
24f8f9791e 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>
2018-07-12 12:39:13 -04:00
Mark Stapp
2861a0deda 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>
2018-07-12 09:51:52 -04:00
Quentin Young
2dae54733c
Merge pull request #2469 from ajones-rvbd/ajones-issue-2442
unit tests: support code coverage instrumentation and reports
2018-07-11 13:34:52 -04:00
Donald Sharp
e79c6d3f8f
Merge pull request #2655 from mjstapp/lib_const_prefix
zebra, libs: use const prefix ptrs in apis
2018-07-11 10:45:52 -04:00
Mark Stapp
86391e5659 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>
2018-07-11 09:22:49 -04:00
Martin Winter
01d38683b9
Merge pull request #2651 from qlyoung/doc-cleanup-release-process
doc: cleanup maintainer release document
2018-07-10 17:39:15 -07:00
Russ White
93387e540a
Merge pull request #2627 from rtrlib/revalidation
bgpd: rpki revalidation
2018-07-10 18:50:47 -04:00
Donald Sharp
89c9b8285e
Merge pull request #2650 from mjstapp/nh_iter
libs: add ALL_NEXTHOPS_PTR iterator macro
2018-07-10 18:20:00 -04:00
Russ White
96257ced27
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
2018-07-10 16:46:00 -04:00
Quentin Young
11acdeacaf
Merge pull request #2553 from opensourcerouting/release_proc
doc: Add document for Release Build by maintainer
2018-07-10 15:39:49 -04:00
Quentin Young
5931e2599b 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>
2018-07-10 19:39:39 +00:00
Mark Stapp
d826a734af 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>
2018-07-10 14:07:43 -04:00
Philippe Guibert
fda8229965 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>
2018-07-10 17:32:40 +02:00
Philippe Guibert
86f07f44c1 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>
2018-07-10 17:32:36 +02:00
Philippe Guibert
06432d4e4f 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>
2018-07-10 17:32:23 +02:00
Philippe Guibert
fac4d51eea 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>
2018-07-10 17:32:23 +02:00
Renato Westphal
c26178fe61
Merge pull request #2643 from qlyoung/doc-workflow-reviews
doc: add dev docs on code review practices
2018-07-10 10:47:43 -03:00
Martin Winter
20e9d2ccea doc: Add document for Release Build by maintainer
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-07-10 00:49:28 -07:00
Quentin Young
6b479dff80
Merge pull request #2636 from ppmathis/cleanup/bgpd
bgpd: Cleanup of bgp daemon code
2018-07-09 15:43:32 -04:00
Renato Westphal
fbde7f293e
Merge pull request #2637 from donaldsharp/pim_malloc_me
pimd: Remove unnecessary alloc failures
2018-07-09 16:02:47 -03:00
Quentin Young
590a7368df doc: add dev docs on code review practices
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-07-09 18:32:01 +00:00
Renato Westphal
b4d3968a68
Merge pull request #2642 from donaldsharp/deprecated
ospfd: Remove deprecated code
2018-07-09 15:29:33 -03:00
Quentin Young
7e5a4178e0
Merge pull request #2632 from ppmathis/bugfix/bgp-autoshut
bgpd: Fix bgp auto-shutdown behavior
2018-07-09 13:55:33 -04:00
Donald Sharp
ec50871f91 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>
2018-07-09 12:37:54 -04:00
Donald Sharp
2b57b94834 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>
2018-07-08 12:09:21 -04:00
Pascal Mathis
3f54c705ec
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>
2018-07-07 22:51:13 +02:00
Pascal Mathis
76af525b64
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>
2018-07-07 13:14:55 +02:00
Rafael Zalamena
76f17a8cc4
Merge pull request #2630 from donaldsharp/hashables
revert hash_walk/iterate optimizations
2018-07-06 12:30:06 -03:00
Quentin Young
9d90a86083
Merge pull request #2628 from pguibert6WIND/realpath_debug
lib: add the pathname to get the realpath in case of failure
2018-07-06 11:24:25 -04:00
Quentin Young
e8ec11787b
Merge pull request #2618 from pacovn/PVS-Studio_library_warnings
pimd: standard library usage (PVS-Studio)
2018-07-06 11:23:29 -04:00
Jafar Al-Gharaibeh
8c469c83bc
Merge pull request #2605 from pacovn/PVS-Studio_null_check
ospfd  pimd: null check (PVS-Studio)
2018-07-06 10:22:47 -05:00
Donald Sharp
d76345fa66 vtysh: Remove unused variable
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-07-06 10:22:34 -04:00
Donald Sharp
8b52179d2a 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>
2018-07-06 10:18:50 -04:00
Donald Sharp
df66eb2eeb Revert "lib: A small optimization for the hash iterate and walk functions"
This reverts commit fc61644e440c875eefa222ab34d726c6281ca806.
2018-07-06 10:18:11 -04:00
Philippe Guibert
0faeba264e 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>
2018-07-06 08:51:54 +02:00
F. Aragon
09ed14e887
pimd: standard library usage (PVS-Studio)
fread() function was not used properly.

Signed-off-by: F. Aragon <paco@voltanet.io>
2018-07-06 01:09:00 +02:00
F. Aragon
2ffc213bf8
ospfd pimd: null check (PVS-Studio)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-07-06 00:49:24 +02:00
Quentin Young
32ec4bc474
Merge pull request #2602 from pacovn/PVS-Studio_element_overflow
bgpd zebra: element overflow (PVS-Studio)
2018-07-05 17:49:49 -04:00
Quentin Young
b1b5a009c6
Merge pull request #2623 from pacovn/PVS-Studio_memcpy_source_underflow
ldpd: buffer underflow, thread safety (PVS-Studio)
2018-07-05 17:41:25 -04:00
Quentin Young
dad87073aa
Merge pull request #2568 from pguibert6WIND/doc_mpls
doc: add MPLS configuration commands
2018-07-05 14:56:34 -04:00
Marcel Röthke
a98b00ee3e bgpd: add test for bgp_table_range_lookup
Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2018-07-05 16:06:37 +02:00
Marcel Röthke
1dacdd8b25 bgpd: add support for rpki revalidation on rpki updates
Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2018-07-05 16:06:37 +02:00