Commit Graph

20148 Commits

Author SHA1 Message Date
Quentin Young
b5f41a0793
Merge pull request #6626 from volta-networks/fix_stream_getf
lib: fix STREAM_GETF macro
2020-06-22 16:47:25 -04:00
Quentin Young
adeb067232 lib: clarify usage of prefix_bit function
"prefixlen" is really a bit index

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-06-22 13:59:01 -04:00
Emanuele Di Pascale
741b1c4f10 lib: fix STREAM_GETF macro
a missing '!' operator was making any STREAM_GETF fail
when in fact it should have succeeded. As a consequence
of this, for example, many link-params of an interface
were not being read and populated.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2020-06-22 19:04:06 +02:00
Renato Westphal
a5e81e0367
Merge pull request #6600 from mjstapp/fix_ldp_zlog_tmp
ldpd: clean up temp zlog files
2020-06-22 13:14:21 -03:00
Donatas Abraitis
b099a5c866 bgpd: Do not treat the route as martian for static BGP routes
If we have something like:
```
ip route 1.1.1.0/24 Null0
!
router bgp 100
 no bgp ebgp-requires-policy
 neighbor 192.168.0.2 remote-as 200
 !
 address-family ipv4 unicast
  network 1.1.1.0/24
  redistribute connected
 exit-address-family
!
line vty
!
```

1.1.1.0/24 is not advertised due to martian nexthop (0.0.0.0). It starts
working only when we use `redistribute static`.

By checking if it's a BGP static route we able to announce
1.1.1.0/24 with `network 1.1.1.0/24` without redistribute even when
`bgp import-check` is enabled.

Disabling `bgp import-check` works as well, but it's enabled by default
since 7.4.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-06-22 16:23:24 +03:00
Donald Sharp
dbec65f6ca
Merge pull request #6601 from Jafaral/version
build: Allow removal of build configs from version string
2020-06-22 08:03:08 -04:00
Mark Stapp
b12a63f120 ldpd: clean up temp zlog files
Clean up the temp zlog dirs in /var/tmp/frr/ that the ldpd
child processes were leaving. The child processes do a non-
standard lib init/deinit, so they need to explicitly deinit
the zlog module.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-22 07:35:20 -04:00
Donald Sharp
8803809f0b
Merge pull request #6617 from Niral-Networks/niral_dev_isis_vrf
ISIS VRF: Route info with vrf_id from ISIS to Zebra
2020-06-19 16:45:23 -04:00
Kaushik
dc18b3b032 ISIS VRF: Route info with vrf_id from ISIS to Zebra
1. The "VRF_DEFAULT" param is changed to "isis->vrf_id" before
   sending the routes to zebra.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-06-19 11:46:12 -07:00
Jafar Al-Gharaibeh
e063f27136 build: Allow removal of build configs from version string
A new config option `--disable-version-build-config`
allows you to show short version string by dropping
"configured with:" and all of its build configs

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2020-06-19 11:15:43 -05:00
Donald Sharp
8dc1d92588
Merge pull request #6615 from opensourcerouting/build-assorted-20200619
build: assorted fixes (protobuf, frr-format)
2020-06-19 06:18:20 -04:00
Jafar Al-Gharaibeh
68f9d353ee
Merge pull request #6613 from donaldsharp/monotonic_mononity
bgpd: Use time since epoch for timestamps for bmp updates
2020-06-18 23:47:40 -05:00
Jafar Al-Gharaibeh
82d1188aef
Merge pull request #6556 from mjstapp/sharp_multi_session
sharpd: add zclient session create and delete
2020-06-18 23:46:17 -05:00
Jafar Al-Gharaibeh
5f26363bda
Merge pull request #6614 from qlyoung/fix-evpnmh-reload
tools: 'evpn mh' is a new one-line context
2020-06-18 23:41:55 -05:00
Jafar Al-Gharaibeh
868b5d2023
Merge pull request #6610 from donaldsharp/too_much_pim
pimd: Poorly ported code fix
2020-06-18 23:39:41 -05:00
Donald Sharp
cc6507a5bf
Merge pull request #6606 from opensourcerouting/bfdd-fixes
topotests: stabilize bfd-vrf-topo1
2020-06-18 21:24:00 -04:00
David Lamparter
a26305a8ba build: fix frr-format warnings
Unfortunately, the way the frr-format plugin is set up, snprintf() with
PRId64 can generate false warnings :|.  Easy workaround is to use
snprintfrr().

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-06-19 01:09:10 +02:00
David Lamparter
4b7272c7a6 build: fix protobuf dependencies
Need to list #include'd header files in Makefile to make sure it builds
correctly.

Fixes: #6576
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-06-19 01:07:58 +02:00
Quentin Young
a840a40df4 tools: 'evpn mh' is a new one-line context
frr-reload.py needs to know about config-level commands, otherwise it
assumes they are contexts

Ticket: CM-30128
Ticket: CM-30077
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-06-18 17:00:51 -04:00
Donald Sharp
02cee15823 bgpd: Use time since epoch for timestamps for bmp updates
RFC states that time should be in seconds since the epoch.
The code was using system uptime in seconds.

Fixes: #6549
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-18 15:56:44 -04:00
Rafael Zalamena
4aa283cd4e bgpd: attempt to fix test convergence failure
Don't reset BFD peer on BGP session establishment.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-18 16:51:13 -03:00
Donald Sharp
b0ee422ab1 pimd: Poorly ported code fix
This section of code was ported incorrectly and is causing
issues when running against some tests.  Fix the missed
code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-18 11:06:09 -04:00
Mark Stapp
6df72c7f17
Merge pull request #6602 from donaldsharp/allow_installation
zebra: When installing a nexthop-group success is vital
2020-06-18 08:30:07 -04:00
Rafael Zalamena
65e3e8484b topotests: bump BFD test convergence time
Lets make the test more resilient to failures.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-18 08:42:11 -03:00
Rafael Zalamena
0a901ebcb6 topotests: remove old FRR version support
Removes a few lines of code.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-18 08:02:34 -03:00
Donald Sharp
d52c949b2c zebra: When installing a nexthop-group success is vital
When installing a nexthop-group the recent commit:
commit 0be6e7d75d

reversed the logic for testing if adding data to
the netlink message succeeded and we thought we did
not thus not creating the nexthop group.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-17 23:36:42 -04:00
Philippe Guibert
9b222c1f1a
Merge pull request #6577 from rtrlib/2020-06-12-master-fixes
bgpd: rpki fixes (master)
2020-06-17 09:09:02 +02:00
Mark Stapp
2be4d61a86 sharpd: add zclient session create and delete
Add a couple of clis and some simple support that allows sharpd to
create extra zapi client sessions.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-16 12:24:24 -04:00
Mark Stapp
0d55f01bf8
Merge pull request #6569 from xThaid/dplane_batching_cleanup
Clean up the zebra's Netlink API
2020-06-16 12:06:11 -04:00
David Lamparter
f3f2545103
Merge pull request #6581 from volta-networks/fix_frr_reload_daemon
tools: fix frr-reload.py daemon option
2020-06-16 17:45:54 +02:00
Russ White
cba183561b
Merge pull request #6390 from opensourcerouting/bfd-cp-fix
bfdd: tell peer when our control plane is dead
2020-06-16 07:56:03 -04:00
Russ White
26a7e0ceda
Merge pull request #6575 from mjstapp/fix_avoid_clang_add_fetch
zebra: avoid an atomic builtin that clang doesn't like
2020-06-16 07:53:06 -04:00
Russ White
bf23e55626
Merge pull request #6584 from donaldsharp/increase_timeout
bgpd: Allow extending peer timeout in rare case
2020-06-16 07:46:55 -04:00
Russ White
e7fd5c748e
Merge pull request #6585 from donaldsharp/fix_pbr_topo
tests: Modify pbr test to give a reasonable amount of time to succeed
2020-06-16 07:43:48 -04:00
Donald Sharp
36952a8218 tests: Modify pbr test to give a reasonable amount of time to succeed
Under heavy load some systems may still be processing.  Let's give
the system some time to figure out what is going wrong.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-15 16:59:38 -04:00
Donald Sharp
c0757e84ce
Merge pull request #6582 from streambinder/master
lib: prefix: add prefix_rd type
2020-06-15 12:32:24 -04:00
Marcel Röthke
bac31cb885 bgpd: fix rpki revalidation for invalid announcements
Announcements that are marked as invalid were previously not revalidated.
This was fixed by replacing the range lookup with a subtree lookup.

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2020-06-15 18:22:37 +02:00
Donald Sharp
d0874d195d bgpd: Allow extending peer timeout in rare case
Currently the I/O pthread handles incoming/outgoing data
communication with all peers.  There is no attempt at modifying
the hold timers.  It's sole goal is to read/write data to appropriate
channels.  All this data is handled as *events* on the master pthread
in BGP.   The problem is that if the master pthread is extremely busy
then any packet read that would be treated as a keepalive event may
happen after the hold timer pops, due to the way thread events are handled
in lib/thread.c.

In a last gap attempt, if we notice that we have incoming data
to proceses on the input Queue, slightly delay the hold timer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-15 10:35:50 -04:00
streambinder
132b6a9139 lib: prefix: add prefix_rd type
Signed-off-by: streambinder <posta@davidepucci.it>
2020-06-15 15:34:49 +02:00
Emanuele Di Pascale
7e7fedcb40 tools: fix frr-reload.py daemon option
the refactored frr-reload.py is adding 'no-header' to the
'show running' command of vtysh, but if a daemon is specified
the no-header option should only be added after the daemon name.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2020-06-15 14:58:22 +02:00
Sri Mohana Singamsetty
1a5fc72066
Merge pull request #6578 from ton31337/fix/constants
bgpd: Use constants for nexthop length instead of just numbers
2020-06-14 15:00:50 -07:00
Jakub Urbańczyk
a757997cab zebra: more clean-ups in netlink code
* Use nl_attr_add32 instead of nl_attr_add where it is possible.
 * Move common code from build_singlepath() and build_multipath()
   to separate function.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-06-13 22:56:25 +02:00
Jakub Urbańczyk
0be6e7d75d zebra: check for buffer boundary
* Move code encoding Netlink messages to separate functions
 * Add buffer bounds checking while creating Nelink messages

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-06-13 22:56:25 +02:00
Jakub Urbańczyk
312a6beed6 zebra: clean up netlink api
* Rename netlink utility functions like addattr to be less ambiguous
 * Replace rta_attr_* functions with nl_attr_* since they introduced
   inconsistencies in the code
 * Add helper functions for adding rtnexthop struct to the Netlink
   message

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-06-13 22:53:24 +02:00
Donatas Abraitis
3ddd699401 bgpd: Use constants for nexthop length instead of just numbers
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-06-13 20:36:59 +03:00
Marcel Röthke
a633498e0b bgpd: preinitialize rtrlib tr structures
The tr_*_config structs were previously not pre initialized because
every field is initialized explicitly. But future rtrlib version will
introduce additional fields. Preinitialising the entire struct will
ensure forward compatibility.

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2020-06-13 13:44:39 +02:00
Mark Stapp
e3d9208a09 zebra: avoid an atomic builtin that clang doesn't like
We had special-cased use of atomic_add_fetch, because clang just
does not like that builtin. Just use atomic_fetch_add instead.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-12 16:31:22 -04:00
Rafael Zalamena
a1e0142dce topotest: add tests for BFD profiles
Import a topology with some protocols that integrate with BFD. As other
daemons get the new BFD profile support we can update the test to cover
them.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-12 14:25:53 -03:00
Rafael Zalamena
6a6b103657 lib: permit BFD library users to pass NULL
Add the proper handling for cases where user forgets or doesn't have the
pointer needed to call the library function.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-12 14:25:53 -03:00
Donatas Abraitis
f8e30433f6
Merge pull request #6563 from donaldsharp/scale_tests
tests: Add some scale tests to ensure things work
2020-06-12 09:11:09 +03:00