Commit Graph

17268 Commits

Author SHA1 Message Date
Renato Westphal
d00d0f9634
Merge pull request #5126 from qlyoung/fix-grpc-build
lib: fix gRPC northbound plugin build
2019-10-09 16:43:33 -03:00
Quentin Young
a4862a00a3
Merge pull request #5127 from opensourcerouting/asan-updates
configure.ac/doc: update address sanitizer pointers
2019-10-09 11:58:56 -04:00
Donatas Abraitis
61fcca72e4
Merge pull request #5125 from donaldsharp/pim_warnings_to_debugs
pimd: Fix zlog_warn when we mean debug and vice versa
2019-10-09 15:38:29 +03:00
Rafael Zalamena
4260f16567 doc: update topotests doc for address sanitizer
Use the `--enable-address-sanitizer` option instead of the manual
version using environment flags.

This also avoids the problem of having to remember to skip clippy with
the custom flags:

```
make -C lib CFLAGS="-g -O2" LDFLAGS="-g" clippy
```

The snippet above is not needed with `--enable-address-sanitizer`!

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-10-08 21:35:06 -03:00
Rafael Zalamena
65209e4fbf configure.ac: fix memory sanitizer test
We should test for `-fsanitize=memory` instead of `-fsanitize=thread`
when enabling memory sanitizer. While here, fix the error message.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-10-08 21:24:26 -03:00
Quentin Young
63d12a7d77 lib: fix gRPC northbound plugin build
Some issues with our internal vector type being typedef'd as `vector`,
which conflicts with the C++ standard vector class...

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-10-08 19:13:50 +00:00
Jafar Al-Gharaibeh
6eb3b18a09
Merge pull request #5120 from sworleys/PBR-LL-FIX
pbrd: Don't track ipv6 link locals
2019-10-08 09:49:02 -07:00
Quentin Young
a7ecb2e745
Merge pull request #5121 from idryzhov/remove-brackets
*: remove redundant brackets in commands
2019-10-08 11:36:22 -04:00
Quentin Young
81306cfff3
Merge pull request #5123 from idryzhov/fix-typo
lib: fix typo
2019-10-08 11:34:36 -04:00
Donald Sharp
fb9670aa53 pimd: Fix zlog_warn when we mean debug and vice versa
There are several places in the pim where we are mixing up
zlog_warn w/ zlog_debug and vice versa.  If we are protecting
a zlog_warn w/ a debug is it really a warn?  If we have an actual
error situation we should also warn about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-08 10:36:02 -04:00
Igor Ryzhov
898d21a4a4 lib: fix typo
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2019-10-08 16:52:33 +03:00
Igor Ryzhov
1e81afc365 *: remove redundant brackets in commands
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2019-10-08 15:31:40 +03:00
Stephen Worley
cb254f41c0 pbrd: Don't track ipv6 link locals
Don't bother tracking ipv6 link locals to determine if a map
should be installed. Every interface has a route of `fe80::/64`
so its just going to return the arbitrarily first one it finds
when it resolves it and hands it back to us.

Instead, just track the interface we specify along with it.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-10-07 18:29:01 -04:00
Jafar Al-Gharaibeh
4668ac905c
Merge pull request #5112 from qlyoung/cli-reject-ipv4-leading-zero
lib: reject leading 0 in ipv4 decimal quad
2019-10-07 13:05:09 -07:00
Donatas Abraitis
f7192aa119
Merge pull request #5105 from donaldsharp/watchfrr_more_systemd_status
lib, watchfrr: Add some additional status messages to systemd
2019-10-07 20:46:46 +03:00
Quentin Young
0fc3eb2fd4
Merge pull request #5106 from ton31337/fix/maximum-prefix_uint16_to_uint32
bgpd: Use uint32_t for maximum-prefix
2019-10-07 12:33:04 -04:00
Quentin Young
e843208299 lib: reject leading 0 in ipv4 decimal quad
inet_pton() is used to parse ipv4 addresses internally, therefore FRR
does not support octal notation for quads. The ipv4 cli token validator
should make sure that str2prefix() can parse tokens it allows, and
str2prefix uses inet_pton, so we have to disallow leading zeros in ipv4
quads.

In short, 1.1.1.01 is no longer valid and must be expressed as 1.1.1.1.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-10-07 15:36:39 +00:00
Martin Winter
7310aae9ae
Merge pull request #4964 from ashish12pant/ecmp_tests
tests: Fix bgp-ecmp-topo2
2019-10-04 21:02:27 +02:00
Martin Winter
0c7f64c5cf
Merge branch 'master' into ecmp_tests 2019-10-04 15:19:17 +02:00
Donatas Abraitis
1f6a6e0700
Merge pull request #5005 from Frankkkkk/dockerfile
Make docker images lighter and with less layers
2019-10-04 13:51:23 +01:00
Donatas Abraitis
a0a87037ac bgpd: Use uint32_t for maximum-prefix
Currently we have unsigned long which is not what we defined
in CLI (1-4294967295).

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-10-04 15:46:21 +03:00
Donatas Abraitis
1867569d78
Merge pull request #5082 from donaldsharp/add_bgp_rr_ibgp_topotest
tests: Add a topology that shows broken ibgp Route Reflector behavior
2019-10-04 11:32:20 +01:00
Donald Sharp
b3ee8bcc61 lib, watchfrr: Add some additional status messages to systemd
Allow systemd to be informed about operational state so operators can
infer a bit about what is going on with FRR from the systemd status
cli.

sharpd@robot ~/frr4> systemctl status frr
● frr.service - FRRouting
   Loaded: loaded (/usr/lib/systemd/system/frr.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2019-10-03 21:09:04 EDT; 7s ago
     Docs: https://frrouting.readthedocs.io/en/latest/setup.html
  Process: 32455 ExecStart=/usr/lib/frr/frrinit.sh start (code=exited, status=0/SUCCESS)
   Status: "FRR Operational"
    Tasks: 12 (limit: 4915)
   Memory: 76.5M
   CGroup: /system.slice/frr.service
           ├─32468 /usr/lib/frr/watchfrr -d zebra bgpd staticd
           ├─32487 /usr/lib/frr/zebra -d -A 127.0.0.1 -s 90000000
           ├─32492 /usr/lib/frr/bgpd -d -A 127.0.0.1
           └─32500 /usr/lib/frr/staticd -d -A 127.0.0.1

Please note the `Status: ...` line above.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-03 21:09:28 -04:00
Jafar Al-Gharaibeh
bf9846bdbe
Merge pull request #5102 from donaldsharp/fix_some_warnings
Fix some warnings
2019-10-03 10:38:29 -07:00
Donatas Abraitis
5364f11bec
Merge pull request #5103 from donaldsharp/doc_dont
doc: Add some additional warnings around Turning off bgp capabilities
2019-10-03 18:58:11 +03:00
Donald Sharp
a8100f512a
Merge pull request #5079 from mjstapp/fix_dplane_drop_at_shut
zebra: during shutdown processing, drop dplane results
2019-10-03 11:49:07 -04:00
Donald Sharp
7cdc9530ef doc: Add some additional warnings around Turning off bgp capabilities
FRR supports the ability to turn off the negotation of bgp capabilities.
Provide a few bread crumbs to the operator that it might not be as
useful as they would hope.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-03 09:28:23 -04:00
Donald Sharp
3835984f1c bgpd: bgp pointer may be null
The bgp pointer may not be actually found.  The debug
message that was using it could get the same value
another way.  Convert over

Fixes Coverity Scan Issue:

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-03 08:57:55 -04:00
Donald Sharp
c17140fd7a bgpd: Show to compiler that uint64_t -> uint32_t is ok here
We only have a uint32_t value here but clippy is wise and
gives us more data than we need. Tell the compiler we can
throw some stuff away.

This was found by inspecting CI results.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-03 08:55:29 -04:00
Ashish Pant
819f982590 tests: Enabling bgp-ecmp-topo2 test cases
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
2019-10-03 07:15:20 +05:30
Ashish Pant
6ade2c18fb tests: Modify json for bgp-ecmp-topo2
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Modified json files to configure route-map which prefer global
address
2019-10-03 07:15:20 +05:30
Ashish Pant
915bed88d8 tests: Add topojson route-map for nexthop
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Add route-map option for ipv6 nexthop

Fix typo in bgp configuration
2019-10-03 07:15:20 +05:30
Ashish Pant
161572bdf9 tests: Fix topojson link local ipv6 address
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

Removed code that disabled link local ipv6 address on the interface
2019-10-03 07:15:11 +05:30
Jafar Al-Gharaibeh
6d7b7e4257
Merge pull request #5095 from donaldsharp/static_fix_for_ROUTE_ALL
ZEBRA_ROUTE_ALL fix
2019-10-02 09:30:36 -07:00
Donald Sharp
0e965c6781 zebra: Fix redistribution deletion for ZEBRA_ROUTE_ALL
commit ee8a72f315

broke the usage of ZEBRA_ROUTE_ALL as a valid redistribution
command.  This commit puts it back in.  LDP uses ZEBRA_ROUTE_ALL
as an option to say it is interested in all REDISTRIBUTION events.

Fixes: #5072
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-02 10:01:35 -04:00
Donald Sharp
67a9eda9ee sharpd: Start infrastructure to allow for redistribution testing
Start the work in sharpd to allow the testing of redistribution
of routes.  Namely telling zebra to tell us about redistribution events
via the callback.

Future work here will allow sharpd to specify the redistribution
events it wants and to allow us to track that via counters.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-02 10:01:35 -04:00
Sri Mohana Singamsetty
f3762d2dd8
Merge pull request #5090 from sworleys/Fix-Vrf_ID-Decode
lib: Decode vrf_id update appropriately from zapi
2019-10-01 19:22:53 -07:00
Donald Sharp
dda524e843
Merge pull request #5087 from opensourcerouting/topotest-skip-on-assert-failure
topotests: skip tests when any assert fails
2019-10-01 19:14:11 -04:00
Stephen Worley
66cd1bb309 lib: Decode vrf_id update appropriately from zapi
The vrf_id in `zsend_interface_vrf_update()` is encoded as
a long via `stream_putl()`, we should decode it as such
as well.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-10-01 19:07:37 -04:00
Donald Sharp
113296dc34
Merge pull request #5086 from cfra/fix/isis-threeway
isisd: Fix handling of neighbor circuit id in three way handshake
2019-10-01 09:00:32 -04:00
Donald Sharp
aa2a0498f3 tests: Add a topology that shows broken ibgp behavior
In a leaf/spine topology with only IBGP connections, where
the same network is being redistributed at multiple points
in the network ( say a redistribute connected at both leaf and spines )
we end up in a state where zebra gets very confused.

eva# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

C>* 192.168.1.0/24 is directly connected, tor1-eth0, 00:00:30
C>* 192.168.2.0/24 is directly connected, tor1-eth1, 00:00:30
B   192.168.3.0/24 [200/0] via 192.168.4.2 inactive, 00:00:25
                           via 192.168.6.2 inactive, 00:00:25
B>* 192.168.4.0/24 [200/0] via 192.168.2.3, tor1-eth1, 00:00:25
  *                        via 192.168.6.2 inactive, 00:00:25
C>* 192.168.5.0/24 is directly connected, tor1-eth2, 00:00:30
B>* 192.168.6.0/24 [200/0] via 192.168.4.2 inactive, 00:00:25
  *                        via 192.168.5.4, tor1-eth2, 00:00:25

Effectively we have ibgp routes recursing through ibgp routes
and there is no metric to discern whom to listen to.

This draft:
https://tools.ietf.org/html/draft-ietf-idr-bgp-optimal-route-reflection-19

appears to address this issue.  From looking at both cisco and arista
deployments they are handling this issue by having the route reflector
prefer the localy learned routes over from their clients.

Add this topology, in a broken state, so that when we do fix this issue
it is a simple matter of touching this topology up and re-adding it
to the normal daily builds.  I also wanted to add this topology
since it is in a state of `doneness` and I wanted to move onto
my normal day job without having to remember about this test.

This topology is not configured to be run as part of the normal
topotests.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-10-01 07:45:38 -04:00
Christian Franke
df04b6afc4 isisd: Fix handling of neighbor circuit id in three way handshake
RFC 5303 states:

      If the system ID and Extended Local Circuit ID of the neighboring
      system are known (in adjacency three-way state Initializing or
      Up), the neighbor's system ID SHALL be reported in the Neighbor
      System ID field, and the neighbor's Extended Local Circuit ID
      SHALL be reported in the Neighbor Extended Local Circuit ID field.

There is nothing written about only setting the Extended circuit ID of the
adjacency only when we bring the three-way adjacency up.

In fact, we should always update it, to avoid the problem described in #4783.

Fixes: #4783
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2019-10-01 12:12:22 +02:00
Renato Westphal
698603ce6d
Merge pull request #5085 from qlyoung/strip-trailing-whitespace-2019
*: strip trailing whitespace
2019-09-30 22:53:56 -03:00
Rafael Zalamena
c8c265f571 topotests: skip tests when any assert fails
When an `assert` fails we should skip all other tests on the file. Once
a failure is detected we can't rely on the setup anymore, since most of
the tests assume the previous worked.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-09-30 21:15:15 -03:00
Russ White
44cde8a39f
Merge pull request #5011 from karamalla0406/evpn_cli_json
bgpd: Fixed 'show bgp l2vpn evpn json' to display all routes
2019-09-30 18:30:28 -04:00
Quentin Young
8ce1753c7e
Merge pull request #5081 from pguibert6WIND/show_brief_doc
doc: add vty command information about brief usage
2019-09-30 15:06:42 -04:00
Quentin Young
c258527bd2 *: strip trailing whitespace
Some of it has snuck by CI

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-30 16:44:43 +00:00
Sri Mohana Singamsetty
c4cb0574d4
Merge pull request #5060 from chiragshah6/evpn_dev2
zebra: fix evpn prefix-routes-only for default vrf
2019-09-30 09:12:51 -07:00
Russ White
9898a2fb34
Merge pull request #5009 from donaldsharp/interface_deletion
lib, zebra: Allow for interface deletion when kernel event happens
2019-09-30 07:46:19 -04:00
Philippe Guibert
fbe49edb53 doc: add vty command information about brief usage
brief keyword can be used along with vrf NAME or vrf all.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2019-09-30 09:35:05 +02:00