]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agotests: Test if `ip` and `fqdn` are included in `show [ip] bgp json`
Donatas Abraitis [Fri, 6 Dec 2019 20:44:36 +0000 (22:44 +0200)]
tests: Test if `ip` and `fqdn` are included in `show [ip] bgp json`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Show `ip` and `fqdn` in json output for `show [ip] bgp <route> json`
Donatas Abraitis [Fri, 6 Dec 2019 20:03:50 +0000 (22:03 +0200)]
bgpd: Show `ip` and `fqdn` in json output for `show [ip] bgp <route> json`

This should keep backward compatibility when bgp show-hostname is
enabled/disabled.

Also show the real originator IP instead of showing fqdn of the route
reflector.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5472 from mjstapp/fix_dplane_prov_flags
Donatas Abraitis [Thu, 5 Dec 2019 12:03:35 +0000 (14:03 +0200)]
Merge pull request #5472 from mjstapp/fix_dplane_prov_flags

zebra: capture dplane plugin flags

4 years agoMerge pull request #5471 from sworleys/Doc-Sign-Off
Mark Stapp [Wed, 4 Dec 2019 19:56:58 +0000 (14:56 -0500)]
Merge pull request #5471 from sworleys/Doc-Sign-Off

doc: add doc for easy commit sign-off with `-s`

4 years agozebra: capture dplane plugin flags
Mark Stapp [Wed, 4 Dec 2019 19:54:38 +0000 (14:54 -0500)]
zebra: capture dplane plugin flags

The flags can be important - like "threaded" - so we need to
actually capture them when plugins are registered.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #5416 from mjstapp/re_nhe_pointer
Donald Sharp [Wed, 4 Dec 2019 19:11:04 +0000 (14:11 -0500)]
Merge pull request #5416 from mjstapp/re_nhe_pointer

lib,zebra: use shared nexthop-group in route_entry

4 years agodoc: add doc for easy commit sign-off with `-s`
Stephen Worley [Wed, 4 Dec 2019 16:27:30 +0000 (11:27 -0500)]
doc: add doc for easy commit sign-off with `-s`

Add some doc to let developers know about the `-s` flag
with `git commit`.

We were seeing some people writing the sign-off manually.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib,zebra: use nhg_hash_entry pointer in route_entry
Mark Stapp [Fri, 22 Nov 2019 20:30:53 +0000 (15:30 -0500)]
lib,zebra: use nhg_hash_entry pointer in route_entry

Replace the existing list of nexthops (via a nexthop_group
struct) in the route_entry with a direct pointer to zebra's
new shared group (from zebra_nhg.h). This allows more
direct access to that shared group and the info it carries.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #5352 from donaldsharp/5013_cleanup_merge_issues
Rafael Zalamena [Wed, 4 Dec 2019 12:28:41 +0000 (09:28 -0300)]
Merge pull request #5352 from donaldsharp/5013_cleanup_merge_issues

5013 cleanup merge issues

4 years agoMerge pull request #5341 from rbauduin/patch-1
Donatas Abraitis [Wed, 4 Dec 2019 11:56:42 +0000 (13:56 +0200)]
Merge pull request #5341 from rbauduin/patch-1

mention allow-outbound-policy for route reflectors

4 years agoMerge pull request #5430 from taruta811/build-docker-centos
Donatas Abraitis [Wed, 4 Dec 2019 11:42:12 +0000 (13:42 +0200)]
Merge pull request #5430 from taruta811/build-docker-centos

docker: Make docker image on CentOS 7

4 years agoMerge pull request #5305 from ton31337/feature/draft-ietf-idr-deprecate-as-set-confed-set
Donald Sharp [Wed, 4 Dec 2019 02:29:09 +0000 (21:29 -0500)]
Merge pull request #5305 from ton31337/feature/draft-ietf-idr-deprecate-as-set-confed-set

bgpd: Reject incoming and outgoing UPDATES for AS_SET and AS_CONFED_SET

4 years agobfdd: Json fields for multiplier
SumitAgarwal123 [Tue, 29 Oct 2019 05:25:34 +0000 (22:25 -0700)]
bfdd: Json fields for multiplier

Adding fields "detect-multiplier" and "remote-detect-multiplier"
for JSON to to reflect changes in "show bfd peers output"

Signed-off-by: Sayed Mohd Saquib sayed.saquib@broadcom.com
4 years agobfdd: Adding new CLI, show bfd peers brief
SumitAgarwal123 [Thu, 19 Sep 2019 07:35:17 +0000 (00:35 -0700)]
bfdd: Adding new CLI, show bfd peers brief

Added new CLI to display all BFD peer in brief format

Signed-off-by: Sayed Mohd Saquib <sayed.saquib@broadcom.com>
4 years agobfdd: Adding new cli, clear bfd counters
SumitAgarwal123 [Thu, 19 Sep 2019 07:20:31 +0000 (00:20 -0700)]
bfdd: Adding new cli, clear bfd counters

Adding new CLI clear bfd counters,
This CLI wil only reset Rx/Tx counters,
it will not reset session UP/DOWN and Zebra event count

Signed-off-by: Sayed Mohd Saquib <sayed.saquib@broadcom.com>
4 years agobfdd: Adding new fields to display show bfd peer
SumitAgarwal123 [Thu, 19 Sep 2019 07:02:17 +0000 (00:02 -0700)]
bfdd: Adding new fields to display show bfd peer

Adding 2 two new fields
1. Peer type, configured/dynamic
2. Detect multiplier

Signed-off-by: Sayed Mohd Saquib <sayed.saquib@broadcom.com>
4 years agoMerge pull request #5442 from opensourcerouting/mpls-label-stacks
Russ White [Tue, 3 Dec 2019 16:25:53 +0000 (11:25 -0500)]
Merge pull request #5442 from opensourcerouting/mpls-label-stacks

zebra: support LSPs with multiple outgoing labels

4 years agobgpd: Autocomplete neighbor for clear bgp (#5434)
David Lamparter [Tue, 3 Dec 2019 16:13:21 +0000 (17:13 +0100)]
bgpd: Autocomplete neighbor for clear bgp (#5434)

bgpd: Autocomplete neighbor for clear bgp

4 years agoMerge pull request #5192 from donaldsharp/zebra_rejection
Donatas Abraitis [Tue, 3 Dec 2019 07:29:50 +0000 (09:29 +0200)]
Merge pull request #5192 from donaldsharp/zebra_rejection

zebra: Dissallow a /32 or /128 through itself

4 years agoMerge pull request #5432 from chiragshah6/evpn_dev2
Sri Mohana Singamsetty [Tue, 3 Dec 2019 01:17:26 +0000 (17:17 -0800)]
Merge pull request #5432 from chiragshah6/evpn_dev2

bgpd: Handle possible non-selection of local route

4 years agoMerge pull request #5450 from donaldsharp/rpki_node_issues
Sri Mohana Singamsetty [Tue, 3 Dec 2019 01:15:35 +0000 (17:15 -0800)]
Merge pull request #5450 from donaldsharp/rpki_node_issues

bgpd: Prevent crash in bgp_table_range_lookup

4 years agoMerge pull request #5444 from opensourcerouting/show-candidate-fix
Donald Sharp [Mon, 2 Dec 2019 16:26:33 +0000 (11:26 -0500)]
Merge pull request #5444 from opensourcerouting/show-candidate-fix

lib: fix display of candidate configurations

4 years agoMerge pull request #5389 from opensourcerouting/constify
Donald Sharp [Mon, 2 Dec 2019 16:26:11 +0000 (11:26 -0500)]
Merge pull request #5389 from opensourcerouting/constify

*: constify ALL the things

4 years agobgpd: Prevent crash in bgp_table_range_lookup
Donald Sharp [Mon, 2 Dec 2019 14:37:47 +0000 (09:37 -0500)]
bgpd: Prevent crash in bgp_table_range_lookup

The function bgp_table_range_lookup attempts to walk down
the table node data structures to find a list of matching
nodes.  We need to guard against the current node from
not matching and not having anything in the child nodes.
Add a bit of code to guard against this.

Traceback that lead me down this path:

Nov 24 12:22:38 frr bgpd[20257]: Received signal 11 at 1574616158 (si_addr 0x2, PC 0x46cdc3); aborting...
Nov 24 12:22:38 frr bgpd[20257]: Backtrace for 11 stack frames:
Nov 24 12:22:38 frr bgpd[20257]: /lib64/libfrr.so.0(zlog_backtrace_sigsafe+0x67) [0x7fd1ad445957]
Nov 24 12:22:38 frr bgpd[20257]: /lib64/libfrr.so.0(zlog_signal+0x113) [0x7fd1ad445db3]1ad445957]
Nov 24 12:22:38 frr bgpd[20257]: /lib64/libfrr.so.0(+0x70e65) [0x7fd1ad465e65]ad445db3]1ad445957]
Nov 24 12:22:38 frr bgpd[20257]: /lib64/libpthread.so.0(+0xf5f0) [0x7fd1abd605f0]45db3]1ad445957]
Nov 24 12:22:38 frr bgpd[20257]: /usr/lib/frr/bgpd(bgp_table_range_lookup+0x63) [0x46cdc3]445957]
Nov 24 12:22:38 frr bgpd[20257]: /usr/lib64/frr/modules/bgpd_rpki.so(+0x4f0d) [0x7fd1a934ff0d]57]
Nov 24 12:22:38 frr bgpd[20257]: /lib64/libfrr.so.0(thread_call+0x60) [0x7fd1ad4736e0]934ff0d]57]
Nov 24 12:22:38 frr bgpd[20257]: /lib64/libfrr.so.0(frr_run+0x128) [0x7fd1ad443ab8]e0]934ff0d]57]
Nov 24 12:22:38 frr bgpd[20257]: /usr/lib/frr/bgpd(main+0x2e3) [0x41c043]1ad443ab8]e0]934ff0d]57]
Nov 24 12:22:38 frr bgpd[20257]: /lib64/libc.so.6(__libc_start_main+0xf5) [0x7fd1ab9a5505]f0d]57]
Nov 24 12:22:38 frr bgpd[20257]: /usr/lib/frr/bgpd() [0x41d9bb]main+0xf5) [0x7fd1ab9a5505]f0d]57]
Nov 24 12:22:38 frr bgpd[20257]: in thread bgpd_sync_callback scheduled from bgpd/bgp_rpki.c:351#012; aborting...
Nov 24 12:22:38 frr watchfrr[6779]: [EC 268435457] bgpd state -> down : read returned EOF
Nov 24 12:22:38 frr zebra[5952]: [EC 4043309116] Client 'bgp' encountered an error and is shutting down.
Nov 24 12:22:38 frr zebra[5952]: zebra/zebra_ptm.c:1345 failed to find process pid registration
Nov 24 12:22:38 frr zebra[5952]: client 15 disconnected. 0 bgp routes removed from the rib

I am not really 100% sure what we are really trying to do with this function, but we must
guard against child nodes not having any data.

Fixes: #5440
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years ago*: generously apply const
David Lamparter [Wed, 20 Nov 2019 16:26:59 +0000 (17:26 +0100)]
*: generously apply const

const const const your boat, merrily down the stream...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #5446 from donaldsharp/bgp_json_mem_leak
Jafar Al-Gharaibeh [Sun, 1 Dec 2019 19:39:14 +0000 (12:39 -0700)]
Merge pull request #5446 from donaldsharp/bgp_json_mem_leak

bgpd: Fix memory leak in json output of show commands

4 years agodoc: mention allow-outbound-policy for route reflectors
rbauduin [Thu, 14 Nov 2019 07:27:14 +0000 (08:27 +0100)]
doc: mention allow-outbound-policy for route reflectors

Signed-off-by: Raphael Bauduin <rb@raphinou.com>
4 years agobgpd: Fix memory leak in json output of show commands
Donald Sharp [Sun, 1 Dec 2019 14:29:32 +0000 (09:29 -0500)]
bgpd: Fix memory leak in json output of show commands

When dumping a large bit of table data via bgp_show_table
and if there is no information to display for a particular
`struct bgp_node *` the data allocated via json_object_new_array()
is leaked.  Not a big deal on small tables but if you have a full
bgp feed and issue a show command that does not match any of
the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`)
then we will leak memory.

Before code change and issuing the above show bgp large-community-list command 15-20 times:
Memory statistics for bgpd:
System allocator statistics:
  Total heap allocated:  > 2GB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  > 2GB
  Free small blocks:     31 MiB
  Free ordinary blocks:  616 KiB
  Ordinary blocks:       0
  Small blocks:          0
  Holding blocks:        0

After:

Memory statistics for bgpd:
System allocator statistics:
  Total heap allocated:  924 MiB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  558 MiB
  Free small blocks:     26 MiB
  Free ordinary blocks:  340 MiB
  Ordinary blocks:       0
  Small blocks:          0
  Holding blocks:        0

Please note the 340mb of free ordinary blocks is from the fact I issued a
`show bgp ipv4 uni json` command and generated a large amount of data.

Fixes: #5445
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: fix display of candidate configurations
Renato Westphal [Thu, 7 Nov 2019 16:20:06 +0000 (13:20 -0300)]
lib: fix display of candidate configurations

Commit 5e6a9350c16 implemented an optimization where candidate
configurations are validated only before being displayed. The
validation is done only to create default child nodes (due to
how libyang works) and any possible error is ignored (candidate
configurations can be invalid/incomplete).

The problem is that we were calling lyd_validate() only when the
CLI "with-defaults" option was used. But some cli_show() callbacks
assume that default nodes exist and can crash when displaying a
candidate configuration that isn't validated. To fix this, call
lyd_validate() before displaying candidate configuration even when
"with-defaults" is not used (that was a micro-optimization that
shouldn't have been done).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years ago*: make frr_yang_module_info const
David Lamparter [Wed, 20 Nov 2019 16:23:04 +0000 (17:23 +0100)]
*: make frr_yang_module_info const

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years ago*: make all route_map_rule_cmd const
David Lamparter [Wed, 20 Nov 2019 16:20:58 +0000 (17:20 +0100)]
*: make all route_map_rule_cmd const

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: make cmd_element & qobj_type const
David Lamparter [Thu, 14 Nov 2019 22:27:29 +0000 (23:27 +0100)]
lib: make cmd_element & qobj_type const

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: gcc 4.x workaround v2 for frr_interface_info
David Lamparter [Fri, 29 Nov 2019 23:36:45 +0000 (00:36 +0100)]
lib: gcc 4.x workaround v2 for frr_interface_info

The previous workaround only works for -O0, at higher optimization
levels gcc reorders the statements in the file global scope which breaks
the asm statement :(.

Fixes: #4563
Fixes: #5074
Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agozebra: support LSPs with multiple outgoing labels
Renato Westphal [Fri, 29 Nov 2019 14:50:07 +0000 (11:50 -0300)]
zebra: support LSPs with multiple outgoing labels

For SR-TE we'll need to create Binding-SIDs which are essentially
LSPs that can push multiple outgoing labels. This commit sets the
groundwork for that. Luckily the netlink code didn't need to be
changed since it already supports pushing label stacks.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agobgpd: Autocomplete neighbor for clear bgp
Donatas Abraitis [Wed, 27 Nov 2019 19:44:46 +0000 (21:44 +0200)]
bgpd: Autocomplete neighbor for clear bgp

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5409 from qlyoung/bgpd-lcom-ecom-parse-fixes
David Lamparter [Wed, 27 Nov 2019 17:35:03 +0000 (18:35 +0100)]
Merge pull request #5409 from qlyoung/bgpd-lcom-ecom-parse-fixes

bgp large & extended community parse fixes

4 years agoMerge pull request #5435 from opensourcerouting/gcc4-vla-size
Quentin Young [Wed, 27 Nov 2019 16:25:43 +0000 (11:25 -0500)]
Merge pull request #5435 from opensourcerouting/gcc4-vla-size

lib: add gcc 4.x workaround for frr_interface_info

4 years agoMerge pull request #5437 from ton31337/fix/replace_magic_number_to_readable
Russ White [Wed, 27 Nov 2019 12:18:21 +0000 (07:18 -0500)]
Merge pull request #5437 from ton31337/fix/replace_magic_number_to_readable

bgpd: Replace magic number 1 for TTL to BGP_DEFAULT_TTL

4 years agoMerge pull request #5356 from v00lk/master
Donatas Abraitis [Wed, 27 Nov 2019 08:54:25 +0000 (10:54 +0200)]
Merge pull request #5356 from v00lk/master

bgpd: IPv4 LU withdraw using 0x000000 label

4 years agobgpd: Replace magic number 1 for TTL to BGP_DEFAULT_TTL
Donatas Abraitis [Wed, 27 Nov 2019 08:48:17 +0000 (10:48 +0200)]
bgpd: Replace magic number 1 for TTL to BGP_DEFAULT_TTL

For readability and maintainability purposes.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5419 from adharkar/frr-master-nh_connected
Donatas Abraitis [Wed, 27 Nov 2019 08:37:11 +0000 (10:37 +0200)]
Merge pull request #5419 from adharkar/frr-master-nh_connected

bgpd: Do not perform "connected" check for EVPN nexthop

4 years agoMerge pull request #5284 from sworleys/PBR-Add-NH-Table-2
Philippe Guibert [Tue, 26 Nov 2019 20:18:49 +0000 (21:18 +0100)]
Merge pull request #5284 from sworleys/PBR-Add-NH-Table-2

pbrd: Add `set vrf NAME` and `set vrf unchanged`

4 years agodocker: Make docker image on CentOS 7
Toshiki Tsuchiya [Sun, 24 Nov 2019 20:28:54 +0000 (20:28 +0000)]
docker: Make docker image on CentOS 7

- Build rpm package from source on CentOS 7
- Use multi-stage builds to reduce docker image size

Signed-off-by: Toshiki Tsuchiya <taruta0811@gmail.com>
4 years agoMerge pull request #4977 from chiragshah6/evpn_dev1
Philippe Guibert [Tue, 26 Nov 2019 16:56:59 +0000 (17:56 +0100)]
Merge pull request #4977 from chiragshah6/evpn_dev1

* evpn primary address advertisement

4 years agoMerge pull request #5415 from dslicenc/ipv6-ra-fast-retrans
Russ White [Tue, 26 Nov 2019 16:37:20 +0000 (11:37 -0500)]
Merge pull request #5415 from dslicenc/ipv6-ra-fast-retrans

zebra: knob to make ra retransmit interval rfc compliant

4 years agolib: add gcc 4.x workaround for frr_interface_info
David Lamparter [Tue, 26 Nov 2019 16:05:47 +0000 (17:05 +0100)]
lib: add gcc 4.x workaround for frr_interface_info

gcc 4.x does not properly support structs with variable length array
members.  Specifically, for global variables, it completely ignores the
array, coming up with a size much smaller than what is correct.  This is
broken for both sizeof() as well as ELF object size.

This breaks for frr_interface_info since this variable is in some cases
copy relocated by the linker.  (The linker does this to make the address
of the variable a "constant" for the main program.)  This copying uses
the ELF object size, thereby copying only the non-array part of the
struct.

Breakage ensues...

(This fix is a bit ugly, but it's limited to very old gcc, and it's
better than changing the array to "nodes[1000]" and wasting memory...)

Fixes: #4563
Fixes: #5074
Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #5408 from donaldsharp/scan7
Russ White [Tue, 26 Nov 2019 14:48:20 +0000 (09:48 -0500)]
Merge pull request #5408 from donaldsharp/scan7

Scan7

4 years agoMerge pull request #5407 from lkrishnamoor/evpn_vni_json
Donatas Abraitis [Tue, 26 Nov 2019 06:49:54 +0000 (08:49 +0200)]
Merge pull request #5407 from lkrishnamoor/evpn_vni_json

zebra: "show evpn vni details json" prints incorrect JSON format

4 years agobgpd: Handle possible non-selection of local route
Chirag Shah [Mon, 25 Nov 2019 22:34:29 +0000 (14:34 -0800)]
bgpd: Handle possible non-selection of local route

In rare situations, the local route in a VNI may not get selected as the
best route. One situation is during a race between bgp and zebra which
was addressed in a prior commit. This change addresses another situation
where due to a change of tunnel IP, it is possible that a received route
may be selected as the best route if the path selection needs to take
next hop IPs into consideration. This is a pretty convoluted scenario,
but the code should handle it and delete and withdraw the local route
as well as (re)install the received route.

Ticket: CM-24114
Reviewed By: CCR-9487
Testing Done:
1. Manual tests - note, problem is not readily reproducible
2. evpn-smoke - results documented in the ticket

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoMerge pull request #5420 from donaldsharp/zebra_client_summ_spacing
Donatas Abraitis [Mon, 25 Nov 2019 12:49:05 +0000 (14:49 +0200)]
Merge pull request #5420 from donaldsharp/zebra_client_summ_spacing

Zebra client summ spacing

4 years agoMerge pull request #5423 from qlyoung/fix-bgp-addpath-bad-boundscheck
Donatas Abraitis [Mon, 25 Nov 2019 12:46:35 +0000 (14:46 +0200)]
Merge pull request #5423 from qlyoung/fix-bgp-addpath-bad-boundscheck

bgpd: fix bad bounds check for addpath in nlri

4 years agobgpd: fix bad bounds check for addpath in nlri
Quentin Young [Sun, 24 Nov 2019 07:02:54 +0000 (02:02 -0500)]
bgpd: fix bad bounds check for addpath in nlri

If a peer advertised capability addpath in their OPEN, but sent us an
UPDATE without an ADDPATH, we overflow a heap buffer.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agozebra: Fix `show ip nexthop route-map` and `show ip protocol`
Donald Sharp [Sat, 23 Nov 2019 01:14:21 +0000 (20:14 -0500)]
zebra: Fix `show ip nexthop route-map` and `show ip protocol`

These commands were not properly lining up in their columns.
Fix this.

After:
VRF: default
Protocol                  : route-map
-------------------------------------
bgp                       : NO_INSTALL
vnc-direct                : none
vnc-rn                    : none
bgp-direct                : none
bgp-direct-to-nve-groups  : none

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Fix `show zebra client` display to handle columns right
Donald Sharp [Sat, 23 Nov 2019 00:59:40 +0000 (19:59 -0500)]
zebra: Fix `show zebra client` display to handle columns right

Before:
Type        Add        Update     Del
==================================================
IPv4        11539033    272         10751107
IPv6        1122106     43          1047081

After:

Type        Add         Update      Del
==================================================
IPv4        10517740    64          9729917
IPv6        1016590     8           941567

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Adjust column display of `show zebra client summ` for openfabric
Donald Sharp [Sat, 23 Nov 2019 00:29:55 +0000 (19:29 -0500)]
zebra: Adjust column display of `show zebra client summ` for openfabric

The openfabric daemon has a longer name than anticipated for
`show zebra client summary` adjust to allow it to fit without
making columns all blomped.

Before:
robot# show zebra client summ
Name      Connect Time    Last Read  Last Write  IPv4 Routes       IPv6 Routes
--------------------------------------------------------------------------------
static        00:00:06     00:00:06    00:00:06       4/0              0/0
openfabric      00:00:06     00:00:06    00:00:06       0/0              0/0

After:

[sharpd@robot frr4]$ vtysh -c "show zebra client summ"
Name      Connect Time    Last Read  Last Write  IPv4 Routes       IPv6 Routes
--------------------------------------------------------------------------------
static        00:02:16     00:02:16    00:02:16       4/0              0/0
openfabric    00:02:16     00:02:16    00:02:16       0/0              0/0

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Do not perform "connected" check for EVPN nexthop
Ameya Dharkar [Fri, 22 Nov 2019 23:48:37 +0000 (15:48 -0800)]
bgpd: Do not perform "connected" check for EVPN nexthop

This changeset follows the PR
https://github.com/FRRouting/frr/pull/5334

Above PR adds nexthop tracking support for EVPN RT-5 nexthops.
This route is marked VALID only if the BGP route has a valid nexthop.

If the EVPN peer is an EBGP pee and "disable_connected_check" flag is not set,
"connected" check is performed for the EVPN nexthop.
But, usually EVPN nexthop is not the BGP peering address, but the VTEP address.
Also, NEXTHOP_UNCHANGED flag is enabled by default for EVPN.
As a result, in a common deployment for EVPN, EVPN nexthop is not connected.

Thus, adding a fix to remove the "connected" check for EVPN nexthops.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
4 years agozebra: knob to make ra retransmit interval rfc compliant
Don Slice [Fri, 22 Nov 2019 17:31:29 +0000 (17:31 +0000)]
zebra: knob to make ra retransmit interval rfc compliant

Problem reported by testing facility that our sending of Router
Advertisements more frequently than once very three seconds is not
compliant with rfc4861. Added a knob to turn off fast retransmits
in order to meet the requirement of the RFC.

Ticket: CM-27063
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agoMerge pull request #5413 from donaldsharp/eigrp_cleanup1
Mark Stapp [Fri, 22 Nov 2019 17:36:50 +0000 (12:36 -0500)]
Merge pull request #5413 from donaldsharp/eigrp_cleanup1

Eigrp cleanup1

4 years agolib: add some nexthop ctors
Mark Stapp [Fri, 22 Nov 2019 16:10:42 +0000 (11:10 -0500)]
lib: add some nexthop ctors

Add some apis that allocate and init nexthop objects
from various kinds of arguments: ip addrs, interfaces,
blackhole types.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agobgpd: adv pip to throw warning under default vrf
Chirag Shah [Mon, 28 Oct 2019 22:05:05 +0000 (15:05 -0700)]
bgpd: adv pip to throw warning under default vrf

Instead of CMD_WARNING, use CMD_WARNING_CONFIG_FAILED
for any mis-configuration scenario.

Testing Done:

TOR(config)# router bgp 5548
TOR(config-router)# address-family l2vpn evpn
TOR(config-router-af)# no advertise-pip
This command is supported under L3VNI BGP EVPN VRF

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agobgpd: adv pip update type-5 with correct rmac
Chirag Shah [Fri, 25 Oct 2019 22:27:47 +0000 (15:27 -0700)]
bgpd: adv pip update type-5 with correct rmac

when a pip is disabled or mac-vlan is not present
use anycast MAC as RMAC value.

Ticket:CM-26923
Reviewed By:CCR-9417
Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agozebra: display proper field in debug statement
Chirag Shah [Tue, 15 Oct 2019 18:26:32 +0000 (11:26 -0700)]
zebra: display proper field in debug statement

Ticket:CM-26622

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agozebra: handle macvlan down event
Chirag Shah [Fri, 11 Oct 2019 18:42:12 +0000 (11:42 -0700)]
zebra: handle macvlan down event

Macvlan down event have sentinel check of its parent
link presence.

Ticket:CM-26622
Reviewed By:CCR-9326
Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agobgpd: fix self type-2 routes rmac and nexhtop
Chirag Shah [Thu, 24 Oct 2019 21:32:49 +0000 (14:32 -0700)]
bgpd: fix self type-2 routes rmac and nexhtop

For self type-2 routes, do not assign system-rmac
as attribute RMAC value if advertise-pip is disable
or macvlan is not present.

Ticket:CM-26923
Reviewed By:CCR-9397
Testing Done:

pip is disabled under bgp vrf2 instance.
Trigger frr-restart.

Before fix:
*> [2]:[0]:[48]:[00:02:00:00:00:2e]:[32]:[45.0.4.4]
                    36.0.0.11                          32768 i
                    ET:8 RT:5546:1004 RT:5546:4002 Rmac:00:02:00:00:00:2e

After fix:
*> [2]:[0]:[48]:[00:02:00:00:00:2e]:[32]:[45.0.4.4]
                    36.0.0.11                          32768 i
                    ET:8 RT:5546:1004 RT:5546:4002 Rmac:44:38:39:ff:ff:01

TOR# ifquery vlan1004
auto vlan1004
iface vlan1004
        address 45.0.4.4/24
        vlan-id 1004
        vrf vrf2

VNI: 4002 (known to the kernel)
  Type: L3
  Tenant VRF: vrf2
  RD: 45.0.6.4:3
  Originator IP: 36.0.0.11
  Advertise-pip: Yes
  System-IP: 27.0.0.11
  System-MAC: 00:02:00:00:00:2e
  Router-MAC: 44:38:39:ff:ff:01

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agobgpd: evpn pip convert ntoa to ntop
Chirag Shah [Mon, 11 Nov 2019 22:59:08 +0000 (14:59 -0800)]
bgpd: evpn pip convert ntoa to ntop

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agozebra: print rmac and sys mac values
Chirag Shah [Tue, 15 Oct 2019 00:46:10 +0000 (17:46 -0700)]
zebra: print rmac and sys mac values

"show vrf vni" and "show evpn vni <l3vni>" commands
need to display correct router mac value.

"show evpn vni <l3vni>" detail l3vni needs to display
system mac as in PIP scenario value can be different.
Syste MAC would be derived from SVI interface MAC wherelse
Router MAC would be derived from macvlan interface MAC value.

Ticket:CM-26710
Reviewed By:CCR-9334
Testing Done:

TORC11# show evpn vni 4001
VNI: 4001
  Type: L3
  Tenant VRF: vrf1
  Local Vtep Ip: 36.0.0.11
  Vxlan-Intf: vx-4001
  SVI-If: vlan4001
  State: Up
  VNI Filter: none
  System MAC: 00:02:00:00:00:2e
  Router MAC: 44:38:39:ff:ff:01
  L2 VNIs: 1000
TORC11# show vrf vni
VRF     VNI    VxLAN IF   L3-SVI    State Rmac
vrf1    4001   vx-4001    vlan4001  Up    44:38:39:ff:ff:01

TORC11# show evpn vni 4001 json
{
  "vni":4001,
  "type":"L3",
  "localVtepIp":"36.0.0.11",
  "vxlanIntf":"vx-4001",
  "sviIntf":"vlan4001",
  "state":"Up",
  "vrf":"vrf1",
  "sysMac":"00:02:00:00:00:2e",
  "routerMac":"44:38:39:ff:ff:01",
  "vniFilter":"none",
  "l2Vnis":[
    1000,
  ]
}

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agodoc: evpn pip add documentation
Chirag Shah [Mon, 23 Sep 2019 00:46:46 +0000 (17:46 -0700)]
doc: evpn pip add documentation

Ticket:CM-26190
Reviewed By:
Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulusntworks.com>
4 years agobgpd: evpn pip display pip values
Chirag Shah [Wed, 11 Sep 2019 01:36:05 +0000 (18:36 -0700)]
bgpd: evpn pip display pip values

Display pip system mac and ip values
in per vni detail output.

Ticket:CM-26190
Reviewed By:
Testing Done:

Following new values add to the below output
for L3vni:

  System-IP: 27.0.0.11
  System-MAC: 00:02:00:00:00:2e
  Router-MAC: 44:38:39:ff:ff:01

TORC11# show bgp l2vpn evpn vni 4002
VNI: 4002 (known to the kernel)
  Type: L3
  Tenant VRF: vrf2
  RD: 141.2.1.2:2
  Originator IP: 36.0.0.11
  Advertise-gw-macip : n/a
  Advertise-pip: Yes
  System-IP: 27.0.0.11
  System-MAC: 00:02:00:00:00:2e
  Router-MAC: 44:38:39:ff:ff:01
  Import Route Target:
    5546:4002
  Export Route Target:
    5546:4002

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agozebra: evpn pip mac vlan up-down event
Chirag Shah [Fri, 6 Sep 2019 20:55:35 +0000 (13:55 -0700)]
zebra: evpn pip mac vlan up-down event

macvlan interface up/down event triggers
bgp to send updates for evpn routes
with changed RMAC and nexthop IP values.

Ticket:CM-26190
Reviewed By:
Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agobgpd: evpn pip handle svi ip route
Chirag Shah [Fri, 9 Aug 2019 01:58:03 +0000 (18:58 -0700)]
bgpd: evpn pip handle svi ip route

By default announct Self Type-2 routes with
system IP as nexthop and system MAC as
nexthop.

An API to check type-2 is self route via
checking ipv4/ipv6 address from connected interfaces list.

An API to extract RMAC and nexthop for type-2
routes based on advertise-svi-ip knob is enabled.

When advertise-pip is enabled/disabled, trigger type-2
route update. For self type-2 routes to use
anycast or individual (rmac, nexthop) addresses.

Ticket:CM-26190
Reviewed By:
Testing Done:

Enable 'advertise-svi-ip' knob in bgp default instance.
the vrf instance svi ip is advertised with nexthop
as default instance router-id and RMAC as system MAC.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agobgpd: evpn pip parse vrr mac
Chirag Shah [Sun, 4 Aug 2019 23:51:33 +0000 (16:51 -0700)]
bgpd: evpn pip parse vrr mac

In L3VNI add callback parse, vrr rmac value.

For non-zero vrr mac value, use it as anycast RMAC
and svi mac as individual rmac value.

If advertise-pip is disable or vrr rmac is not present
use svi mac as anycast rmac value for all routes.

Ticket:CM-26190
Reviewed By:
Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agozebra: evpn pip extract vrr mac
Chirag Shah [Fri, 2 Aug 2019 06:33:24 +0000 (23:33 -0700)]
zebra: evpn pip extract vrr mac

Extract mac-vlan interface mac when a l3vni add is sent to bgp

Per L3VNI maintain vrr interface.
An api to extract vrr mac address from a vlan id, associated
master svi device.

When a l3vni operational up event is sent to bgpd,
extract vrr rmac along with svi rmac.

Ticket:CM-26190
Reviewed By:
Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agobgpd: evpn pip data struct and cli
Chirag Shah [Thu, 18 Apr 2019 07:17:57 +0000 (10:17 +0300)]
bgpd: evpn pip data struct and cli

Evpn Primary IP advertisement feature uses
individual system IP and system MAC for prefix (type-5)
and self type-2 routes.

The PIP knob is enabled by default for bgp vrf instance.

Configuration CLI for enable/disable PIP feature knob.
User can configure PIP system IP and MAC to retain as
permanent values.

For the PIP IP, the default behavior is to accept bgp default
instance's router-id. When the default instance router-id change,
reflect PIP IP assignment.

Reflect type-5 to use system-IP and system MAC as nexthop and RMAC
values.

Ticket:CM-26190

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoMerge pull request #5406 from lkrishnamoor/advertise-routes-bug2
Donatas Abraitis [Fri, 22 Nov 2019 14:09:22 +0000 (16:09 +0200)]
Merge pull request #5406 from lkrishnamoor/advertise-routes-bug2

bgpd: Blank RD in "sh bgp l2vpn evpn all neighbors ip advertised-routes json"

4 years agoMerge pull request #5328 from satheeshkarra/pim_mlag
Mark Stapp [Fri, 22 Nov 2019 13:51:47 +0000 (08:51 -0500)]
Merge pull request #5328 from satheeshkarra/pim_mlag

pimd, lib, zebra : PIM MLAG Support

4 years agoeigrpd: Cleanup address dump functions to be a bit smarter
Donald Sharp [Fri, 22 Nov 2019 13:17:27 +0000 (08:17 -0500)]
eigrpd: Cleanup address dump functions to be a bit smarter

The address dump functionality needed to be written a bit
better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Cleanup eigrp_if_name_string
Donald Sharp [Fri, 22 Nov 2019 13:03:25 +0000 (08:03 -0500)]
eigrpd: Cleanup eigrp_if_name_string

This function was excessively complicated.  Simplify and
make everyone use the same access macro.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5405 from sworleys/NHG-Respect-MPATH-Num
Mark Stapp [Fri, 22 Nov 2019 12:22:29 +0000 (07:22 -0500)]
Merge pull request #5405 from sworleys/NHG-Respect-MPATH-Num

zebra: Actually respect the multipath number

4 years agoMerge pull request #5404 from donaldsharp/bsd_null_routes
Rafael Zalamena [Fri, 22 Nov 2019 11:41:30 +0000 (08:41 -0300)]
Merge pull request #5404 from donaldsharp/bsd_null_routes

zebra: BSD null routes were not being installed

4 years agobgpd: fix heap buffer overflow in lcom -> str enc
Quentin Young [Thu, 21 Nov 2019 23:55:59 +0000 (18:55 -0500)]
bgpd: fix heap buffer overflow in lcom -> str enc

Spaces were not being accounted for in the heap buffer sizing, leading
to a heap buffer overflow when encoding large communities to their
string representations.

This patch also uses safer functions to do the encoding instead of
pointer math.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agobgpd: use safe functions to work with ecom attrs
Quentin Young [Fri, 22 Nov 2019 00:01:55 +0000 (19:01 -0500)]
bgpd: use safe functions to work with ecom attrs

Tons of insane just-so pointer math here where it is not needed. This is
too smart. Use safer methods.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agozebra: Fixing Comments in MLAG Read scheduling Events
Satheesh Kumar K [Fri, 22 Nov 2019 04:33:42 +0000 (20:33 -0800)]
zebra: Fixing Comments in MLAG Read scheduling Events

Zebra MLAG is using "t_read" for multiple tasks, such as

1. For opening Communication channel with MLAG
2. In case conncetion fails, same event is used for retries
3. after the connection establishment, same event is used to
   read the data from MLAG

since all these taks will never schedule together, this will not
cause any issues.

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
4 years agobgpd: Prevent possible SA thinking we'll divide by zero
Donald Sharp [Fri, 22 Nov 2019 00:41:48 +0000 (19:41 -0500)]
bgpd: Prevent possible SA thinking we'll divide by zero

The half and reuse variables can never be 1 but the
SA systems we have do not know this and think it is possible.
Provide the kick in the snarples that the SA needs to know
this is not true.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: "show evpn vni details json" prints incorrect JSON format
Lakshman Krishnamoorthy [Fri, 22 Nov 2019 00:18:04 +0000 (16:18 -0800)]
zebra: "show evpn vni details json" prints incorrect JSON format

edge-2> show evpn vni detail json
{
  "vni":79031,
  "type":"L3",
  ...,
  ...
}                                       <<<<<< no comma

{
  "vni":79021,
  "type":"L3",
  ...,
  ...
}                                       <<<<<< no comma

{
}                                       <<<<<< blank
edge-2>

The fix is to pack json info into json_array before printing it.

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
4 years agobgpd: remove extra ecom attr ptr increment
Quentin Young [Fri, 22 Nov 2019 00:00:11 +0000 (19:00 -0500)]
bgpd: remove extra ecom attr ptr increment

Copy paste leads to invalid read of 1 byte off the heap when converting
extended community attributes into strings.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoospfd: nbr->oi is never null
Donald Sharp [Thu, 21 Nov 2019 23:47:13 +0000 (18:47 -0500)]
ospfd: nbr->oi is never null

We test nbr->oi in a couple of places for null, but
in the majority of places of the nbr->oi data is being
used we just access it.  Touch up code to trust this
assertion and make the code more consistent in others.

Found in Coverity.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Blank RD in "sh bgp l2vpn evpn all neighbors <ip> advertised-routes json"
Lakshman Krishnamoorthy [Thu, 21 Nov 2019 23:30:00 +0000 (15:30 -0800)]
bgpd: Blank RD in "sh bgp l2vpn evpn all neighbors <ip> advertised-routes json"

Bug: While preparing the JSON output, 2 loops are traversed: the outer loop
loops through RD, and the inner loop loops through the prefixes of that RD.

We hit the bug (printing blank RD and stale or null prefix info) when the inner
loop exits with nothing to print, (without allocating json_routes) and the outer
loop still tries to attach it to the parent, json_adv. Thus, we have
key=<BLANK RD>, value=<junk or prev json_routes>

The fix: Avoid attaching json_routes to the parent json if there
is nothing to print.

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
4 years agopbrd: Add `set vrf NAME` and `set vrf unchanged`
Stephen Worley [Fri, 27 Sep 2019 20:38:31 +0000 (16:38 -0400)]
pbrd: Add `set vrf NAME` and `set vrf unchanged`

`set vrf NAME` allows the pbr map to point to an arbitrary vrf table.

`set vrf unchanged` will use the interface's vrf for table lookup.

Further, add functionality for pbr to respond to interface events
such as interface vrf changes & interface creation/deletion.

Ex)
ubuntu_nh# show pbr map
  pbr-map TEST valid: 1
    Seq: 1 rule: 300 Installed: 3(1) Reason: Valid
        SRC Match: 3.3.3.3/32
        VRF Unchanged (use interface vrf)
  pbr-map TEST2 valid: 1
    Seq: 2 rule: 301 Installed: 3(2) Reason: Valid
        SRC Match: 4.4.4.4/32
        VRF Lookup: vrf-red

root@ubuntu_nh:/home# ip rule show
0:      from all lookup local
300:    from 3.3.3.3 iif dummy2 lookup main
300:    from 3.3.3.3 iif dummyVRF lookup 1111
301:    from 4.4.4.4 iif dummy1 lookup 1111
301:    from 4.4.4.4 iif dummy3 lookup 1111

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com-
4 years agozebra: Set resolved inactive when > multipath_num
Stephen Worley [Thu, 21 Nov 2019 20:53:59 +0000 (15:53 -0500)]
zebra: Set resolved inactive when > multipath_num

Apparently the multipath_num functionatlity has been broken
for a while because we were ignoring the recusive nexthops
when marking them inactive based on it.

This sets them as inactive as well if the parent breaks it.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: Use curr_active to check multipath_num
Stephen Worley [Thu, 21 Nov 2019 20:27:12 +0000 (15:27 -0500)]
zebra: Use curr_active to check multipath_num

We were re-counting the entire group's active number on
every iteration of this nexthop_active_update() loop.

This is not great from a performance perspective but also
it was failing to properly mark things according to the
specified multipath_num.

Since a nexthop is set as active before this check, if its == to
the set ecmp, it gets marked inactive even though if its
under the max ecmp wanted!

ex)

set ecmp to 1.
`/usr/lib/frr/zebra -e 1`

All kernel routes will be marked inactive even with just one nexthop!

K   1.1.1.1/32 [0/0] is directly connected, dummy1 inactive, 00:00:10
K   1.1.1.2/32 [0/0] is directly connected, dummy2 inactive, 00:00:10
K   1.1.1.3/32 [0/0] is directly connected, dummy3 inactive, 00:00:10
K   1.1.1.4/32 [0/0] is directly connected, dummy4 inactive, 00:00:10
K   1.1.1.5/32 [0/0] is directly connected, dummy5 inactive, 00:00:10
K   1.1.1.6/32 [0/0] is directly connected, dummy6 inactive, 00:00:10
K   1.1.1.7/32 [0/0] is directly connected, dummy7 inactive, 00:00:10
K   1.1.1.8/32 [0/0] is directly connected, dummy8 inactive, 00:00:10
K   1.1.1.9/32 [0/0] is directly connected, dummy9 inactive, 00:00:10

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: clean up rib and nhg headers
Mark Stapp [Thu, 21 Nov 2019 20:05:52 +0000 (15:05 -0500)]
zebra: clean up rib and nhg headers

Clean up the relationships between zebra's rib and nexthop-group
headers as prep for adding a nexthop-group pointer to the
route_entry.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: BSD null routes were not being installed
Donald Sharp [Thu, 21 Nov 2019 14:37:36 +0000 (09:37 -0500)]
zebra: BSD null routes were not being installed

On BSD systems null routes were not being installed into the
kernel.  This is because commit 08ea27d1121ef5989cdc54fb178c05a7efc4cd3e
introduced a bug where we were attempting to use the wrong
prefix afi types and as such we were going down the v6 code path.

test27.lab.netdef.org# 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
K>* 0.0.0.0/0 [0/0] via 192.168.122.1, 00:00:23
S>* 4.5.6.8/32 [1/0] unreachable (blackhole), 00:00:11
C>* 192.168.122.0/24 [0/1] is directly connected, vtnet0, 00:00:23
test27.lab.netdef.org# exit
[ci@test27 ~/frr]$ netstat -rn
Routing tables
Internet:
Destination        Gateway            Flags     Netif Expire
default            192.168.122.1      UGS      vtnet0
4.5.6.8/32         127.0.0.1          UG1B        lo0
127.0.0.1          link#2             UH          lo0
192.168.122.0/24   link#1             U        vtnet0
192.168.122.108    link#1             UHS         lo0

Fixes: #4843
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5398 from taspelund/missed_newline
Donatas Abraitis [Thu, 21 Nov 2019 07:34:01 +0000 (09:34 +0200)]
Merge pull request #5398 from taspelund/missed_newline

staticd: remove unneeded newline from zlog call

4 years agostaticd: remove unneeded newline from zlog call
Trey Aspelund [Wed, 20 Nov 2019 21:23:02 +0000 (16:23 -0500)]
staticd: remove unneeded newline from zlog call

PR 5303 was merged before the newline was removed from the zlog call.

Signed-off-by: Trey Aspelund <taspelund@cumulusnetworks.com>
4 years agoMerge pull request #5250 from bisdhdh/bgp_nexthop_hash
Donatas Abraitis [Wed, 20 Nov 2019 18:52:12 +0000 (20:52 +0200)]
Merge pull request #5250 from bisdhdh/bgp_nexthop_hash

bgpd: Implementing a hash table for connected address - ipv4/ipv6

4 years agoMerge pull request #5381 from donaldsharp/zebra_100_is_no_good
Mark Stapp [Wed, 20 Nov 2019 12:35:03 +0000 (07:35 -0500)]
Merge pull request #5381 from donaldsharp/zebra_100_is_no_good

zebra: Router Advertisement socket mess up

4 years agobgpd: IPv4 LU withdraw using 0x000000 label
v00lk [Sat, 16 Nov 2019 07:22:01 +0000 (10:22 +0300)]
bgpd: IPv4 LU withdraw using 0x000000 label

According to RFC 8277 IPv4 LU NLRI can be withdrawn using label 0x000000.
This RFC updates RFC3101 where it should be done only with 0x800000 label value.
Juniper implementation sets value 0x000000 when prefix is being withdrawn.
Page 12 RFC8277 states:
[RFC3107] also made it possible to withdraw a binding without
specifying the label explicitly, by setting the Compatibility field
to 0x800000. However, some implementations set it to 0x000000. In
order to ensure backwards compatibility, it is RECOMMENDED by this
document that the Compatibility field be set to 0x800000, but it is
REQUIRED that it be ignored upon reception.

Now FRR drops BGP session when receives such BGP update.

Signed-off-by: Aleksandr Klimenko <v00lk@bk.ru>
4 years agoMerge pull request #5383 from donaldsharp/pim_buffer_fun
Donatas Abraitis [Wed, 20 Nov 2019 11:54:36 +0000 (13:54 +0200)]
Merge pull request #5383 from donaldsharp/pim_buffer_fun

pimd: Various buffer overflow reads and crashes

4 years agoMerge pull request #5385 from donaldsharp/nhrp_doc_update
Donatas Abraitis [Wed, 20 Nov 2019 09:21:04 +0000 (11:21 +0200)]
Merge pull request #5385 from donaldsharp/nhrp_doc_update

doc: Fix nhrp doc issue

4 years agopimd: fix bsm buflen check to include pim hdr
Quentin Young [Wed, 20 Nov 2019 02:47:40 +0000 (21:47 -0500)]
pimd: fix bsm buflen check to include pim hdr

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>