Commit Graph

19747 Commits

Author SHA1 Message Date
Quentin Young
1e804aa3ae
Merge pull request #6002 from ton31337/feature/rfc6608_fsm_sub_error_codes
bgpd: Add subcodes for BGP Finite State Machine Error
2020-03-16 14:13:56 -04:00
Quentin Young
5117f93b7f
Merge pull request #5970 from rubenk/build-cleanup-configure-tests
Build: cleanup configure tests
2020-03-16 14:00:21 -04:00
Christian Franke
bcfa87906a 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>
2020-03-16 15:36:34 +01:00
Donald Sharp
94c83e2d72
Merge pull request #6000 from ton31337/fix/distinguish_src_destination_pbr
zebra: Distinguish source/destination PBR IP in zlog_warn messages
2020-03-16 08:25:27 -04:00
Donald Sharp
443b06182f
Merge pull request #6005 from sarav511/bsr_json
pimd: show ip pim bsr json output - removing vtysh caption
2020-03-16 08:24:44 -04:00
Donald Sharp
c7fb94afa6
Merge pull request #6007 from sarav511/unlck
pimd: moving the route_unlock_node outside debug function
2020-03-16 08:24:10 -04:00
Donald Sharp
b4b58058c2
Merge pull request #5941 from patrasar/217793
pimd: Don't refresh mroute_creation for kernel-installed mroute
2020-03-16 08:14:28 -04:00
Donatas Abraitis
3893aeeea3 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>
2020-03-16 09:22:22 +02:00
saravanank
260c92c867 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>
2020-03-15 19:36:33 -07:00
saravanank
36afe48622 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>
2020-03-15 18:58:53 -07:00
saravanank
ac6c8d549a pimd: (S,G) Route doesn't inherit olist from parent while creation
Issue: when (*,G) has some receiver and directly connected source sends traffic,
new (S,G) entry created is not inheriting the oil from (*,g)

RCA: pim_mroute_msg_nocache haven't assume FHR have (*,g) member ports

Fix : Added inherit oil from parent from (*,g) receivers to get added

Signed-off-by: Saravanan K <saravanank@vmware.com>
2020-03-15 18:41:06 -07:00
Donald Sharp
7f2ccbe562
Merge pull request #6003 from ton31337/fix/skip_kitchen_files
git: Skip .kitchen files
2020-03-15 19:11:15 -04:00
Donatas Abraitis
bd286b0658 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>
2020-03-15 22:27:33 +02:00
Donatas Abraitis
cec72d492d zebra: Distinguish source/destination PBR IP in zlog_warn messages
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-14 14:23:40 +02:00
Donatas Abraitis
7d76c335d8
Merge pull request #5854 from qlyoung/fix-zapi-ipset-entry-bad-family
zebra: check for invalid family in ipset entry msg
2020-03-14 14:19:13 +02:00
Donald Sharp
3ac4e7cc9a zebra: Fix spelling mistakes found by debian packaging
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-13 19:16:11 -04:00
Donald Sharp
9788354c3a ospfd: Fix spelling mistakes found by debian packaging
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-13 19:15:47 -04:00
Donald Sharp
84b7a388c0 ospf6d: Fix spelling mistakes found by debian packaging
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-13 19:13:57 -04:00
Donald Sharp
377e2dd3ed isisd: Fix spelling mistakes found by debian packaging
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-13 19:13:03 -04:00
Donald Sharp
2089dd80c0 bgpd: Fix spelling mistakes found by debian packaging
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-13 19:10:28 -04:00
Donatas Abraitis
02334bb228 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>
2020-03-13 20:03:41 +02:00
Philippe Guibert
25901edde4 doc: update show nhrp support for json
add support for nhrp support with json.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-03-13 16:58:14 +01:00
Philippe Guibert
87b9e98203 nhrpd: add json support to show nhrp vty commands
- add json support for show nhrp vty commands.
- support for 'show dmvpn [json]' format.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-03-13 16:58:14 +01:00
Philippe Guibert
fe0c4ed7ba 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>
2020-03-13 16:38:33 +01:00
Donald Sharp
0886f49ea9
Merge pull request #5972 from rubenk/eigrpd-remove-workaround-for-old-openbsd
eigrpd: stop checking for ancient OpenBSD
2020-03-13 07:20:20 -04:00
Donald Sharp
f61182b931
Merge pull request #5985 from Naveenaidu/5984-cleanup-is_selfroute
zebra/rt_netlink.c: Clean is_selfroute function
2020-03-12 19:19:53 -04:00
Donald Sharp
302f6c891b
Merge pull request #5991 from pguibert6WIND/bfd_corner_bgp_update_source
bgpd: upon reconfiguration or bgp exchange failure, stop bfd.
2020-03-12 13:31:22 -04:00
Sri Mohana Singamsetty
9766604161
Merge pull request #5827 from donaldsharp/missed_upstreaming
Missed upstreaming
2020-03-12 09:27:26 -07:00
Sri Mohana Singamsetty
10ac2238b1
Merge pull request #5979 from ton31337/fix/convert_to_bool_some_functions
bgpd: Convert type int functions to bool which return 0/1 only
2020-03-12 09:26:21 -07:00
Mark Stapp
864aa5a1cc
Merge pull request #5981 from ton31337/fix/not_necessary_checks
*: Remove tests for some XFREE-family functions
2020-03-12 09:45:55 -04:00
Mark Stapp
312785ddf1
Merge pull request #5974 from donaldsharp/ldp_ifindex_missed
ldpd: During code inspection we are mixing data sizes
2020-03-12 08:58:38 -04:00
Philippe Guibert
7b3ec88871 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>
2020-03-12 13:42:48 +01:00
Sarita Patra
fe75a058eb 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>
2020-03-11 23:33:06 -07:00
Ghasem Naddaf
5f36c26c5f nhrpd: resolve formatting warnings
Signed-off-by: Ghasem Naddaf <gshirazi@infoblox.com>
2020-03-11 12:50:10 -07:00
Sri Mohana Singamsetty
40963e96de
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
2020-03-11 12:21:58 -07:00
Naveen Naidu
6a6d11a33b 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>
2020-03-12 00:37:21 +05:30
Donald Sharp
2ff6f38eaa
Merge pull request #5973 from rubenk/ospfd-fix-wrong-operator
ospfd: fix range check for metric
2020-03-11 13:09:40 -04:00
Donald Sharp
43319a4b17
Merge pull request #5975 from rubenk/zebra-use-modern-function-definition
zebra: use modern C function definition
2020-03-11 13:09:18 -04:00
Ghasem Naddaf
31384f929a Merge branch 'master' into nhrp_bugfix 2020-03-11 09:50:54 -07:00
Donatas Abraitis
8fa77bc6f4 *: Remove tests for some XFREE-family functions
XFREE() covers that.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-11 18:16:23 +02:00
Donatas Abraitis
3967f0a857 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>
2020-03-11 17:09:47 +02:00
Donald Sharp
3207792e8b
Merge pull request #5966 from rubenk/isisd-fix-build-warnings
isisd: fix a bunch of build warnings with GCC 10
2020-03-11 10:45:07 -04:00
Ruben Kerkhof
556181e68e build: Add Python 3.8
Fixes detection of python on OpenBSD

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-11 14:56:10 +01:00
Ruben Kerkhof
99e7ab12cf 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>
2020-03-11 14:06:34 +01:00
Donald Sharp
6cd8093d32 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>
2020-03-11 09:03:17 -04:00
Ruben Kerkhof
1fdc969f7b ospfd: fix range check for metric
Found with -Wlogical-op

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-11 13:56:26 +01:00
Ruben Kerkhof
1dcdfaa4f0 eigrpd: stop checking for ancient OpenBSD
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-11 13:31:13 +01:00
Ruben Kerkhof
f616c954f8 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>
2020-03-11 12:30:47 +01:00
Ruben Kerkhof
31d7b6daee 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>
2020-03-11 12:09:13 +01:00
Ruben Kerkhof
7075f6a058 build: quote the right hand side of tests too
For consistency

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2020-03-11 11:53:15 +01:00