Commit Graph

21724 Commits

Author SHA1 Message Date
Rafael Zalamena
a29c51a187 lib: notify BFD when adding new profile
When a BFD integrated session already exists setting the profile
doesn't cause a session update (or vice versa): fix this issue by
handling the other cases.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-11-08 12:06:32 -03:00
Rafael Zalamena
270f9c682c bfdd: missing BFD integration debug value
Show the TTL value sent by the routing protocol.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-11-08 12:06:32 -03:00
Rafael Zalamena
4b983eef2c bfdd,lib: simplify integration protocol
Let the integration protocol always send the full configuration
instead of saving a few bytes. It will also allow protocols to specify
source address for IPv4 single hop connections and interface for multi
hop configuration.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-11-08 12:06:32 -03:00
Donald Sharp
9929134ab8
Merge pull request #7486 from ton31337/fix/bgp_debug_keepalives_docstring
bgpd: Correct CLI description for `debug bgp keepalives`
2020-11-07 19:20:15 -05:00
Donatas Abraitis
2e1bc8cf41
Merge pull request #7462 from qlyoung/fix-misc-doc-issues
Fix misc doc issues
2020-11-07 17:26:46 +02:00
Donatas Abraitis
6084908ec8
Merge pull request #7477 from chiragshah6/yang_dev
bgpd: fix compiler warnings in nbr cmd
2020-11-07 17:25:37 +02:00
Donatas Abraitis
bc6bc7a8de bgpd: Correct CLI description for debug bgp keepalives
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-11-07 17:24:21 +02:00
Donatas Abraitis
e114e3278d
Merge pull request #7480 from donaldsharp/bgp_defer_bad_donald
bgpd: Fix mistakes in defer working
2020-11-07 12:21:27 +02:00
Donatas Abraitis
89fccd9341
Merge pull request #7470 from donaldsharp/bgp_group
bgpd: Actually return the group peer
2020-11-07 12:19:47 +02:00
Donald Sharp
6338d24218 bgpd: Fix mistakes in defer working
Commit: 26742171e6

Mistakenly reversed the logic for the test on the list length
when it was removed.  Fix this.

Additionally limit for loop to stop when we know there are no
more items to process that have the BGP_NODE_SELECT_DEFER flag.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-06 19:13:59 -05:00
Donald Sharp
3bb43118ec
Merge pull request #7473 from eololab/fix-crash-bfdd-show-counters-json
bfdd: fix crash on show bfd peers counters json
2020-11-06 18:40:07 -05:00
Chirag Shah
555c8ab7ad bgpd: fix compiler warnings in nbr cmd
Addressed the gcc-10 buffer overflow warnings.
Put a sanity check of not using prefix for
neighbor update-source with interface option.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-11-06 11:43:36 -08:00
Emanuele Bovisio
1d923374f6 bfdd: fix crash on show bfd peers counters json
wrong pointer passed to bfd_id_iterate function

Signed-off-by: Emanuele Bovisio <emanuele.bovisio@eolo.it>
2020-11-06 17:34:56 +01:00
Olivier Dugeon
6403fc8725
Merge pull request #7385 from opensourcerouting/isisd-prefix-sid-collision
isisd: detect Prefix-SID collisions and handle them  appropriately
2020-11-06 12:21:37 +01:00
Donald Sharp
164f94a452
Merge pull request #7466 from idryzhov/fix-bfd-null-deref
bfdd: fix possible null dereference
2020-11-05 20:54:02 -05:00
Donald Sharp
e5209541f2 bgpd: Actually return the group peer
The code is returning the group peer data structure, which
is what is happening but we should not have assignment statements
in this return statement for a `struct peer *` return.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-05 20:44:31 -05:00
Russ White
9f6c4d4d16
Merge pull request #7227 from chiragshah6/yang_dev
bgpd, yang : neighbor and peer-group config cmds to transactional clis
2020-11-05 14:32:39 -05:00
Donald Sharp
9811fcdca3
Merge pull request #7137 from kssoman/ospf
ospf6d : Intra area route for connected prefix not installed
2020-11-05 11:57:50 -05:00
Igor Ryzhov
1db60b576b bfdd: fix possible null dereference
bs->ifp may be null, so we should check it before dereferencing.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-11-05 19:46:27 +03:00
Mark Stapp
f52e45dbdb
Merge pull request #7459 from donaldsharp/clang_more_stuff_to_cleanup
Clang more stuff to cleanup
2020-11-05 08:25:40 -05:00
Russ White
40ef77c702
Merge pull request #7423 from donaldsharp/route_list
bgpd: Remove pointer structure from `struct bgp_dest`
2020-11-05 07:29:54 -05:00
Donald Sharp
56c226e773 bgpd: Cleanup memory leaks associated with t_router_timer
We are allocating temporary memory for information about
what to process in this thread, which is not being cleaned
up on thread cancelling.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-04 21:02:57 -05:00
Quentin Young
4eddb67834 doc: add crosslink to developer docs
for source build instructions

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-11-04 17:33:17 -05:00
Quentin Young
d7432defac doc: explain integrated config
This is poorly documented and confusing to users

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-11-04 17:29:58 -05:00
Quentin Young
3ea3aff99d doc: add troubleshooting info for vrrp
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-11-04 17:21:33 -05:00
Russ White
898fde3c1d
Merge pull request #7456 from donaldsharp/flowspec_issues
Rules and why they are made to be broken
2020-11-04 15:41:35 -05:00
Donald Sharp
26742171e6 bgpd: Remove pointer structure from struct bgp_dest
The `struct listnode *rt_node` data structure is adding
8 bytes of size to the `struct bgp_dest`.  This is a large
amount of data for a flag we are already setting on each
node for this.  Just set the flag and use that to figure
out who we are doing graceful restart on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-04 15:18:01 -05:00
Renato Westphal
e02c9b9f8f isisd: update more northbound callbacks to new error handling model
This is a second iteration of commit 10bdc68f0c. Some recent
commits introduced zlog calls in the northbound callbacks
inadvertently.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-11-04 17:12:30 -03:00
Renato Westphal
2f7cc7bcd3 isisd: detect Prefix-SID collisions and handle them appropriately
isisd relies on its YANG module to prevent the same SID index
from being configured multiple times for different prefixes. It's
possible, however, to have different routers assigning the same SID
index for different prefixes. When that happens, we say we have a
Prefix-SID collision, which is ultimately a misconfiguration issue.

The problem with Prefix-SID collisions is that the Prefix-SID that
is processed later overwrites the previous ones. Then, once the
Prefix-SID collision is fixed in the configuration, the overwritten
Prefix-SID isn't reinstalled since it's already marked as installed
and it didn't change. To prevent such inconsistency from happening,
add a safeguard in the SPF code to detect Prefix-SID collisions and
handle them appropriately (i.e. log a warning + ignore the Prefix-SID
Sub-TLV since it's already in use by another prefix). That way,
once the configuration is fixed, no Prefix-SID label entry will be
missing in the LFIB.

Reported-by: Emanuele Di Pascale <emanuele@voltanet.io>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-11-04 17:12:30 -03:00
Renato Westphal
28315916a2 isisd: fix build errors when EXTREME_DEBUG is defined
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-11-04 17:12:30 -03:00
Donald Sharp
9535a960a8
Merge pull request #7443 from opensourcerouting/gcc-10-plugin-ice
tools/gcc-frr-format: fix ICE in gcc-10
2020-11-04 14:40:32 -05:00
Donald Sharp
9ea714e143 zebra: Rework code to make SA happy
Clan SA was saying:

./zebra/zebra_vty_clippy.c: In function ‘show_route’:
zebra/zebra_vty.c:1775:4: warning: ‘zvrf’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    do_show_ip_route_all(vty, zvrf, afi, !!fib, !!json, tag,
    ^

I do not see a way that zvrf could ever be uninited in the code path
but rearrange the code a tiny bit to make it happier.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-04 11:48:49 -05:00
Donald Sharp
fddbafcc9e ospfd: Cleanup some clang sa issues
This commit tells the compiler we are intentionally ignoring
the lsa value returned and not doing anything with ret.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-04 11:47:57 -05:00
Donald Sharp
e95666cbe2 bgpd: Fix up rule encoding to zebra so it works
Recent changes to the rule encoding that were made
did not get reflected in bgpd.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-04 09:11:53 -05:00
Donald Sharp
c195ae78e9 pbrd: Fix memory leak in json output
Fix a memory leak in using some pbr json commands.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-04 09:11:13 -05:00
Donatas Abraitis
626d165d04
Merge pull request #7447 from donaldsharp/table_stats
bgpd: Allow 1 prefix to generate statistics
2020-11-04 08:46:26 +02:00
Lou Berger
dc7b85a2f9
Merge pull request #7274 from donaldsharp/bgp_best_is_a_path
bgpd: allow bestpath to handle mutliple locally-originated paths
2020-11-03 16:06:48 -05:00
Donald Sharp
2b6b4a54cc bgpd: Allow 1 prefix to generate statistics
When generating a config with 1 prefix:

BGP IPv4 Unicast RIB statistics
Total Advertisements          :            0
Total Prefixes                :            0
Average prefix length         :         0.00
Unaggregateable prefixes      :            0
Maximum aggregateable prefixes:            0
BGP Aggregate advertisements  :            0
Address space advertised      :            0
                  % announced :         0.00
                /8 equivalent :         0.00
               /24 equivalent :         0.00

Advertisements with paths     :            0
Longest AS-Path (hops)        :            0
Average AS-Path length (hops) :         0.00
Largest AS-Path (bytes)       :            0
Average AS-Path size (bytes)  :         0.00
Highest public ASN            :            0
eva# show bgp ipv4 uni summ
BGP router identifier 10.10.3.11, local AS number 329 vrf-id 0
BGP table version 1
RIB entries 1, using 192 bytes of memory
Peers 1, using 23 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
192.168.161.131 4      60000        24        27        0    0    0 00:01:05     (Policy)        1

Total number of neighbors 1

We are not displaying it in the statistics data.  This is because FRR is walking the associated
table and comparing the current dest to the top of the tree.  I have no idea why this is
the case as that when you have 1 prefix you only have 1 node in your tree.  Looking at the
code this is the original code that was imported in 2006.  I cannot think of any reason why
FRR needs to exclude this particular node.

Fixed:
eva# show bgp ipv4 uni summ
BGP router identifier 10.10.3.11, local AS number 329 vrf-id 0
BGP table version 1
RIB entries 1, using 192 bytes of memory
Peers 1, using 23 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
192.168.161.131 4      60000        24        27        0    0    0 00:01:05     (Policy)        1

Total number of neighbors 1
eva# show bgp ipv4 statistics
BGP IPv4 Unicast RIB statistics (VRF default)
Total Advertisements          :            1
Total Prefixes                :            1
Average prefix length         :        32.00
Unaggregateable prefixes      :            1
Maximum aggregateable prefixes:            0
BGP Aggregate advertisements  :            0
Address space advertised      :            1
                  % announced :         0.00
                /8 equivalent :         0.00
               /24 equivalent :         0.00

Advertisements with paths     :            1
Longest AS-Path (hops)        :            0
Average AS-Path length (hops) :         0.00
Largest AS-Path (bytes)       :            0
Average AS-Path size (bytes)  :         0.00
Highest public ASN            :            0
eva#

Fixes: #7422
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-11-03 15:24:03 -05:00
Lou Berger
aeef9fceb4
Merge pull request #7438 from donaldsharp/multipath_no_alloc
bgpd: Multipath is always being allocated
2020-11-03 10:38:03 -05:00
Rafael Zalamena
7c62dc76d4
Merge pull request #7261 from Niral-Networks/niral_dev_vrf_ospf6
ospf6d : Transformation changes for ospf6 vrf support.
2020-11-03 11:59:38 -03:00
Olivier Dugeon
e035e7142e
Merge pull request #6795 from rgirada/ospf_db_json
ospfd: json support for ospf database command.
2020-11-03 15:42:03 +01:00
Olivier Dugeon
24479b70fe
Merge pull request #6922 from rgirada/ospf_summarisation
ospfd: Implementation of ospf external route summarization.
2020-11-03 15:34:36 +01:00
Russ White
7dcd8af024
Merge pull request #7427 from mjstapp/dplane_intf_info
zebra: add optional extra data about routes' interfaces
2020-11-03 07:44:45 -05:00
Russ White
a6b628c27b
Merge pull request #7442 from qlyoung/fix-thread-tracepoint-pointer
lib: fix missed pointer update
2020-11-03 07:39:12 -05:00
Donald Sharp
39926498dd
Merge pull request #7421 from ton31337/fix/default-originate_attributes
bgpd: Respect match operations for default-originate, not only prefixes
2020-11-03 07:16:31 -05:00
Donald Sharp
540f3f8ce9
Merge pull request #7440 from pjdruddy/fix_snmp_doc
doc: fix code snippet for net-snmp
2020-11-02 19:56:23 -05:00
David Lamparter
cd67bcf99a tools/gcc-frr-format: fix ICE in gcc-10
gcc-10 has a more strict internal assert for type checks so the plugin
currently causes an Internal Compiler Error.  Fix.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-11-03 00:53:29 +01:00
Quentin Young
b4d6e8559f lib: fix missed pointer update
Function argument changed from thread * to thread ** without updating
the corresponding tracepoint.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-11-02 16:22:54 -05:00
Pat Ruddy
30decfdeea doc: fix code snippet for net-snmp
incorrect formatting in doc

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-11-02 16:47:58 +00:00
harios_niral
96117716ba ospf6d : Transformation changes for ospf6 vrf support.
1. Reviews comments taken care.

Signed-off-by: harios_niral <hari@niralnetworks.com>
2020-11-02 08:24:21 -08:00