]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
5 years agoMerge pull request #6028 from mjstapp/fix_func_macros
Quentin Young [Wed, 18 Mar 2020 15:53:58 +0000 (11:53 -0400)]
Merge pull request #6028 from mjstapp/fix_func_macros

bgpd,zebra: replace some more FUNCTION macros with __func__

5 years agoMerge pull request #6020 from donaldsharp/cbit_bs
Donatas Abraitis [Wed, 18 Mar 2020 12:29:27 +0000 (14:29 +0200)]
Merge pull request #6020 from donaldsharp/cbit_bs

zebra: Add missing c-bit uint8_t

5 years agobgpd,zebra: replace some more FUNCTION macros 6028/head
Mark Stapp [Tue, 17 Mar 2020 12:57:42 +0000 (08:57 -0400)]
bgpd,zebra: replace some more FUNCTION macros

Replace some remaining __FUNCTION__ macros with __func__,
now that we're trying to converge that way.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #5882 from patrasar/2386429
Donatas Abraitis [Wed, 18 Mar 2020 09:26:44 +0000 (11:26 +0200)]
Merge pull request #5882 from patrasar/2386429

pimd: fix pim interface traffic & pim rp-info json command

5 years agoMerge pull request #5945 from pguibert6WIND/match_rmap_ipv4
Donatas Abraitis [Wed, 18 Mar 2020 09:22:19 +0000 (11:22 +0200)]
Merge pull request #5945 from pguibert6WIND/match_rmap_ipv4

bgpd: support for match ip address next-hop address command

5 years agoMerge pull request #5992 from pguibert6WIND/bgp_bfd_reset_with_remote
Donatas Abraitis [Wed, 18 Mar 2020 09:19:59 +0000 (11:19 +0200)]
Merge pull request #5992 from pguibert6WIND/bgp_bfd_reset_with_remote

bgpd: reset bfd session when bgp comes up

5 years agoMerge pull request #6022 from vivek-cumulus/refine_multiaccess_check
Donatas Abraitis [Wed, 18 Mar 2020 08:47:27 +0000 (10:47 +0200)]
Merge pull request #6022 from vivek-cumulus/refine_multiaccess_check

bgpd: Refine multiaccess check for next hop resetting

5 years agoMerge pull request #6013 from donaldsharp/bgp_reason_it
Donatas Abraitis [Wed, 18 Mar 2020 08:37:02 +0000 (10:37 +0200)]
Merge pull request #6013 from donaldsharp/bgp_reason_it

bgpd: Fix certain code paths that reset reason code

5 years agobgpd: Refine multiaccess check for next hop resetting 6022/head
vivek [Wed, 18 Mar 2020 02:59:52 +0000 (19:59 -0700)]
bgpd: Refine multiaccess check for next hop resetting

A BGP update-group is dynamically created to group together a set of peers
such that any BGP updates can be formed just once for the entire group and
only the next hop attribute may need to be modified when the update is sent
out to each peer in the group. The update formation code attempts to
determine as much as possible if the next hop will be set to our own IP
address for every peer in the group. This helps to avoid additional checks
at the point of sending the update (which happens on a per-peer basis) and
also because some other attributes may/could vary depending on whether the
next hop is set to our own IP or not. Resetting the next hop to our own IP
address is the most common behavior for EBGP peerings in the absence of
other user-configured or internal (e.g., for l2vpn/evpn) settings and
peerings on a shared subnet.

The code had a flaw in the multiaccess check to see if there are peers in
the update group which are on a shared subnet as the next hop of the path
being announced - the source peer could itself be in the same update group
and cause the check to give an incorrect result. Modify the check to skip
the source peer so that the check is more accurate.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
5 years agobgpd: support for match ip address next-hop address command 5945/head
Philippe Guibert [Mon, 9 Mar 2020 15:13:19 +0000 (16:13 +0100)]
bgpd: support for match ip address next-hop address command

this command is missing, compared with 'match ipv6 next-hop' command
available. Adding it by taking into account the backward compatible
effect when supposing that some people have configured acls with name
being an ipv4 address.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: Add missing c-bit uint8_t 6020/head
Donald Sharp [Tue, 17 Mar 2020 20:01:59 +0000 (16:01 -0400)]
zebra: Add missing c-bit uint8_t

Add to the ZEBRA_INTERFACE_BFD_DEST_UPDATE code path
in zebra_ptm_redistribute.c the missing c-bit data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Fix certain code paths that reset reason code 6013/head
Donald Sharp [Mon, 16 Mar 2020 21:23:34 +0000 (17:23 -0400)]
bgpd: Fix certain code paths that reset reason code

The bgp reason code was being reset in bgp_best_selection
by rerunning bgp_path_info_cmp multiple times under certain
receiving patterns of data from peers.

This is the debugs that show this issue:
2020/03/16 19:17:22.523780 BGP: 2001:20:1:1::6 rcvd UPDATE w/ attr: nexthop 20.1.1.6, origin i, metric 600, community 1000:1006, path 20
2020/03/16 19:17:22.523819 BGP: 2001:20:1:1::6 rcvd 20.10.0.6/32 IPv4 unicast
2020/03/16 19:17:22.556168 BGP: 20.1.1.6 rcvd UPDATE w/ attr: nexthop 20.1.1.6, origin i, metric 500, community 1000:1006, path 20
2020/03/16 19:17:22.556209 BGP: 20.1.1.6 rcvd 20.10.0.6/32 IPv4 unicast
2020/03/16 19:17:22.572358 BGP: bgp_process_main_one: p=20.10.0.6/32 afi=IPv4, safi=unicast start
2020/03/16 19:17:22.572408 BGP: 20.10.0.6/32: Comparing path 2001:20:1:1::6 flags 0x410 with path 20.1.1.6 flags 0x410
2020/03/16 19:17:22.572415 BGP: 20.10.0.6/32: path 2001:20:1:1::6 loses to path 20.1.1.6 due to MED 600 > 500
2020/03/16 19:17:22.572422 BGP: 20.10.0.6/32: path 20.1.1.6 is the bestpath from AS 20
2020/03/16 19:17:22.572429 BGP: 20.10.0.6/32: path 20.1.1.6 is the initial bestpath
2020/03/16 19:17:22.572435 BGP: bgp_best_selection: pi 0x5627187c66c0 dmed
2020/03/16 19:17:22.572441 BGP: 20.10.0.6/32: After path selection, newbest is path 20.1.1.6 oldbest was NONE
2020/03/16 19:17:22.572447 BGP: 20.10.0.6/32: path 20.1.1.6 is the bestpath, add to the multipath list
2020/03/16 19:17:22.572453 BGP: 20.10.0.6/32: path 2001:20:1:1::6 has the same nexthop as the bestpath, skip it
2020/03/16 19:17:22.572460 BGP: 20.10.0.6/32: starting mpath update, newbest 20.1.1.6 num candidates 1 old-mpath-count 0 old-cum-bw u0
2020/03/16 19:17:22.572466 BGP: 20.10.0.6/32: comparing candidate 20.1.1.6 with existing mpath NONE
2020/03/16 19:17:22.572473 BGP: 20.10.0.6/32: New mpath count (incl newbest) 1 mpath-change NO all_paths_lb 0 cum_bw u0

Effectively if BGP receives 2 paths it could end up running bgp_path_info_cmp multiple times
and in some situations overwrite the reason selected the first time through.

In this example path selection is run and the MED is the reason for the choice.
Then in bgp_best_selection is run again this time clearing new_select
to NULL before calling path selection for the first time. This second
call into path selection resets the reason, since it is only passing in one
path.  So save the last reason selected and restore in this case.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5849 from donaldsharp/pim_register_prefix_list
Russ White [Tue, 17 Mar 2020 18:57:10 +0000 (14:57 -0400)]
Merge pull request #5849 from donaldsharp/pim_register_prefix_list

Pim register prefix list

5 years agoMerge pull request #6006 from sarav511/zbr_crsh
Mark Stapp [Tue, 17 Mar 2020 18:47:58 +0000 (14:47 -0400)]
Merge pull request #6006 from sarav511/zbr_crsh

zebra: Disable rmap update thread before routemap_finish while shutting down Zebra

5 years agoMerge pull request #5880 from patrasar/2371558
Donald Sharp [Tue, 17 Mar 2020 17:40:53 +0000 (13:40 -0400)]
Merge pull request #5880 from patrasar/2371558

pimd: fix OIL not removed after IGMP prune

5 years agoMerge pull request #5779 from mjstapp/sharp_with_lsps
Donald Sharp [Tue, 17 Mar 2020 15:40:35 +0000 (11:40 -0400)]
Merge pull request #5779 from mjstapp/sharp_with_lsps

sharpd: add support to install/remove lsps

5 years agoMerge pull request #5954 from ton31337/feature/rfc7607
Russ White [Tue, 17 Mar 2020 14:27:35 +0000 (10:27 -0400)]
Merge pull request #5954 from ton31337/feature/rfc7607

 bgpd: Proscribe the use of AS 0 (zero)

5 years agoMerge pull request #5848 from ton31337/feature/show_rpki_prefix_asn
Russ White [Tue, 17 Mar 2020 14:12:22 +0000 (10:12 -0400)]
Merge pull request #5848 from ton31337/feature/show_rpki_prefix_asn

bgpd: Show RPKI prefixes filtered by ASN

5 years agoMerge pull request #5868 from ghasemnaddaf/nhrp_bugfix
Russ White [Tue, 17 Mar 2020 14:07:51 +0000 (10:07 -0400)]
Merge pull request #5868 from ghasemnaddaf/nhrp_bugfix

nhrpd: fix shortcut expiry and route installation

5 years agobgpd: Proscribe the use of AS 0 (zero) 5954/head
Donatas Abraitis [Tue, 10 Mar 2020 05:35:35 +0000 (07:35 +0200)]
bgpd: Proscribe the use of AS 0 (zero)

Implements https://tools.ietf.org/html/rfc7607

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #5927 from mjstapp/interval_string_api
Donald Sharp [Tue, 17 Mar 2020 10:47:15 +0000 (06:47 -0400)]
Merge pull request #5927 from mjstapp/interval_string_api

lib, *: add a common time interval formatting api

5 years agoMerge pull request #5940 from patrasar/214257
Donald Sharp [Tue, 17 Mar 2020 10:38:41 +0000 (06:38 -0400)]
Merge pull request #5940 from patrasar/214257

pimd: add flags in show ip mroute command

5 years agozebra: Disable rmap update thread before routemap_finish while shutting down zebra 6006/head
saravanank [Mon, 16 Mar 2020 02:23:38 +0000 (19:23 -0700)]
zebra: Disable rmap update thread before routemap_finish while shutting down zebra

Problem: While zebra going down, rmap update thread is being called as part of
timer event. This make zebra to crash.

RCA: At this time route_map_master_hash is made to 0 by sig int handler.
This is causing Zebrad to crash while executing rmap update thread

Fix: As part of SIGINT handler, before calling routemap_finish,
thread off any routemap update scheduled at that point and make sure that
it wont get scheduled again by making the timeout as 0.

Signed-off-by: Saravanan K <saravanank@vmware.com>
5 years agopimd: fix OIL not removed after IGMP prune 5880/head
Sarita Patra [Mon, 2 Mar 2020 08:55:22 +0000 (00:55 -0800)]
pimd: fix OIL not removed after IGMP prune

Issue: Client1------LHR-----(int-1)RP(int-2)------client2
Client2 send IGMP join for group G.
Client1 send IGMP join for group G.
verify show ip mroute in RP, will have 2 OIL.
Client2 send IGMP leave.
Verify show ip mroute in RP, will still have 2.

Root cause: When RP receives IGMP join from client2, it creates
a (s,g) channel oil and add the interface int-2 into oil list and
set the flag PIM_OIF_FLAG_PROTO_IGMP to int-2
Client1 send IGMP join, LHR will send a (*,G) join to RP. RP will
add the interface int-1 into the oil list of (s,g) channel_oil and
will set the flag PIM_OIF_FLAG_PROTO_IGMP and PIM_OIF_FLAG_PROTO_PIM
to the int-1 and set PIM_OIF_FLAG_PROTO_PIM to int-2 as well. It is
happening because of the pim_upstream_inherited_olist_decide() and
forward_on() get all the oil and update the flag wrongly.
So now when client 2 sends IGMP prune, RP will not remove the int-2
from oil list since both PIM_OIF_FLAG_PROTO_PIM & PIM_OIF_FLAG_PROTO_IGMP
are set, it just unset the flag PIM_OIF_FLAG_PROTO_IGMP.

Fix: Introduced new flags in if_channel, PIM_IF_FLAG_MASK_PROTO_PIM
& PIM_IF_FLAG_MASK_PROTO_IGMP. If a if_channel is created because of
pim join or pim (s,g,rpt) prune received, then set the flag
PIM_IF_FLAG_MASK_PROTO_PIM. If a if_channel is created becuase of IGMP
join received, then set the flag PIM_IF_FLAG_MASK_PROTO_IGMP.
When an interface needs to be added into the oil list check if
PIM_IF_FLAG_MASK_PROTO_PIM or PIM_IF_FLAG_MASK_PROTO_IGMP is set, then
update oil flag accordingly.

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agopimd: fix pim interface traffic & pim rp-info json command 5882/head
Sarita Patra [Mon, 2 Mar 2020 09:10:22 +0000 (01:10 -0800)]
pimd: fix pim interface traffic & pim rp-info json command

Issue 1: "show ip pim interface traffic" not show prune TX/RX
Rootcause : not added the variable in the json
Fix : add prune TX/RX in show ip pim interface traffic json

Issue 2: "show ip pim rp-info" not shows the key iAmRp when it is false
Rootcause: Only display the key when the value is true.
Fix: add iAmRp as false in show ip pim rp-info json

Issue 3: "show ip pim rp-info" not showing outbound interface if it is empty
Rootcause: Only display when there is any OIL

Fix: When RP is not reachable then, the outbound interface is Unknown
The command "show ip pim rp-info json" not displaying the outbound
interafce if it is unknown

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agopimd: add flags in show ip mroute command 5940/head
Sarita Patra [Mon, 9 Mar 2020 06:23:16 +0000 (23:23 -0700)]
pimd: add flags in show ip mroute command

S - Sparse Mode
C - indicates there is a member of the group directly connected to the router.
R -set on an (S, G) by the receipt of an (S, G) RP bit prune message.
F -This indicates that this router is a FHR and send register messages to RP to inform RP of this active source
P - OIL list is NULL. That means the router will send a prune.
T - At least one packet received via SPT.

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agoMerge pull request #6009 from kuldeepkash/bgp_basic_functionality
Donald Sharp [Tue, 17 Mar 2020 01:37:07 +0000 (21:37 -0400)]
Merge pull request #6009 from kuldeepkash/bgp_basic_functionality

tests: Optimize bgp-basic-functionality-topo1 test suite

5 years agoMerge pull request #6012 from ton31337/fix/add_rfc6608_to_supported_list
Donald Sharp [Tue, 17 Mar 2020 01:19:08 +0000 (21:19 -0400)]
Merge pull request #6012 from ton31337/fix/add_rfc6608_to_supported_list

doc: Add rfc6608 to supported list

5 years agodoc: Add rfc6608 to supported list 6012/head
Donatas Abraitis [Mon, 16 Mar 2020 19:57:45 +0000 (21:57 +0200)]
doc: Add rfc6608 to supported list

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agotests: Optimize bgp-basic-functionality-topo1 test suite 6009/head
Kuldeep Kashyap [Mon, 16 Mar 2020 19:51:41 +0000 (19:51 +0000)]
tests: Optimize bgp-basic-functionality-topo1 test suite

1. Used aggresive values to verify keepalive and holddown timers functionality
2. Modified variable name in lib/bgp.py

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agoMerge pull request #5976 from rubenk/build-detect-python-3.8
Quentin Young [Mon, 16 Mar 2020 19:22:44 +0000 (15:22 -0400)]
Merge pull request #5976 from rubenk/build-detect-python-3.8

build: Add Python 3.8

5 years agoMerge pull request #5998 from donaldsharp/more_spelling
Santosh P K [Mon, 16 Mar 2020 18:16:53 +0000 (23:46 +0530)]
Merge pull request #5998 from donaldsharp/more_spelling

More spelling

5 years agoMerge pull request #6002 from ton31337/feature/rfc6608_fsm_sub_error_codes
Quentin Young [Mon, 16 Mar 2020 18:13:56 +0000 (14:13 -0400)]
Merge pull request #6002 from ton31337/feature/rfc6608_fsm_sub_error_codes

bgpd: Add subcodes for BGP Finite State Machine Error

5 years agoMerge pull request #5970 from rubenk/build-cleanup-configure-tests
Quentin Young [Mon, 16 Mar 2020 18:00:21 +0000 (14:00 -0400)]
Merge pull request #5970 from rubenk/build-cleanup-configure-tests

Build: cleanup configure tests

5 years agotests/isisd: Update expected output to match corrected spelling 5998/head
Christian Franke [Mon, 16 Mar 2020 14:36:12 +0000 (15:36 +0100)]
tests/isisd: Update expected output to match corrected spelling

The update was performed using wuschl [1] like this:

$ wuschl rebuild tests/isisd/test_fuzz_isis_tlv
$ gzip -9 tests/isisd/test_fuzz_isis_tlv_tests.h

[1] https://pypi.org/project/wuschl/

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoMerge pull request #6000 from ton31337/fix/distinguish_src_destination_pbr
Donald Sharp [Mon, 16 Mar 2020 12:25:27 +0000 (08:25 -0400)]
Merge pull request #6000 from ton31337/fix/distinguish_src_destination_pbr

zebra: Distinguish source/destination PBR IP in zlog_warn messages

5 years agoMerge pull request #6005 from sarav511/bsr_json
Donald Sharp [Mon, 16 Mar 2020 12:24:44 +0000 (08:24 -0400)]
Merge pull request #6005 from sarav511/bsr_json

pimd: show ip pim bsr json output - removing vtysh caption

5 years agoMerge pull request #6007 from sarav511/unlck
Donald Sharp [Mon, 16 Mar 2020 12:24:10 +0000 (08:24 -0400)]
Merge pull request #6007 from sarav511/unlck

pimd: moving the route_unlock_node outside debug function

5 years agoMerge pull request #5941 from patrasar/217793
Donald Sharp [Mon, 16 Mar 2020 12:14:28 +0000 (08:14 -0400)]
Merge pull request #5941 from patrasar/217793

pimd: Don't refresh mroute_creation for kernel-installed mroute

5 years agobgpd: Add subcodes for BGP Finite State Machine Error 6002/head
Donatas Abraitis [Sun, 15 Mar 2020 12:19:11 +0000 (14:19 +0200)]
bgpd: Add subcodes for BGP Finite State Machine Error

Implement https://tools.ietf.org/html/rfc6608

I used python scapy library to send a notification message in OpenSent state:
```
send(IP(dst="192.168.0.1")/TCP(sport=sp,
dport=179,
seq=rec.ack,
ack=rec.seq + 1,
flags=0x18)/BGPHeader(type=3)/BGPNotification(error_code=4,
error_subcode=0))
```

Logs from FRR:
```
%NOTIFICATION: sent to neighbor 192.168.0.2 5/1 (Neighbor Events Error/Receive Unexpected Message in OpenSent State) 0 bytes
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agopimd: moving the route_unlock_node outside debug function 6007/head
saravanank [Mon, 16 Mar 2020 02:36:33 +0000 (19:36 -0700)]
pimd: moving the route_unlock_node outside debug function

Problem: Route node is not de referenced after search when pim debug events are
not enabled when pim_rp_find_match_group is called. So this memory will not get
released when route node is deleted after hitting this path.

RCA: Dereferencing is done inside debug condition.

Fix: Moving outside debug condition

Signed-off-by: Saravanan K <saravanank@vmware.com>
5 years agopimd: show ip pim bsr json output - removing vtysh caption 6005/head
saravanank [Mon, 16 Mar 2020 01:58:53 +0000 (18:58 -0700)]
pimd: show ip pim bsr json output - removing vtysh caption

Root cause: The header display is put in common outside the vtysh/json if-else.
Fix: Brought inside vtysh condition.

Signed-off-by: Saravanan K <saravanank@vmware.com>
5 years agoMerge pull request #6003 from ton31337/fix/skip_kitchen_files
Donald Sharp [Sun, 15 Mar 2020 23:11:15 +0000 (19:11 -0400)]
Merge pull request #6003 from ton31337/fix/skip_kitchen_files

git: Skip .kitchen files

5 years agogit: Skip .kitchen files 6003/head
Donatas Abraitis [Sun, 15 Mar 2020 20:27:33 +0000 (22:27 +0200)]
git: Skip .kitchen files

I use kitchen (https://github.com/test-kitchen/kitchen-vagrant) for
development labs environment. Just skip those garbage files.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agozebra: Distinguish source/destination PBR IP in zlog_warn messages 6000/head
Donatas Abraitis [Sat, 14 Mar 2020 12:23:40 +0000 (14:23 +0200)]
zebra: Distinguish source/destination PBR IP in zlog_warn messages

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #5854 from qlyoung/fix-zapi-ipset-entry-bad-family
Donatas Abraitis [Sat, 14 Mar 2020 12:19:13 +0000 (14:19 +0200)]
Merge pull request #5854 from qlyoung/fix-zapi-ipset-entry-bad-family

zebra: check for invalid family in ipset entry msg

5 years agozebra: Fix spelling mistakes found by debian packaging
Donald Sharp [Fri, 13 Mar 2020 23:16:11 +0000 (19:16 -0400)]
zebra: Fix spelling mistakes found by debian packaging

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoospfd: Fix spelling mistakes found by debian packaging
Donald Sharp [Fri, 13 Mar 2020 23:15:47 +0000 (19:15 -0400)]
ospfd: Fix spelling mistakes found by debian packaging

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoospf6d: Fix spelling mistakes found by debian packaging
Donald Sharp [Fri, 13 Mar 2020 23:08:48 +0000 (19:08 -0400)]
ospf6d: Fix spelling mistakes found by debian packaging

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoisisd: Fix spelling mistakes found by debian packaging
Donald Sharp [Fri, 13 Mar 2020 23:07:39 +0000 (19:07 -0400)]
isisd: Fix spelling mistakes found by debian packaging

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Fix spelling mistakes found by debian packaging
Donald Sharp [Fri, 13 Mar 2020 23:05:18 +0000 (19:05 -0400)]
bgpd: Fix spelling mistakes found by debian packaging

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Show RPKI prefixes filtered by ASN 5848/head
Donatas Abraitis [Thu, 20 Feb 2020 15:37:37 +0000 (17:37 +0200)]
bgpd: Show RPKI prefixes filtered by ASN

```
spine1-debian-9# show rpki
  as-number         Lookup by ASN in prefix table
  cache-connection  Show to which RPKI Cache Servers we have a connection
  cache-server      SHOW configured cache server
  prefix            Lookup IP prefix and optionally ASN in prefix table
  prefix-table      Show validated prefixes which were received from RPKI Cache
spine1-debian-9# show rpki as-number 47583
2.57.88.0                                   23 -  23        47583
2.57.91.0                                   24 -  24        47583
2.57.90.0                                   24 -  24        47583
5.183.8.0                                   22 -  24        47583
31.170.164.0                                23 -  23        47583
31.170.165.0                                24 -  24        47583
31.170.164.0                                24 -  24        47583
31.170.166.0                                23 -  23        47583
31.170.160.0                                22 -  22        47583
31.220.16.0                                 24 -  24        47583
...
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: reset bfd session when bgp comes up 5992/head
Philippe Guibert [Thu, 12 Mar 2020 13:04:30 +0000 (14:04 +0100)]
bgpd: reset bfd session when bgp comes up

This scenario has been seen against microtik virtual machine with
bfd enabled. When remote microtik bgp reestablishes the bgp session
after a bgp reset, the bgp establishment comes first, then bfd is
initialising.
The second point is true for microtik, but not for frrouting, as the
frrouting, when receiving bfd down messages, is not at init state.
Actually, bfd state is up, and sees the first bfd down packet from
bfd as an issue. Consequently, the BGP session is cleared.
The fix consists in resetting the BFD session, only if bfd status is
considered as up, once BGP comes up.
That permits to align state machines of both local and remote bfd.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #5972 from rubenk/eigrpd-remove-workaround-for-old-openbsd
Donald Sharp [Fri, 13 Mar 2020 11:20:20 +0000 (07:20 -0400)]
Merge pull request #5972 from rubenk/eigrpd-remove-workaround-for-old-openbsd

eigrpd: stop checking for ancient OpenBSD

5 years agoMerge pull request #5985 from Naveenaidu/5984-cleanup-is_selfroute
Donald Sharp [Thu, 12 Mar 2020 23:19:53 +0000 (19:19 -0400)]
Merge pull request #5985 from Naveenaidu/5984-cleanup-is_selfroute

zebra/rt_netlink.c: Clean is_selfroute function

5 years agoMerge pull request #5991 from pguibert6WIND/bfd_corner_bgp_update_source
Donald Sharp [Thu, 12 Mar 2020 17:31:22 +0000 (13:31 -0400)]
Merge pull request #5991 from pguibert6WIND/bfd_corner_bgp_update_source

bgpd: upon reconfiguration or bgp exchange failure, stop bfd.

5 years agoMerge pull request #5827 from donaldsharp/missed_upstreaming
Sri Mohana Singamsetty [Thu, 12 Mar 2020 16:27:26 +0000 (09:27 -0700)]
Merge pull request #5827 from donaldsharp/missed_upstreaming

Missed upstreaming

5 years agoMerge pull request #5979 from ton31337/fix/convert_to_bool_some_functions
Sri Mohana Singamsetty [Thu, 12 Mar 2020 16:26:21 +0000 (09:26 -0700)]
Merge pull request #5979 from ton31337/fix/convert_to_bool_some_functions

bgpd: Convert type int functions to bool which return 0/1 only

5 years agoMerge pull request #5981 from ton31337/fix/not_necessary_checks
Mark Stapp [Thu, 12 Mar 2020 13:45:55 +0000 (09:45 -0400)]
Merge pull request #5981 from ton31337/fix/not_necessary_checks

*: Remove tests for some XFREE-family functions

5 years agoMerge pull request #5974 from donaldsharp/ldp_ifindex_missed
Mark Stapp [Thu, 12 Mar 2020 12:58:38 +0000 (08:58 -0400)]
Merge pull request #5974 from donaldsharp/ldp_ifindex_missed

ldpd: During code inspection we are mixing data sizes

5 years agobgpd: upon reconfiguration or bgp exchange failure, stop bfd. 5991/head
Philippe Guibert [Tue, 10 Mar 2020 08:20:09 +0000 (09:20 +0100)]
bgpd: upon reconfiguration or bgp exchange failure, stop bfd.

When bgp is updated with local source, the bgp session is reset; bfd
also must be reset. The bgp_stop() handler handles all kind of
unexpected failures, so the placeholder to deregister from bfd should be
ok, providing that when bgp establishes, a similar function in bgp will
recreate bfd context.
Note that the bfd session is not reset on one specific case, where BFD
down event is the last reset. In that case, we must let BFD to monitor
the link.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agopimd: Don't refresh mroute_creation for kernel-installed mroute 5941/head
Sarita Patra [Mon, 9 Mar 2020 07:00:28 +0000 (00:00 -0700)]
pimd: Don't refresh mroute_creation for kernel-installed mroute

Issue: When any interface is getting added/deleted in the outgoing
interface list, it calls pim_mroute_add() which is updating the
mroute_creation time without checking if the mroute is already
installed in the kernel.

Fix: Check if mroute is already installed, then dont refresh the
mroute_creation timer.

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agonhrpd: resolve formatting warnings 5868/head
Ghasem Naddaf [Wed, 11 Mar 2020 19:50:10 +0000 (12:50 -0700)]
nhrpd: resolve formatting warnings

Signed-off-by: Ghasem Naddaf <gshirazi@infoblox.com>
5 years agoMerge pull request #5952 from ton31337/fix/no_need_for_if_in_filter_override
Sri Mohana Singamsetty [Wed, 11 Mar 2020 19:21:58 +0000 (12:21 -0700)]
Merge pull request #5952 from ton31337/fix/no_need_for_if_in_filter_override

bgpd: Do not check for a maximum for peer->filter_override

5 years agozebra/rt_netlink.c: Clean is_selfroute function 5985/head
Naveen Naidu [Wed, 11 Mar 2020 18:20:41 +0000 (23:50 +0530)]
zebra/rt_netlink.c: Clean is_selfroute function

The return type of is_selfroute function is changed from int to bool.
Also remove the redundant invoking of the is_selfroute function in the
calling function netlink_route_change_read_unicast

Fixes: https://github.com/FRRouting/frr/issues/5984
Signed-off-by: Naveen Naidu <naveennaidu479@gmail.com>
5 years agoMerge pull request #5973 from rubenk/ospfd-fix-wrong-operator
Donald Sharp [Wed, 11 Mar 2020 17:09:40 +0000 (13:09 -0400)]
Merge pull request #5973 from rubenk/ospfd-fix-wrong-operator

ospfd: fix range check for metric

5 years agoMerge pull request #5975 from rubenk/zebra-use-modern-function-definition
Donald Sharp [Wed, 11 Mar 2020 17:09:18 +0000 (13:09 -0400)]
Merge pull request #5975 from rubenk/zebra-use-modern-function-definition

zebra: use modern C function definition

5 years agoMerge branch 'master' into nhrp_bugfix
Ghasem Naddaf [Wed, 11 Mar 2020 16:50:54 +0000 (09:50 -0700)]
Merge branch 'master' into nhrp_bugfix

5 years ago*: Remove tests for some XFREE-family functions 5981/head
Donatas Abraitis [Wed, 11 Mar 2020 16:16:23 +0000 (18:16 +0200)]
*: Remove tests for some XFREE-family functions

XFREE() covers that.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: Convert type int functions to bool which return 0/1 only 5979/head
Donatas Abraitis [Wed, 11 Mar 2020 15:09:11 +0000 (17:09 +0200)]
bgpd: Convert type int functions to bool which return 0/1 only

This is only for bgp_aspath.[ch]

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #5966 from rubenk/isisd-fix-build-warnings
Donald Sharp [Wed, 11 Mar 2020 14:45:07 +0000 (10:45 -0400)]
Merge pull request #5966 from rubenk/isisd-fix-build-warnings

isisd: fix a bunch of build warnings with GCC 10

5 years agobuild: Add Python 3.8 5976/head
Ruben Kerkhof [Wed, 11 Mar 2020 13:56:10 +0000 (14:56 +0100)]
build: Add Python 3.8

Fixes detection of python on OpenBSD

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
5 years agozebra: use modern C function definition 5975/head
Ruben Kerkhof [Wed, 11 Mar 2020 13:06:34 +0000 (14:06 +0100)]
zebra: use modern C function definition

And also remove an assignment without effect while we're here.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
5 years agoldpd: During code inspection we are mixing data sizes 5974/head
Donald Sharp [Wed, 11 Mar 2020 13:03:17 +0000 (09:03 -0400)]
ldpd: During code inspection we are mixing data sizes

As I understand it ldpd was originally developed as a standalone
daemon for *BSD land.  Then ported to FRR.  FRR uses ifindex_t
as the base type for the ifindex.  Mixing `unsigned short` and
`int` and `unsigned int` is going to lead to fun somewhere
along the way.  Especially when we get to run on a system
with ifindex churn( I'm looking at you docker ).

Attempt to convert all of ldpd to think of the ifindex as a
`ifindex_t`.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoospfd: fix range check for metric 5973/head
Ruben Kerkhof [Wed, 11 Mar 2020 12:56:26 +0000 (13:56 +0100)]
ospfd: fix range check for metric

Found with -Wlogical-op

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
5 years agoeigrpd: stop checking for ancient OpenBSD 5972/head
Ruben Kerkhof [Wed, 11 Mar 2020 12:31:13 +0000 (13:31 +0100)]
eigrpd: stop checking for ancient OpenBSD

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
5 years agobuild: no need for braces in variables 5970/head
Ruben Kerkhof [Wed, 11 Mar 2020 11:30:47 +0000 (12:30 +0100)]
build: no need for braces in variables

If the variable is the only word between quotes, there's no need to use
braces.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
5 years agobuild: no need to compare with "x"
Ruben Kerkhof [Wed, 11 Mar 2020 11:09:13 +0000 (12:09 +0100)]
build: no need to compare with "x"

As long as the arguments of the test are quoted,
modern shells handle it just fine.

A bunch of the tests already did this, convert the rest.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
5 years agobuild: quote the right hand side of tests too
Ruben Kerkhof [Wed, 11 Mar 2020 10:53:15 +0000 (11:53 +0100)]
build: quote the right hand side of tests too

For consistency

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
5 years agobuild: always quote variables in tests
Ruben Kerkhof [Wed, 11 Mar 2020 10:27:04 +0000 (11:27 +0100)]
build: always quote variables in tests

If they are not defined, ./configure will throw hard to debug errors
like:
./configure: line 1678: test: =: unary operator expected

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
5 years agoisisd: fix a bunch of build warnings with GCC 10 5966/head
Ruben Kerkhof [Wed, 11 Mar 2020 09:37:37 +0000 (10:37 +0100)]
isisd: fix a bunch of build warnings with GCC 10

GCC 10 thinks we memcpy into a 0-sized array (which we're not).
Use a C99 flexible array member instead.

Fixes:

  CC       lib/stream.lo
lib/stream.c: In function ‘stream_put_in_addr’:
lib/stream.c:824:2: warning: writing 4 bytes into a region of size 0 [-Wstringop-overflow=]
  824 |  memcpy(s->data + s->endp, addr, sizeof(uint32_t));
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

isisd/isis_tlvs.c: In function ‘auth_validator_hmac_md5’:
isisd/isis_tlvs.c:4279:2: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
 4279 |  memcpy(STREAM_DATA(stream) + auth->offset, auth->value, 16);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘update_auth_hmac_md5’,
    inlined from ‘update_auth’ at isisd/isis_tlvs.c:3734:4,
    inlined from ‘isis_pack_tlvs’ at isisd/isis_tlvs.c:3897:2:
isisd/isis_tlvs.c:3722:2: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
 3722 |  memcpy(STREAM_DATA(s) + auth->offset, digest, 16);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
isisd/isis_tlvs.c:3722:2: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
5 years agoMerge pull request #5962 from donaldsharp/whichafisafi
Donatas Abraitis [Wed, 11 Mar 2020 09:18:02 +0000 (11:18 +0200)]
Merge pull request #5962 from donaldsharp/whichafisafi

bgpd: When deleting an afi/safi and we fail give more detail

5 years agoMerge pull request #5957 from pguibert6WIND/two_bfd_fixes
Donatas Abraitis [Wed, 11 Mar 2020 09:17:32 +0000 (11:17 +0200)]
Merge pull request #5957 from pguibert6WIND/two_bfd_fixes

Two bfd fixes

5 years agoMerge pull request #5938 from donaldsharp/redistribute_afi
Sri Mohana Singamsetty [Tue, 10 Mar 2020 22:32:16 +0000 (15:32 -0700)]
Merge pull request #5938 from donaldsharp/redistribute_afi

zebra: Only redistribute default routes of the right afi

5 years agoMerge pull request #5961 from rubenk/build-fix-werror-undef
Sri Mohana Singamsetty [Tue, 10 Mar 2020 21:30:45 +0000 (14:30 -0700)]
Merge pull request #5961 from rubenk/build-fix-werror-undef

build: fix building with -Werror=undef

5 years agobgpd: When deleting an afi/safi and we fail give more detail 5962/head
Donald Sharp [Tue, 10 Mar 2020 18:54:18 +0000 (14:54 -0400)]
bgpd: When deleting an afi/safi and we fail give more detail

It would be nice to know which afi/safi we couldn't delete
on a peer in the flog message.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agotreewide: fix some issues found with -Werror=undef 5961/head
Ruben Kerkhof [Tue, 10 Mar 2020 15:50:03 +0000 (16:50 +0100)]
treewide: fix some issues found with -Werror=undef

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
5 years agoMerge pull request #5951 from rubenk/docs-fix-warning
Quentin Young [Tue, 10 Mar 2020 15:40:41 +0000 (11:40 -0400)]
Merge pull request #5951 from rubenk/docs-fix-warning

Fix a warning while building manpages

5 years agoMerge pull request #5953 from ton31337/fix/move_coccinelle_to_tools
Quentin Young [Tue, 10 Mar 2020 15:36:59 +0000 (11:36 -0400)]
Merge pull request #5953 from ton31337/fix/move_coccinelle_to_tools

tools: Move scripts/coccinelle to tools/coccinelle

5 years agobuild: fix building with -Werror=undef
Ruben Kerkhof [Tue, 10 Mar 2020 15:27:50 +0000 (16:27 +0100)]
build: fix building with -Werror=undef

In the unlikely event you are building with -Werror=undef, several
configure checks fail. Fix those.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
5 years agoMerge pull request #5877 from donaldsharp/pim_shutdown_cleanup
Donatas Abraitis [Tue, 10 Mar 2020 15:05:12 +0000 (17:05 +0200)]
Merge pull request #5877 from donaldsharp/pim_shutdown_cleanup

Pim shutdown cleanup

5 years agodoc: Add `show bgp listener` command 5827/head
Donald Sharp [Tue, 18 Feb 2020 20:28:42 +0000 (15:28 -0500)]
doc: Add `show bgp listener` command

Add a bit of debug to show the listener sockets and who created them
to associate with strace output for a developer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Fix router-id update handling for route-leaking
vivek [Tue, 17 Sep 2019 01:28:44 +0000 (18:28 -0700)]
bgpd: Fix router-id update handling for route-leaking

If the default BGP instance is importing routes from another instance and
the latter has a router-id update, the update handler needs to handle the
default instance in a special way.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Chirag Shah <chirag@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-26007
Reviewed By: CCR-9108
Testing Done: Detailed verification in 3.x

5 years agobgpd: Ensure NHT registration is not attempted for peer-group
vivek [Fri, 6 Sep 2019 04:13:59 +0000 (21:13 -0700)]
bgpd: Ensure NHT registration is not attempted for peer-group

Ensure that the late registration for NHT done for IPv4 route exchange
over IPv6 GUA peering is not attempted for peer-groups, only for peers.

Fixes: "bgpd: Late registration of Extended Nexthop"
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Readd special flood MAC upon del notification
vivek [Fri, 6 Sep 2019 04:11:07 +0000 (21:11 -0700)]
zebra: Readd special flood MAC upon del notification

Readd the special MAC that represents the flood (head-end replication) entry
for EVPN-VxLAN upon getting a delete notification for it.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Chirag Shah <chirag@cumulusnetworks.com>
Ticket:  CM-25797
Ticket: CM-26238
Testing Done:
1. evpn-min, evpn-smoke - results summarized in CM-25798

5 years agolib: immediately ping systemd when started
Quentin Young [Fri, 2 Aug 2019 19:18:00 +0000 (19:18 +0000)]
lib: immediately ping systemd when started

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agopimd: ifchannel deletion should tell you the interface
Donald Sharp [Tue, 11 Jun 2019 12:34:23 +0000 (12:34 +0000)]
pimd: ifchannel deletion should tell you the interface

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: add debug in specific neigh fetch
Chirag Shah [Wed, 27 Mar 2019 01:23:58 +0000 (18:23 -0700)]
zebra: add debug in specific neigh fetch

add debug trace in specific neigh request send api
to help debug an issue where synchronous response parse
returns with NLMSG_DONE where there is no ipv6 neigh received.
the count value is set to 1 because the request contained
a spcific neigh.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agobgpd: Add 'show bgp listeners' command for diagnostics
Donald Sharp [Fri, 19 Apr 2019 12:52:01 +0000 (08:52 -0400)]
bgpd: Add 'show bgp listeners' command for diagnostics

Add a command to display listen sockets and the vrf that they
are associated with.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5955 from dslicenc/v6-ra-leak
Mark Stapp [Tue, 10 Mar 2020 13:53:42 +0000 (09:53 -0400)]
Merge pull request #5955 from dslicenc/v6-ra-leak

zebra: delete ipv6 RA prefix entries when zebra is killed