]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
3 years agoRevert "bgpd: peer / peer group dampening profiles"
Igor Ryzhov [Mon, 2 Aug 2021 10:26:58 +0000 (13:26 +0300)]
Revert "bgpd: peer / peer group dampening profiles"

This reverts commit 40ec3340be9cdda62eea349fe9ee21e65156f422.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "bgpd: vtysh commands for peer/group dampening profiles"
Igor Ryzhov [Mon, 2 Aug 2021 10:19:10 +0000 (13:19 +0300)]
Revert "bgpd: vtysh commands for peer/group dampening profiles"

This reverts commit 0221327c75d370648d20c2bc4d281c23f5738f74.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "bgpd: Do not output peer doppleganger dampened output"
Igor Ryzhov [Mon, 2 Aug 2021 10:43:28 +0000 (13:43 +0300)]
Revert "bgpd: Do not output peer doppleganger dampened output"

This reverts commit 783492c7cdeaca5c73fb2debaeaa0b378ee734de.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "bgpd: Consolidate dampening show run output with the rest of that code"
Igor Ryzhov [Mon, 2 Aug 2021 10:42:56 +0000 (13:42 +0300)]
Revert "bgpd: Consolidate dampening show run output with the rest of that code"

This reverts commit 39d8dd2d176e26cff9c62f48048b18cf4df9168a.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "doc: user doc for route-flap dampening commands"
Igor Ryzhov [Mon, 2 Aug 2021 10:17:42 +0000 (13:17 +0300)]
Revert "doc: user doc for route-flap dampening commands"

This reverts commit 54b34709f8603be3f7d13ae224aa8cade49b1741.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "tests: topotests for route-flap dampening"
Igor Ryzhov [Mon, 2 Aug 2021 10:15:45 +0000 (13:15 +0300)]
Revert "tests: topotests for route-flap dampening"

This reverts commit cd32a1a4eecf2a29dbfd2493573f7473e20096d9.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "bgpd: clear ip bgp dampening was not triggering the route calculation for...
Igor Ryzhov [Mon, 2 Aug 2021 10:05:22 +0000 (13:05 +0300)]
Revert "bgpd: clear ip bgp dampening was not triggering the route calculation for the prefix"

This reverts commit c8ddbd48040be6bf33c4f0ab3e470f290f9b165a.

3 years agoRevert "bgpd: Remove useless reuselist_node assignment before while loop"
Igor Ryzhov [Mon, 2 Aug 2021 10:01:48 +0000 (13:01 +0300)]
Revert "bgpd: Remove useless reuselist_node assignment before while loop"

This reverts commit 53048d33d124e60ce01ae6bf149ae03561930694.

3 years agoRevert "bgpd: Do not test against bdc again since we already validated"
Igor Ryzhov [Mon, 2 Aug 2021 10:01:44 +0000 (13:01 +0300)]
Revert "bgpd: Do not test against bdc again since we already validated"

This reverts commit 63fc789a109cf5e086d7494cea7a9f516550839c.

3 years agoRevert "bgpd: fix double free in dampening code"
Igor Ryzhov [Mon, 2 Aug 2021 10:01:38 +0000 (13:01 +0300)]
Revert "bgpd: fix double free in dampening code"

This reverts commit 96d6b8cc29bf5124ae93433ecfc16b3fd69be5ea.

3 years agoRevert "bgpd: Drop double-pointer for bgp_damp_info_free()"
Igor Ryzhov [Mon, 2 Aug 2021 10:01:32 +0000 (13:01 +0300)]
Revert "bgpd: Drop double-pointer for bgp_damp_info_free()"

This reverts commit 19971c9a9218b31e6e1c3f7ebb23654f833bb4ef.

3 years agoRevert "bgpd: fix missing list add in dampening"
Igor Ryzhov [Mon, 2 Aug 2021 10:01:26 +0000 (13:01 +0300)]
Revert "bgpd: fix missing list add in dampening"

This reverts commit cd58568b1889df753aa258ee61b6d949b1ce6fb9.

3 years agoRevert "bgpd: fix incorrect usage of slist in dampening"
Igor Ryzhov [Mon, 2 Aug 2021 10:01:18 +0000 (13:01 +0300)]
Revert "bgpd: fix incorrect usage of slist in dampening"

This reverts commit 5054cfcbbc8c776a91e9390d36cff891d0890b4f.

3 years agoRevert "bgpd: cleanup bgp_damp_info_free"
Igor Ryzhov [Mon, 2 Aug 2021 10:01:06 +0000 (13:01 +0300)]
Revert "bgpd: cleanup bgp_damp_info_free"

This reverts commit 97766ac8aa40ff8868a854ba8515c9e6441e4b7c.

3 years agoRevert "bgpd: fix missing damp info free when cleaning bgp path"
Igor Ryzhov [Mon, 2 Aug 2021 10:33:09 +0000 (13:33 +0300)]
Revert "bgpd: fix missing damp info free when cleaning bgp path"

This reverts commit 4538f89552a01e6ab3504f8a59ef156b9a14ce1c.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9264 from ak503/nhrp_fix
Russ White [Tue, 3 Aug 2021 17:42:48 +0000 (13:42 -0400)]
Merge pull request #9264 from ak503/nhrp_fix

nhrp: fix display of nhs command.

3 years agoMerge pull request #9164 from pguibert6WIND/flowspec_vrflite_shortcut
Russ White [Tue, 3 Aug 2021 13:31:17 +0000 (09:31 -0400)]
Merge pull request #9164 from pguibert6WIND/flowspec_vrflite_shortcut

bgpd: flowspec redirect vrf uses vrf table instead of allocated table id

3 years agoMerge pull request #9191 from idryzhov/rip-auth
Russ White [Tue, 3 Aug 2021 13:29:09 +0000 (09:29 -0400)]
Merge pull request #9191 from idryzhov/rip-auth

ripd: fix authentication key length

3 years agoMerge pull request #9231 from idryzhov/zebra-rmap-set-src
Russ White [Tue, 3 Aug 2021 13:22:18 +0000 (09:22 -0400)]
Merge pull request #9231 from idryzhov/zebra-rmap-set-src

zebra: remove checks for src address existence when using "set src"

3 years agoMerge pull request #9239 from idryzhov/ospf-passive-fix
Russ White [Tue, 3 Aug 2021 13:21:14 +0000 (09:21 -0400)]
Merge pull request #9239 from idryzhov/ospf-passive-fix

ospfd: fix "no ip ospf passive" command

3 years agoMerge pull request #9243 from ton31337/fix/revert_db0e636dc45f9bd2c76528a8368332c56f2...
Russ White [Tue, 3 Aug 2021 13:20:16 +0000 (09:20 -0400)]
Merge pull request #9243 from ton31337/fix/revert_db0e636dc45f9bd2c76528a8368332c56f2c8f1e

bgpd: Revert a couple of BGP dampening related commits

3 years agoMerge pull request #9249 from ton31337/fix/dont_capability
Russ White [Tue, 3 Aug 2021 13:14:27 +0000 (09:14 -0400)]
Merge pull request #9249 from ton31337/fix/dont_capability

bgpd: Use strict AS4 capability when processing parsing/generating pkts

3 years agoMerge pull request #9259 from opensourcerouting/moar-json
Russ White [Tue, 3 Aug 2021 13:13:12 +0000 (09:13 -0400)]
Merge pull request #9259 from opensourcerouting/moar-json

*: can't get enough JSON

3 years agonhrp: fix display of nhs command.
Dmitrii Turlupov [Tue, 3 Aug 2021 11:00:24 +0000 (14:00 +0300)]
nhrp: fix display of nhs command.

Before:
ip nhrp nhs dynamicnbma 192.168.1.1

After:
ip nhrp nhs dynamic nbma 192.168.1.1

Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
3 years agoMerge pull request #9056 from askorichenko/test-dont-capability
Russ White [Tue, 3 Aug 2021 10:59:56 +0000 (06:59 -0400)]
Merge pull request #9056 from askorichenko/test-dont-capability

bgpd: Clear capabilities field when resetting a bgp neighbor

3 years agoMerge pull request #9258 from mjstapp/fix_rule_strlcpy
Donatas Abraitis [Tue, 3 Aug 2021 06:12:38 +0000 (09:12 +0300)]
Merge pull request #9258 from mjstapp/fix_rule_strlcpy

zebra: use strlcpy in dplane_rule_init

3 years agoMerge pull request #9232 from idryzhov/interface-node-cleanup
Renato Westphal [Tue, 3 Aug 2021 00:13:29 +0000 (21:13 -0300)]
Merge pull request #9232 from idryzhov/interface-node-cleanup

*: cleanup interface node installation

3 years agolib: add "json" option to "show ip[v6] prefix-list"
Renato Westphal [Mon, 2 Aug 2021 18:38:26 +0000 (15:38 -0300)]
lib: add "json" option to "show ip[v6] prefix-list"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agozebra: add "json" option to "show interface"
Renato Westphal [Mon, 2 Aug 2021 18:38:26 +0000 (15:38 -0300)]
zebra: add "json" option to "show interface"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agolib: add "json" option to "show route-map"
Renato Westphal [Mon, 2 Aug 2021 18:38:26 +0000 (15:38 -0300)]
lib: add "json" option to "show route-map"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agolib: add "json" option to "show ip[v6] access-list"
Renato Westphal [Mon, 2 Aug 2021 18:38:26 +0000 (15:38 -0300)]
lib: add "json" option to "show ip[v6] access-list"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agobgpd: add "json" option to "show bgp as-path-access-list"
Renato Westphal [Mon, 2 Aug 2021 18:38:26 +0000 (15:38 -0300)]
bgpd: add "json" option to "show bgp as-path-access-list"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agozebra: use strlcpy in dplane_rule_init
Mark Stapp [Mon, 2 Aug 2021 16:35:50 +0000 (12:35 -0400)]
zebra: use strlcpy in dplane_rule_init

Use strlcpy for safety in dplane rule init api.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agoMerge pull request #9255 from ton31337/fix/bgp_max_packet_size_no_capabilities
Donald Sharp [Mon, 2 Aug 2021 16:11:24 +0000 (12:11 -0400)]
Merge pull request #9255 from ton31337/fix/bgp_max_packet_size_no_capabilities

bgpd: Set extended msg size only if we advertised and received capability

3 years agozebra: remove checks for src address existence when using "set src"
Igor Ryzhov [Thu, 29 Jul 2021 17:21:00 +0000 (20:21 +0300)]
zebra: remove checks for src address existence when using "set src"

1. This check is absolutely useless. Nothing keeps user from deleting
   the address right after this check.
2. This check prevents zebra from correctly reading the user config with
   "set src" because of a race with interface startup (see #4249).
3. NO OPERATIONAL DATA USAGE ON VALIDATION STAGE.

Fixes #7319.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9238 from leonshaw/fix/netns-delete
Igor Ryzhov [Mon, 2 Aug 2021 15:12:19 +0000 (18:12 +0300)]
Merge pull request #9238 from leonshaw/fix/netns-delete

lib, zebra: Preserve user-configured VRF on netns deletion

3 years agoMerge pull request #8982 from dlqs/lua-func-stack
Quentin Young [Mon, 2 Aug 2021 13:51:35 +0000 (13:51 +0000)]
Merge pull request #8982 from dlqs/lua-func-stack

3 years agoMerge pull request #9211 from donaldsharp/revert_logic_changes
Mark Stapp [Mon, 2 Aug 2021 12:34:55 +0000 (08:34 -0400)]
Merge pull request #9211 from donaldsharp/revert_logic_changes

lib: prevent crash in make check in some situations

3 years agobgpd: Set extended msg size only if we advertised and received capability
Donatas Abraitis [Mon, 2 Aug 2021 05:59:24 +0000 (08:59 +0300)]
bgpd: Set extended msg size only if we advertised and received capability

If we don't advertise any capabilities (dont-capability-negotiate), we
shouldn't set msg size to 65k only if received this capability from another
peer.

Before:

```
~/frr# vtysh -c 'show ip bgp update-group' | grep 'Max packet size'
    Max packet size: 65535
```

After:

```
~/frr# vtysh -c 'show ip bgp update-group' | grep 'Max packet size'
    Max packet size: 4096
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: flowspec redirect vrf uses vrf table instead of allocated table id
Philippe Guibert [Fri, 26 Mar 2021 09:48:38 +0000 (10:48 +0100)]
bgpd: flowspec redirect vrf uses vrf table instead of allocated table id

Until now, when bgp flowspec entry action was to redirect to a vrf, a
default route was installed in a specific table. that route was a vrf
route leak one. The process can be simplified, as vrf-lite already
has a table identifier. Actually, because policy routing is used to
redirect traffic to a defined table (with ip rule command), use
the table identifier of the VRF.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agotests: Check if BGP connection established if using no capabilities adv
Donatas Abraitis [Sun, 1 Aug 2021 06:44:27 +0000 (09:44 +0300)]
tests: Check if BGP connection established if using no capabilities adv

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Use strict AS4 capability when processing parsing/generating pkts
Donatas Abraitis [Sun, 1 Aug 2021 06:29:31 +0000 (09:29 +0300)]
bgpd: Use strict AS4 capability when processing parsing/generating pkts

PeerA sets `dont-capability-negotiate` for PeerB. It does not send any
capabilities to PeerB. This leads to situation when PeerA received AS4 cap,
while it doesn't send AS4 to PeerB and tries parsing AS_PATH using 32bits.

[GTTPK-RX2GP][EC 33554436] Malformed AS path from 192.168.0.2, length is 4
[SM0KX-WXMGK] bgp_attr_malformed: attributes: , origin ?
[P7TRR-4J6XT][EC 33554487] 192.168.0.2: Attribute AS_PATH, parse error - treating as withdrawal
[WX70K-6XXVF][EC 33554454] 192.168.0.2 rcvd UPDATE with errors in attr(s)!! Withdrawing route.
[Z2KFR-ZGJC8] 192.168.0.2 rcvd UPDATE w/ attr: , origin ?
[P9VY3-5B6NX] 192.168.0.2 rcvd UPDATE wlen 0 attrlen 80 alen 73
[QMZ79-K2DH7][EC 33554454] 192.168.0.2 [Error] Update packet error (wrong prefix length 64 for afi 1)
[P9SYB-54XRZ][EC 33554454] 192.168.0.2 [Error] Error parsing NLRI
[V1CHF-JSGRR] %NOTIFICATION: sent to neighbor 192.168.0.2 3/10 (UPDATE Message Error/Invalid Network Field) 0 bytes
[HTHRX-GQYGJ][EC 33554454] bgp_process_packet: BGP UPDATE receipt failed for peer: 192.168.0.2

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9244 from LabNConsulting/chopps/fix-bgp-list-test
Donald Sharp [Sun, 1 Aug 2021 01:37:22 +0000 (21:37 -0400)]
Merge pull request #9244 from LabNConsulting/chopps/fix-bgp-list-test

tests: add early interface config for topojson and fix test

3 years agoMerge pull request #9246 from mjstapp/fix_doc_bgp_colons
Donatas Abraitis [Sat, 31 Jul 2021 17:16:39 +0000 (20:16 +0300)]
Merge pull request #9246 from mjstapp/fix_doc_bgp_colons

doc: fix bgp user doc colons

3 years agotests: add early interface config for topojson and fix test
Christian Hopps [Fri, 30 Jul 2021 14:00:27 +0000 (14:00 +0000)]
tests: add early interface config for topojson and fix test

- A more general fix for the bgp listener test which requires interfaces be
configured in the kernel when the bgpd daemons are launched.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9228 from LabNConsulting/chopps/scapy-sendpkt
David Lamparter [Sat, 31 Jul 2021 10:09:40 +0000 (12:09 +0200)]
Merge pull request #9228 from LabNConsulting/chopps/scapy-sendpkt

tests: add scapy_sendpkt.py util, replace arping use with it

3 years agotests: add scapy_sendpkt.py util, replace arping use with it
Christian Hopps [Thu, 29 Jul 2021 05:33:20 +0000 (05:33 +0000)]
tests: add scapy_sendpkt.py util, replace arping use with it

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agodoc: fix bgp user doc
Mark Stapp [Fri, 30 Jul 2021 17:54:01 +0000 (13:54 -0400)]
doc: fix bgp user doc

Too many colons in the bgp doc source file.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agoMerge pull request #9196 from donaldsharp/test_queued
Donatas Abraitis [Fri, 30 Jul 2021 15:05:45 +0000 (18:05 +0300)]
Merge pull request #9196 from donaldsharp/test_queued

tests: Increase timeout for loaded systems

3 years agoRevert "bgpd: fix memory leak in dampening"
Donatas Abraitis [Fri, 30 Jul 2021 13:50:37 +0000 (16:50 +0300)]
Revert "bgpd: fix memory leak in dampening"

This reverts commit 322e1085fe52540261864bd73a3ecdb37f7203d3.

3 years agoRevert "bgpd: fix missing delete from the list in dampening"
Donatas Abraitis [Fri, 30 Jul 2021 13:50:05 +0000 (16:50 +0300)]
Revert "bgpd: fix missing delete from the list in dampening"

This reverts commit 755a977b8aef231bae28994159eef2ffcfd5b599.

3 years agoRevert "bgpd: use double-linked list instead of single-linked list in dampening"
Donatas Abraitis [Fri, 30 Jul 2021 13:48:36 +0000 (16:48 +0300)]
Revert "bgpd: use double-linked list instead of single-linked list in dampening"

Tested with full feed, this stucks and bgpd even stops responding.

```
[T58XM-TP956][EC 268435457] bgpd state -> unresponsive : no response yet to ping sent 90 seconds ago
```

This reverts commit db0e636dc45f9bd2c76528a8368332c56f2c8f1e.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9214 from donaldsharp/assert_cleanup
Mark Stapp [Fri, 30 Jul 2021 13:21:46 +0000 (09:21 -0400)]
Merge pull request #9214 from donaldsharp/assert_cleanup

zebra: bugfix of error quit of zebra, due to no nexthop ACTIVE

3 years agoMerge pull request #9217 from idryzhov/bgp-damp-leaks
Donatas Abraitis [Fri, 30 Jul 2021 12:19:31 +0000 (15:19 +0300)]
Merge pull request #9217 from idryzhov/bgp-damp-leaks

bgpd: fix various memory leaks in dampening

3 years agoospfd: fix "no ip ospf passive" command
Igor Ryzhov [Fri, 30 Jul 2021 11:11:33 +0000 (14:11 +0300)]
ospfd: fix "no ip ospf passive" command

This command is currently always treated as an "unset" command, assuming
that active is the default type of the interface. In reality, the default
type of the interface can be changed using "passive-interface default"
command. Both "no" and regular commands can be "set" commands, depending
on the default value. They are treated as an "unset" when there's already
a config of the opposite type.

All this logic is in ospf_passive_interface_update.

Fixes #9240.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9028 from mobash-rasool/ospfv3-asbr-summarisation
Russ White [Fri, 30 Jul 2021 10:37:50 +0000 (06:37 -0400)]
Merge pull request #9028 from mobash-rasool/ospfv3-asbr-summarisation

Ospfv3 ASBR summarisation feature

3 years agoMerge pull request #9237 from donaldsharp/code_block
Donatas Abraitis [Fri, 30 Jul 2021 07:18:14 +0000 (10:18 +0300)]
Merge pull request #9237 from donaldsharp/code_block

doc: Fix code-block display for example shell commands

3 years agolib, zebra: Preserve user-configured VRF on netns deletion
Xiao Liang [Fri, 30 Jul 2021 05:00:06 +0000 (13:00 +0800)]
lib, zebra: Preserve user-configured VRF on netns deletion

Don't clear VRF's user-configured flag when netns is deleted.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
3 years agodoc: Fix code-block display for example shell commands
Donald Sharp [Fri, 30 Jul 2021 01:42:06 +0000 (21:42 -0400)]
doc: Fix code-block display for example shell commands

the code-block was jumbled and not displaying properly.

Reported by: Drew Bloechl
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: use double-linked list instead of single-linked list in dampening
Igor Ryzhov [Thu, 29 Jul 2021 12:31:34 +0000 (15:31 +0300)]
bgpd: use double-linked list instead of single-linked list in dampening

This code always used double-linked list before this rework in 8.0 that
introduced all these crashes and memory leaks. Using single-linked list
is actually a performance regression, because there are frequent removes
here and single-linked list obviously handles removes much worse.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix missing damp info free when cleaning bgp path
Igor Ryzhov [Wed, 28 Jul 2021 22:54:03 +0000 (01:54 +0300)]
bgpd: fix missing damp info free when cleaning bgp path

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix missing delete from the list in dampening
Igor Ryzhov [Wed, 28 Jul 2021 22:43:59 +0000 (01:43 +0300)]
bgpd: fix missing delete from the list in dampening

When bgp_damp_info_free is called from bgp_route.c, we were never
deleting the BDI from the list.

Move the deletion inside bgp_damp_info_free to cover all cases.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: cleanup bgp_damp_info_free
Igor Ryzhov [Wed, 28 Jul 2021 22:39:38 +0000 (01:39 +0300)]
bgpd: cleanup bgp_damp_info_free

bgp_damp_config, afi and safi are never used.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix memory leak in dampening
Igor Ryzhov [Wed, 28 Jul 2021 22:27:18 +0000 (01:27 +0300)]
bgpd: fix memory leak in dampening

bdi->path is never NULL, therefore the structure was never freed.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix incorrect usage of slist in dampening
Igor Ryzhov [Wed, 28 Jul 2021 22:17:50 +0000 (01:17 +0300)]
bgpd: fix incorrect usage of slist in dampening

Current code is a complete misuse of SLIST structure. Instead of just
adding a SLIST_ENTRY to struct bgp_damp_info, it allocates a separate
structure to be a node in the list.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9216 from donaldsharp/simple_snmp_fix
Russ White [Thu, 29 Jul 2021 19:04:49 +0000 (15:04 -0400)]
Merge pull request #9216 from donaldsharp/simple_snmp_fix

tests: Set addresses before we use snmpd

3 years agoMerge pull request #9225 from idryzhov/bgp-damp-list-readd
Russ White [Thu, 29 Jul 2021 19:03:17 +0000 (15:03 -0400)]
Merge pull request #9225 from idryzhov/bgp-damp-list-readd

bgpd: fix missing list add in dampening

3 years agoMerge pull request #9193 from mobash-rasool/ospfv3-bug-fixes
Russ White [Thu, 29 Jul 2021 19:00:55 +0000 (15:00 -0400)]
Merge pull request #9193 from mobash-rasool/ospfv3-bug-fixes

ospf6d: Type-7 LSA originated with wrong sequence number

3 years ago*: cleanup interface node installation
Igor Ryzhov [Thu, 29 Jul 2021 18:34:56 +0000 (21:34 +0300)]
*: cleanup interface node installation

The only difference in daemons' interface node definition is the config
write function. No need to define the node in every daemon, just pass
the callback as an argument to a library function and define the node
there.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9222 from ton31337/fix/bgp_dampening_clear
Igor Ryzhov [Thu, 29 Jul 2021 15:28:06 +0000 (18:28 +0300)]
Merge pull request #9222 from ton31337/fix/bgp_dampening_clear

bgpd: Drop double-pointer for bgp_damp_info_free()

3 years agobgpd: fix missing list add in dampening
Igor Ryzhov [Thu, 29 Jul 2021 11:42:16 +0000 (14:42 +0300)]
bgpd: fix missing list add in dampening

One more crash in dampening code...

When bgp_damp_withdraw is called, if there's already a BDI structure,
bgp_damp_info_claim is called to re-assign the bdi->config in case it
was changed. The problem is that bgp_damp_info_claim actually removes
the BDI from the reuse list of the old config and never adds it to the
reuse list of the new config. We must do this to prevent the crash
because all the code assumes that BDI is always in some list.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9212 from idryzhov/pim-crash
Rafael Zalamena [Thu, 29 Jul 2021 10:10:29 +0000 (07:10 -0300)]
Merge pull request #9212 from idryzhov/pim-crash

pimd: fix missing list remove when deleting mesh group

3 years agoMerge pull request #9215 from idryzhov/bgp-damp-crash
Donatas Abraitis [Thu, 29 Jul 2021 08:47:56 +0000 (11:47 +0300)]
Merge pull request #9215 from idryzhov/bgp-damp-crash

bgpd: fix double free in dampening code

3 years agobgpd: Drop double-pointer for bgp_damp_info_free()
Donatas Abraitis [Thu, 29 Jul 2021 08:11:15 +0000 (11:11 +0300)]
bgpd: Drop double-pointer for bgp_damp_info_free()

This causes a crash using `clear ip bgp dampening <prefix>`.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9207 from donaldsharp/snmp_pytest_mark
Donatas Abraitis [Thu, 29 Jul 2021 08:09:26 +0000 (11:09 +0300)]
Merge pull request #9207 from donaldsharp/snmp_pytest_mark

Snmp pytest mark

3 years agoMerge pull request #9209 from donaldsharp/bgp_ipv6_unicast
Donatas Abraitis [Thu, 29 Jul 2021 07:30:32 +0000 (10:30 +0300)]
Merge pull request #9209 from donaldsharp/bgp_ipv6_unicast

bgpd: Mark the node as the correct type for bgp ipv6 unicast

3 years agodocs: update parens
Donald Lee [Wed, 28 Jul 2021 21:51:58 +0000 (05:51 +0800)]
docs: update parens

Signed-off-by: Donald Lee <dlqs@gmx.com>
3 years agolib: Add parens around macro args
Donald Lee [Wed, 28 Jul 2021 21:50:21 +0000 (05:50 +0800)]
lib: Add parens around macro args

Signed-off-by: Donald Lee <dlqs@gmx.com>
3 years agolib: Fix condition for snprintf
Donald Lee [Wed, 28 Jul 2021 21:41:09 +0000 (05:41 +0800)]
lib: Fix condition for snprintf

Signed-off-by: Donald Lee <dlqs@gmx.com>
3 years agobgpd: fix double free in dampening code
Igor Ryzhov [Wed, 28 Jul 2021 21:14:31 +0000 (00:14 +0300)]
bgpd: fix double free in dampening code

bgp_damp_info_unclaim already calls bgp_reuselist_del. We must not call
it again here.

Fixes #9046.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: Set addresses before we use snmpd
Donald Sharp [Wed, 28 Jul 2021 20:25:54 +0000 (16:25 -0400)]
tests: Set addresses before we use snmpd

The test_simple_snmp.py test starts bgp, zebra and snmpd at the
same time.  Then zebra configuration is read in and interface
addresses are applied.  If snmp start slower than zebra
the snmp process can properly get it's ip address to bind to
if it is faster than zebra, it will fail.  Ensure that the
test has addresses before we start daemons.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: bugfix of error quit of zebra, due to no nexthop ACTIVE
batmancn [Mon, 30 Nov 2020 12:04:44 +0000 (20:04 +0800)]
zebra: bugfix of error quit of zebra, due to no nexthop ACTIVE

There exists some rare situations where fpm will attempt
to send a route update with no valid nexthops.  In that
case an assert would be hit.  This is not good for
trying to keep your routing daemons up and running
when we can safely just recover the situation.

Fixes #7588
Signed-off-by: batmancn <batmanustc@gmail.com>
<fixed commit message, and used zlog_err>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopimd: fix missing list remove when deleting mesh group
Igor Ryzhov [Wed, 28 Jul 2021 19:25:31 +0000 (22:25 +0300)]
pimd: fix missing list remove when deleting mesh group

This leads to a crash when you use "show run" after deleting the group.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib: prevent crash in make check in some situations
Donald Sharp [Wed, 28 Jul 2021 18:25:18 +0000 (14:25 -0400)]
lib: prevent crash in make check in some situations

When running `make check` against a build that zeromq enabled
the test_zmq unit test was crashing.  The commit:

e08165def1c62beee0e87385e37ea5f12ca0f9b9

Introduced this crash.  Removing the part of the commit
that was causing the crash in the test.  This is mainly
to get `make check` working again for those people using
zeromq in their builds.

Fixes: #9176
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9104 from idryzhov/topotest-multiline
Donald Sharp [Wed, 28 Jul 2021 15:22:26 +0000 (11:22 -0400)]
Merge pull request #9104 from idryzhov/topotest-multiline

tests: fix invalid multiline format

3 years agobgpd: Mark the node as the correct type for bgp ipv6 unicast
Donald Sharp [Wed, 28 Jul 2021 14:56:48 +0000 (10:56 -0400)]
bgpd: Mark the node as the correct type for bgp ipv6 unicast

The bgp ipv6 unicast node should be called `bgp ipv6 unicast`
to make it consistent with other nodes where we list the afi/safi

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9189 from idryzhov/ospf-dont-exit
Donald Sharp [Wed, 28 Jul 2021 14:05:58 +0000 (10:05 -0400)]
Merge pull request #9189 from idryzhov/ospf-dont-exit

ospfd: don't exit when socket is not created

3 years agoMerge pull request #9194 from idryzhov/pim-bool-false
Donald Sharp [Wed, 28 Jul 2021 14:04:44 +0000 (10:04 -0400)]
Merge pull request #9194 from idryzhov/pim-bool-false

pimd: fix incorrect bool returns

3 years agotests: add pytest.mark.isisd to those tests missing it
Donald Sharp [Wed, 28 Jul 2021 13:44:34 +0000 (09:44 -0400)]
tests: add pytest.mark.isisd to those tests missing it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: add pytest.mark.nhrpd for those missing it
Donald Sharp [Wed, 28 Jul 2021 13:41:45 +0000 (09:41 -0400)]
tests: add pytest.mark.nhrpd for those missing it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add pytest.mark.sharpd for those missing it
Donald Sharp [Wed, 28 Jul 2021 13:40:58 +0000 (09:40 -0400)]
tests: Add pytest.mark.sharpd for those missing it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: add pytest.mark.staticd for those tests missing it
Donald Sharp [Wed, 28 Jul 2021 13:39:47 +0000 (09:39 -0400)]
tests: add pytest.mark.staticd for those tests missing it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add pytest.mark.pimd for those missing it
Donald Sharp [Wed, 28 Jul 2021 13:38:06 +0000 (09:38 -0400)]
tests: Add pytest.mark.pimd for those missing it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add pytest.mark.bgpd for tests missing this mark
Donald Sharp [Wed, 28 Jul 2021 13:37:28 +0000 (09:37 -0400)]
tests: Add pytest.mark.bgpd for tests missing this mark

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add pytest.mark.ospfd on tests missing this mark
Donald Sharp [Wed, 28 Jul 2021 13:36:30 +0000 (09:36 -0400)]
tests: Add pytest.mark.ospfd on tests missing this mark

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Add pytestmark to get all snmp tests marked
Donald Sharp [Wed, 28 Jul 2021 12:31:30 +0000 (08:31 -0400)]
tests: Add pytestmark to get all snmp tests marked

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9202 from LabNConsulting/chopps/fix-ospf-quotes
Renato Westphal [Wed, 28 Jul 2021 01:40:51 +0000 (22:40 -0300)]
Merge pull request #9202 from LabNConsulting/chopps/fix-ospf-quotes

ospfd: remove gratuitous non-ascii quotation marks

3 years agoMerge pull request #9007 from donaldsharp/pbr_stuff
Jafar Al-Gharaibeh [Tue, 27 Jul 2021 20:09:29 +0000 (15:09 -0500)]
Merge pull request #9007 from donaldsharp/pbr_stuff

add ability to match on proto to pbr

3 years agoospfd: remove gratuitous non-ascii quotation marks
Christian Hopps [Mon, 26 Jul 2021 06:48:50 +0000 (06:48 +0000)]
ospfd: remove gratuitous non-ascii quotation marks

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9187 from mobash-rasool/pim-upst-2
Igor Ryzhov [Tue, 27 Jul 2021 14:24:32 +0000 (17:24 +0300)]
Merge pull request #9187 from mobash-rasool/pim-upst-2

pimd: Validate the fields before accessing it