]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
4 years agolib: Fix crash walking up command chain in bgp commands 7510/head
Donald Sharp [Thu, 12 Nov 2020 20:15:52 +0000 (15:15 -0500)]
lib: Fix crash walking up command chain in bgp commands

As part of normal processing we allow bgp commands to walk
up the command node chain.  We are experiencing this crash:

Thread 1 "bgpd" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
    assertion=0x7ffff7f3ba4f "set", file=0x7ffff7f3ba44 "lib/yang.c", line=413, function=<optimized out>)
    at assert.c:92
    line=413, function=0x7ffff7f3bc50 <__PRETTY_FUNCTION__.9> "yang_dnode_get") at assert.c:101
    vty=0x5555561715a0, argc=3, argv=0x555558601620) at bgpd/bgp_vty.c:9568
    cmd=0x0) at lib/command.c:937
    at lib/command.c:997
    matched=0x0, vtysh=0) at lib/command.c:1161
    at lib/vty.c:517
(gdb)

9582 bgp_glb_dnode = yang_dnode_get(vty->candidate_config->dnode,
(gdb) p vty->xpath
$8 = {
  "/frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-bgp:bgp'][name='bgp'][vrf='default']/frr-bgp:bgp", '\000' <repeats 897 times>, '\000' <repeats 1023 times>, '\000' <repeats 1023 times>,
  '\000' <repeats 1023 times>, '\000' <repeats 1023 times>, '\000' <repeats 1023 times>, '\000' <repeats 1023 times>,
  '\000' <repeats 1023 times>}
(gdb) p vty->xpath_index
$9 = 0
(gdb)

We are effectively sending in an array index based upon vty->xpath_index( which is zero) but
the VTY_CURR_XPATH macro subtracts 1 from that value to find the appropriate xpath to use.
This of course subtracts 1 from 0 and we underflow the array.

The relevant section in a config file is this:

address-family ipv6 flowspec
  bgp maxim...

Effectively we were trying to walk up the command chain for flowspec to see
if the command is entered correctly.  There is a function vty_check_node_for_xpath_decrement
that was looking at bgp sub-modes to make the decision to allow us to decrement
the vty->xpath_index which did not have the v4 or v6 flowspec bgp sub modes in the
check.

Adding them in fixes the problem.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7481 from donaldsharp/memory_options_are_long
Mark Stapp [Thu, 12 Nov 2020 15:17:22 +0000 (10:17 -0500)]
Merge pull request #7481 from donaldsharp/memory_options_are_long

bgpd: Shorten some `show memory` strings

4 years agoMerge pull request #4770 from kssoman/fib
Santosh P K [Thu, 12 Nov 2020 13:29:24 +0000 (18:59 +0530)]
Merge pull request #4770 from kssoman/fib

Advertise FIB installed routes to bgp peers

4 years agobgpd: Shorten some `show memory` strings 7481/head
Donald Sharp [Sat, 7 Nov 2020 00:56:36 +0000 (19:56 -0500)]
bgpd: Shorten some `show memory` strings

Some of the `show memory` strings in bgp are longer than the
columns we have allocated for it.  Shorten some strings to
make them fit and have the output pleasing to the eye.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7504 from hohl/master
Donald Sharp [Wed, 11 Nov 2020 19:42:27 +0000 (14:42 -0500)]
Merge pull request #7504 from hohl/master

docs: mention activate keyword in user docs

4 years agoMerge pull request #7417 from pjdruddy/pr-stale-vpn-exports
Donald Sharp [Wed, 11 Nov 2020 18:22:21 +0000 (13:22 -0500)]
Merge pull request #7417 from pjdruddy/pr-stale-vpn-exports

bgpd: withdraw any exported routes when deleting a vrf

4 years agodocs: mention activate keyword in user docs 7504/head
Michael Hohl [Wed, 11 Nov 2020 15:56:15 +0000 (16:56 +0100)]
docs: mention activate keyword in user docs

As of now, the BGP user documentation does not explicitly mention how
to use IPv6. This commit adds documentation of the activate command to
the user documentation which is crucial to get IPv6 networks announced
using FRRouting.

Signed-off-by: Michael Hohl <me@michaelhohl.net>
4 years agobgpd: withdraw any exported routes when deleting a vrf 7417/head
Pat Ruddy [Thu, 29 Oct 2020 16:38:42 +0000 (16:38 +0000)]
bgpd: withdraw any exported routes when deleting a vrf

When a BGP vrf instance is deleted, the routes it exported into the
main VPN table are not deleted and they remain as stale routes
attached to an unknown bgp instance. When the new vrf instance comes
along, it imports these routes from the main table and thus we see
duplicatesalongside its own identical routes.
The solution is to call the unexport logic when a BGP vrf instance is
being deleted.

problem example
---------------
volta1# sh bgp vrf VRF-a ipv4 unicast
BGP table version is 4, local router ID is 18.0.0.1, vrf id 5
Default local pref 100, local AS 567
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*> 7.0.0.6/32       7.0.0.5@0<              10    100      0 ?
*> 7.0.0.8/32       18.0.0.8                 0             0 111 ?
*> 18.0.0.0/24      18.0.0.8                 0             0 111 ?
*> 56.0.0.0/24      7.0.0.5@0<               0    100      0 ?
Displayed  4 routes and 4 total paths
volta1# conf t
volta1(config)# no router bgp 567 vrf VRF-a
volta1(config)#
volta1(config)# router bgp 567 vrf VRF-a
volta1(config-router)#  bgp router-id 18.0.0.1
volta1(config-router)#  no bgp ebgp-requires-policy
volta1(config-router)#  no bgp network import-check
volta1(config-router)#  neighbor 18.0.0.8 remote-as 111
volta1(config-router)#  !
volta1(config-router)#  address-family ipv4 unicast
volta1(config-router-af)#   label vpn export 12345
volta1(config-router-af)#   rd vpn export 567:111
volta1(config-router-af)#   rt vpn both 567:100
volta1(config-router-af)#   export vpn
volta1(config-router-af)#   import vpn
volta1(config-router-af)#  exit-address-family
volta1(config-router)# !
volta1(config-router)# end
volta1# sh bgp vrf VRF-a ipv4 unicast
BGP table version is 4, local router ID is 18.0.0.1, vrf id 5
Default local pref 100, local AS 567
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*> 7.0.0.6/32       7.0.0.5@0<              10    100      0 ?
*  7.0.0.8/32       18.0.0.8                 0             0 111 ?
*>                  18.0.0.8@-<              0             0 111 ?
*  18.0.0.0/24      18.0.0.8                 0             0 111 ?
*>                  18.0.0.8@-<              0             0 111 ?
*> 56.0.0.0/24      7.0.0.5@0<               0    100      0 ?
Displayed  4 routes and 6 total paths

@- routes indicating unknown bgp instance are imported

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agoMerge pull request #7375 from vishaldhingra/static
Rafael Zalamena [Wed, 11 Nov 2020 12:05:34 +0000 (09:05 -0300)]
Merge pull request #7375 from vishaldhingra/static

staticd: fixed memory leak on shudown

4 years agoMerge pull request #7491 from volta-networks/fix_ebgp_mhop_reset
Donald Sharp [Tue, 10 Nov 2020 23:50:10 +0000 (18:50 -0500)]
Merge pull request #7491 from volta-networks/fix_ebgp_mhop_reset

bgpd: avoid needless ebgp-multihop session reset

4 years agoMerge pull request #7495 from qlyoung/doc-fuzzing
Russ White [Tue, 10 Nov 2020 21:48:31 +0000 (16:48 -0500)]
Merge pull request #7495 from qlyoung/doc-fuzzing

Doc fuzzing

4 years agoMerge pull request #7500 from mjstapp/fix_topo_scale_mem
Donald Sharp [Tue, 10 Nov 2020 21:40:53 +0000 (16:40 -0500)]
Merge pull request #7500 from mjstapp/fix_topo_scale_mem

tests: reduce scale of the route scale test

4 years agoMerge pull request #7498 from mjstapp/fix_topo_count_only
Donald Sharp [Tue, 10 Nov 2020 20:17:59 +0000 (15:17 -0500)]
Merge pull request #7498 from mjstapp/fix_topo_count_only

tests: only test count of nexthops in bgp max-paths test

4 years agoMerge pull request #7482 from AnuradhaKaruppiah/evpn-sticky-fix
Mark Stapp [Tue, 10 Nov 2020 20:13:10 +0000 (15:13 -0500)]
Merge pull request #7482 from AnuradhaKaruppiah/evpn-sticky-fix

zebra: Set NUD_NOARP on sticky MAC entries in addition to NTF_STICKY

4 years agoMerge pull request #7499 from mjstapp/fix_topo_dup_verify_fib
Quentin Young [Tue, 10 Nov 2020 20:02:42 +0000 (15:02 -0500)]
Merge pull request #7499 from mjstapp/fix_topo_dup_verify_fib

tests: remove duplicate verify_fib_routes from common_config.py

4 years agotests: reduce scale of the route scale test 7500/head
Mark Stapp [Tue, 10 Nov 2020 19:14:23 +0000 (14:14 -0500)]
tests: reduce scale of the route scale test

Reduce the number of routes used in the route-scale test: we're
having memory troubles, and this may help the CI run with fewer
false failures. Also re-orged the route-scale test code a bit
so it can be driven from the json file, with fewer hard-coded
values.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7484 from donaldsharp/nhrp_leak
Jafar Al-Gharaibeh [Tue, 10 Nov 2020 16:25:16 +0000 (10:25 -0600)]
Merge pull request #7484 from donaldsharp/nhrp_leak

nhrpd: Fix memory leak on shutdown

4 years agoMerge pull request #7448 from mjstapp/fix_gcc10_formats
Donald Sharp [Tue, 10 Nov 2020 16:23:02 +0000 (11:23 -0500)]
Merge pull request #7448 from mjstapp/fix_gcc10_formats

* : clean up format specifiers for gcc-10

4 years agoMerge pull request #7445 from ranjanyash54/dev_4
Russ White [Tue, 10 Nov 2020 16:15:02 +0000 (11:15 -0500)]
Merge pull request #7445 from ranjanyash54/dev_4

ospf6d: Json support added for command "show ipv6 ospf6 neighbor [json]"

4 years agotests: remove duplicate verify_fib_routes from common_config.py 7499/head
Mark Stapp [Tue, 10 Nov 2020 15:06:48 +0000 (10:06 -0500)]
tests: remove duplicate verify_fib_routes from common_config.py

There were two copies of the function - we only need one.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agotests: only test count of nexthops in bgp max-paths test 7498/head
Mark Stapp [Tue, 10 Nov 2020 14:50:50 +0000 (09:50 -0500)]
tests: only test count of nexthops in bgp max-paths test

Add support to compare the number of RIB nexthops, rather than the
specific nexthop addresses. Use this in the bgp_ecmp topotests that
test maximum-paths - testing the specific nexthops is wrong there,
it's not deterministic and we get spurious failures.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7463 from louis-oui/netnsname
Donatas Abraitis [Tue, 10 Nov 2020 07:39:43 +0000 (09:39 +0200)]
Merge pull request #7463 from louis-oui/netnsname

lib: change limit of netns name from 15 to 35 characters

4 years agodoc: fix vrrp block quote 7495/head
Quentin Young [Mon, 9 Nov 2020 21:19:13 +0000 (16:19 -0500)]
doc: fix vrrp block quote

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agodoc: use anonymous link refs
Quentin Young [Mon, 9 Nov 2020 20:17:18 +0000 (15:17 -0500)]
doc: use anonymous link refs

rst...

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agodoc: add docs on fuzzing stuff
Quentin Young [Mon, 9 Nov 2020 20:08:02 +0000 (15:08 -0500)]
doc: add docs on fuzzing stuff

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #7494 from mjstapp/fix_basic_title_levels
Quentin Young [Mon, 9 Nov 2020 20:24:25 +0000 (15:24 -0500)]
Merge pull request #7494 from mjstapp/fix_basic_title_levels

doc: fix sphinx complaint about indent levels

4 years agodoc: fix sphinx complaint about indent levels 7494/head
Mark Stapp [Mon, 9 Nov 2020 17:44:44 +0000 (12:44 -0500)]
doc: fix sphinx complaint about indent levels

There was an inconsistency in the characters used for the second
level of title/section hierarchy - fix it.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agobgpd: avoid needless ebgp mhop reset 7491/head
Emanuele Di Pascale [Mon, 9 Nov 2020 10:05:04 +0000 (11:05 +0100)]
bgpd: avoid needless ebgp mhop reset

if the user sets the ebgp-multihop for a neighbor to the same value
we currently have, avoid resetting the session and just return a
silent success.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agolib: change limit of netns name from 15 to 35 characters 7463/head
Louis Scalbert [Mon, 9 Nov 2020 10:24:53 +0000 (11:24 +0100)]
lib: change limit of netns name from 15 to 35 characters

    Extend the size of netns name to match linux permitted netns name size

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
4 years agoMerge pull request #7487 from donaldsharp/reformat_rfapi
Donatas Abraitis [Sun, 8 Nov 2020 15:09:23 +0000 (17:09 +0200)]
Merge pull request #7487 from donaldsharp/reformat_rfapi

bgpd: Fix rfapi indentation issues with a for loop

4 years agoMerge pull request #7486 from ton31337/fix/bgp_debug_keepalives_docstring
Donald Sharp [Sun, 8 Nov 2020 00:20:15 +0000 (19:20 -0500)]
Merge pull request #7486 from ton31337/fix/bgp_debug_keepalives_docstring

bgpd: Correct CLI description for `debug bgp keepalives`

4 years agobgpd: Fix rfapi indentation issues with a for loop 7487/head
Donald Sharp [Sat, 7 Nov 2020 16:43:44 +0000 (11:43 -0500)]
bgpd: Fix rfapi indentation issues with a for loop

I am not even sure how this compiles or what it is supposed
to do from a c perspective :(

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7462 from qlyoung/fix-misc-doc-issues
Donatas Abraitis [Sat, 7 Nov 2020 15:26:46 +0000 (17:26 +0200)]
Merge pull request #7462 from qlyoung/fix-misc-doc-issues

Fix misc doc issues

4 years agoMerge pull request #7477 from chiragshah6/yang_dev
Donatas Abraitis [Sat, 7 Nov 2020 15:25:37 +0000 (17:25 +0200)]
Merge pull request #7477 from chiragshah6/yang_dev

bgpd: fix compiler warnings in nbr cmd

4 years agobgpd: Correct CLI description for `debug bgp keepalives` 7486/head
Donatas Abraitis [Sat, 7 Nov 2020 15:22:34 +0000 (17:22 +0200)]
bgpd: Correct CLI description for `debug bgp keepalives`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #7480 from donaldsharp/bgp_defer_bad_donald
Donatas Abraitis [Sat, 7 Nov 2020 10:21:27 +0000 (12:21 +0200)]
Merge pull request #7480 from donaldsharp/bgp_defer_bad_donald

bgpd: Fix mistakes in defer working

4 years agoMerge pull request #7470 from donaldsharp/bgp_group
Donatas Abraitis [Sat, 7 Nov 2020 10:19:47 +0000 (12:19 +0200)]
Merge pull request #7470 from donaldsharp/bgp_group

bgpd: Actually return the group peer

4 years agonhrpd: Fix memory leak on shutdown 7484/head
Donald Sharp [Sat, 7 Nov 2020 01:56:02 +0000 (20:56 -0500)]
nhrpd: Fix memory leak on shutdown

On shutdown we were blantantly dropping the node->info
data.  Make it happy.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: Set NUD_NOARP on sticky MAC entries in addition to NTF_STICKY 7482/head
Anuradha Karuppiah [Sat, 9 May 2020 02:53:36 +0000 (19:53 -0700)]
zebra: Set NUD_NOARP on sticky MAC entries in addition to NTF_STICKY

(ndm_state & NUD_NOARP) - prevents the entry from expiring
(ndm_flags & NTF_STICKY) - prevents station moves on the entry

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: Fix mistakes in defer working 7480/head
Donald Sharp [Sat, 7 Nov 2020 00:13:59 +0000 (19:13 -0500)]
bgpd: Fix mistakes in defer working

Commit: 26742171e6ba292a9fd2a72668315d2a699717b5

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>
4 years agoMerge pull request #7473 from eololab/fix-crash-bfdd-show-counters-json
Donald Sharp [Fri, 6 Nov 2020 23:40:07 +0000 (18:40 -0500)]
Merge pull request #7473 from eololab/fix-crash-bfdd-show-counters-json

bfdd: fix crash on show bfd peers counters json

4 years agobgpd: fix compiler warnings in nbr cmd 7477/head
Chirag Shah [Fri, 6 Nov 2020 19:06:58 +0000 (11:06 -0800)]
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>
4 years agobfdd: fix crash on show bfd peers counters json 7473/head
Emanuele Bovisio [Thu, 5 Nov 2020 13:27:51 +0000 (14:27 +0100)]
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>
4 years agoMerge pull request #7385 from opensourcerouting/isisd-prefix-sid-collision
Olivier Dugeon [Fri, 6 Nov 2020 11:21:37 +0000 (12:21 +0100)]
Merge pull request #7385 from opensourcerouting/isisd-prefix-sid-collision

isisd: detect Prefix-SID collisions and handle them  appropriately

4 years agotests: Advertise FIB installed routes to bgp peers 4770/head
Soman K S [Fri, 6 Nov 2020 03:29:39 +0000 (08:59 +0530)]
tests: Advertise FIB installed routes to bgp peers

Added test case for bgp suppress-fib-pending
Updated document

Signed-off-by: kssoman <somanks@gmail.com>
4 years agobgpd: Advertise FIB installed routes to bgp peers (Part 3)
Soman K S [Fri, 6 Nov 2020 03:25:56 +0000 (08:55 +0530)]
bgpd: Advertise FIB installed routes to bgp peers (Part 3)

* Process FIB update in bgp_zebra_route_notify_owner() and call
  group_announce_route() if route is installed
* When bgp update is received for a route which is not installed earlier
  (flag BGP_NODE_FIB_INSTALLED is not set) and suppress fib is enabled
  set the flag BGP_NODE_FIB_INSTALL_PENDING to indicate fib install is
  pending for the route. The route will be advertised when zebra send
  ZAPI_ROUTE_INSTALLED status.
* The advertisement delay (BGP_DEFAULT_UPDATE_ADVERTISEMENT_TIME)
  is added to allow more routes to be sent in single update message.
  This is required since zebra sends route notify message for each route.
  The delay will be applied to update group timer which advertises
  routes to peers.

Signed-off-by: kssoman <somanks@gmail.com>
4 years agobgpd: Advertise FIB installed routes to bgp peers (Part 2)
Soman K S [Fri, 6 Nov 2020 03:16:04 +0000 (08:46 +0530)]
bgpd: Advertise FIB installed routes to bgp peers (Part 2)

* Added CLI command "[no] bgp suppress-fib-pending" to enable and
  disable suppress-fib-pending
* Send ZEBRA_ROUTE_NOTIFY_REQUEST to zebra when "bgp suppress-fib-pending"
  is enabled or disabled
* Define BGP_DEFAULT_UPDATE_ADVERTISEMENT_TIME which is the delay added
  to update group timer.
* Added error codes

Signed-off-by: kssoman <somanks@gmail.com>
4 years agobgpd: Advertise FIB installed routes to bgp peers (Part 1)
Soman K S [Fri, 6 Nov 2020 03:09:28 +0000 (08:39 +0530)]
bgpd: Advertise FIB installed routes to bgp peers (Part 1)

Issue:
The bgp routes learnt from peers which are not installed in kernel are
advertised to peers. This can cause routers to send traffic to these
destinations only to get dropped. The fix is to provide a configurable
option "bgp suppress-fib-pending". When the option is enabled, bgp will
advertise routes only if it these are successfully installed in kernel.

Fix (Part1) :
* Added message ZEBRA_ROUTE_NOTIFY_REQUEST used by client to request
  FIB install status for routes
* Added AFI/SAFI to ZAPI messages
* Modified the functions zapi_route_notify_decode(), zsend_route_notify_owner()
  and route_notify_internal() to include AFI, SAFI as parameters

Signed-off-by: kssoman <somanks@gmail.com>
4 years agoMerge pull request #7466 from idryzhov/fix-bfd-null-deref
Donald Sharp [Fri, 6 Nov 2020 01:54:02 +0000 (20:54 -0500)]
Merge pull request #7466 from idryzhov/fix-bfd-null-deref

bfdd: fix possible null dereference

4 years agobgpd: Actually return the group peer 7470/head
Donald Sharp [Fri, 6 Nov 2020 01:42:03 +0000 (20:42 -0500)]
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>
4 years agoMerge pull request #7227 from chiragshah6/yang_dev
Russ White [Thu, 5 Nov 2020 19:32:39 +0000 (14:32 -0500)]
Merge pull request #7227 from chiragshah6/yang_dev

bgpd, yang : neighbor and peer-group config cmds to transactional clis

4 years agoMerge pull request #7137 from kssoman/ospf
Donald Sharp [Thu, 5 Nov 2020 16:57:50 +0000 (11:57 -0500)]
Merge pull request #7137 from kssoman/ospf

ospf6d : Intra area route for connected prefix not installed

4 years agobfdd: fix possible null dereference 7466/head
Igor Ryzhov [Thu, 5 Nov 2020 16:46:27 +0000 (19:46 +0300)]
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>
4 years agoMerge pull request #7459 from donaldsharp/clang_more_stuff_to_cleanup
Mark Stapp [Thu, 5 Nov 2020 13:25:40 +0000 (08:25 -0500)]
Merge pull request #7459 from donaldsharp/clang_more_stuff_to_cleanup

Clang more stuff to cleanup

4 years agoMerge pull request #7423 from donaldsharp/route_list
Russ White [Thu, 5 Nov 2020 12:29:54 +0000 (07:29 -0500)]
Merge pull request #7423 from donaldsharp/route_list

bgpd: Remove pointer structure from `struct bgp_dest`

4 years agoospf6d: Json support added for command "show ipv6 ospf6 neighbor [json]" 7445/head
github login name [Mon, 28 Sep 2020 10:48:37 +0000 (03:48 -0700)]
ospf6d: Json support added for command "show ipv6 ospf6 neighbor [json]"

Modify code to add JSON format output in show command
"show ipv6 ospf6 neighbor" with proper formating

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
4 years agobgpd: Cleanup memory leaks associated with t_router_timer 7423/head
Donald Sharp [Thu, 5 Nov 2020 02:02:57 +0000 (21:02 -0500)]
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>
4 years agodoc: add crosslink to developer docs 7462/head
Quentin Young [Wed, 4 Nov 2020 22:33:17 +0000 (17:33 -0500)]
doc: add crosslink to developer docs

for source build instructions

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agodoc: explain integrated config
Quentin Young [Wed, 4 Nov 2020 22:29:58 +0000 (17:29 -0500)]
doc: explain integrated config

This is poorly documented and confusing to users

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agodoc: add troubleshooting info for vrrp
Quentin Young [Wed, 4 Nov 2020 22:21:33 +0000 (17:21 -0500)]
doc: add troubleshooting info for vrrp

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years ago* : clean up format specifiers for gcc-10 7448/head
Mark Stapp [Tue, 3 Nov 2020 22:07:08 +0000 (17:07 -0500)]
* : clean up format specifiers for gcc-10

gcc 10 complains about some of our format specs, fix them. Use
atomic size_t in thread stats, to work around platform
differences.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7456 from donaldsharp/flowspec_issues
Russ White [Wed, 4 Nov 2020 20:41:35 +0000 (15:41 -0500)]
Merge pull request #7456 from donaldsharp/flowspec_issues

Rules and why they are made to be broken

4 years agobgpd: Remove pointer structure from `struct bgp_dest`
Donald Sharp [Fri, 30 Oct 2020 17:34:30 +0000 (13:34 -0400)]
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>
4 years agoisisd: update more northbound callbacks to new error handling model 7385/head
Renato Westphal [Wed, 4 Nov 2020 20:03:47 +0000 (17:03 -0300)]
isisd: update more northbound callbacks to new error handling model

This is a second iteration of commit 10bdc68f0c13e. Some recent
commits introduced zlog calls in the northbound callbacks
inadvertently.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoisisd: detect Prefix-SID collisions and handle them appropriately
Renato Westphal [Sat, 24 Oct 2020 00:05:30 +0000 (21:05 -0300)]
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>
4 years agoisisd: fix build errors when EXTREME_DEBUG is defined
Renato Westphal [Sat, 24 Oct 2020 13:55:27 +0000 (10:55 -0300)]
isisd: fix build errors when EXTREME_DEBUG is defined

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #7443 from opensourcerouting/gcc-10-plugin-ice
Donald Sharp [Wed, 4 Nov 2020 19:40:32 +0000 (14:40 -0500)]
Merge pull request #7443 from opensourcerouting/gcc-10-plugin-ice

tools/gcc-frr-format: fix ICE in gcc-10

4 years agozebra: Rework code to make SA happy 7459/head
Donald Sharp [Wed, 4 Nov 2020 16:48:49 +0000 (11:48 -0500)]
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>
4 years agoospfd: Cleanup some clang sa issues
Donald Sharp [Wed, 4 Nov 2020 16:47:57 +0000 (11:47 -0500)]
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>
4 years agobgpd: Fix up rule encoding to zebra so it works 7456/head
Donald Sharp [Wed, 4 Nov 2020 14:11:53 +0000 (09:11 -0500)]
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>
4 years agopbrd: Fix memory leak in json output
Donald Sharp [Wed, 4 Nov 2020 14:11:13 +0000 (09:11 -0500)]
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>
4 years agoMerge pull request #7447 from donaldsharp/table_stats
Donatas Abraitis [Wed, 4 Nov 2020 06:46:26 +0000 (08:46 +0200)]
Merge pull request #7447 from donaldsharp/table_stats

bgpd: Allow 1 prefix to generate statistics

4 years agoMerge pull request #7274 from donaldsharp/bgp_best_is_a_path
Lou Berger [Tue, 3 Nov 2020 21:06:48 +0000 (16:06 -0500)]
Merge pull request #7274 from donaldsharp/bgp_best_is_a_path

bgpd: allow bestpath to handle mutliple locally-originated paths

4 years agobgpd: Allow 1 prefix to generate statistics 7447/head
Donald Sharp [Tue, 3 Nov 2020 20:24:03 +0000 (15:24 -0500)]
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>
4 years agoMerge pull request #7438 from donaldsharp/multipath_no_alloc
Lou Berger [Tue, 3 Nov 2020 15:38:03 +0000 (10:38 -0500)]
Merge pull request #7438 from donaldsharp/multipath_no_alloc

bgpd: Multipath is always being allocated

4 years agoMerge pull request #7261 from Niral-Networks/niral_dev_vrf_ospf6
Rafael Zalamena [Tue, 3 Nov 2020 14:59:38 +0000 (11:59 -0300)]
Merge pull request #7261 from Niral-Networks/niral_dev_vrf_ospf6

ospf6d : Transformation changes for ospf6 vrf support.

4 years agoMerge pull request #6795 from rgirada/ospf_db_json
Olivier Dugeon [Tue, 3 Nov 2020 14:42:03 +0000 (15:42 +0100)]
Merge pull request #6795 from rgirada/ospf_db_json

ospfd: json support for ospf database command.

4 years agoMerge pull request #6922 from rgirada/ospf_summarisation
Olivier Dugeon [Tue, 3 Nov 2020 14:34:36 +0000 (15:34 +0100)]
Merge pull request #6922 from rgirada/ospf_summarisation

ospfd: Implementation of ospf external route summarization.

4 years agoMerge pull request #7427 from mjstapp/dplane_intf_info
Russ White [Tue, 3 Nov 2020 12:44:45 +0000 (07:44 -0500)]
Merge pull request #7427 from mjstapp/dplane_intf_info

zebra: add optional extra data about routes' interfaces

4 years agoMerge pull request #7442 from qlyoung/fix-thread-tracepoint-pointer
Russ White [Tue, 3 Nov 2020 12:39:12 +0000 (07:39 -0500)]
Merge pull request #7442 from qlyoung/fix-thread-tracepoint-pointer

lib: fix missed pointer update

4 years agoMerge pull request #7421 from ton31337/fix/default-originate_attributes
Donald Sharp [Tue, 3 Nov 2020 12:16:31 +0000 (07:16 -0500)]
Merge pull request #7421 from ton31337/fix/default-originate_attributes

bgpd: Respect match operations for default-originate, not only prefixes

4 years agoMerge pull request #7440 from pjdruddy/fix_snmp_doc
Donald Sharp [Tue, 3 Nov 2020 00:56:23 +0000 (19:56 -0500)]
Merge pull request #7440 from pjdruddy/fix_snmp_doc

doc: fix code snippet for net-snmp

4 years agotools/gcc-frr-format: fix ICE in gcc-10 7443/head
David Lamparter [Mon, 2 Nov 2020 23:53:29 +0000 (00:53 +0100)]
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>
4 years agolib: fix missed pointer update 7442/head
Quentin Young [Mon, 2 Nov 2020 21:22:54 +0000 (16:22 -0500)]
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>
4 years agodoc: fix code snippet for net-snmp 7440/head
Pat Ruddy [Mon, 2 Nov 2020 16:47:58 +0000 (16:47 +0000)]
doc: fix code snippet for net-snmp

incorrect formatting in doc

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agoospf6d : Transformation changes for ospf6 vrf support. 7261/head
harios_niral [Mon, 2 Nov 2020 16:24:21 +0000 (08:24 -0800)]
ospf6d : Transformation changes for ospf6 vrf support.

1. Reviews comments taken care.

Signed-off-by: harios_niral <hari@niralnetworks.com>
4 years agobgpd: Multipath is always being allocated 7438/head
Donald Sharp [Mon, 2 Nov 2020 15:14:48 +0000 (10:14 -0500)]
bgpd: Multipath is always being allocated

The multipath arrays are always being allocated, irrelevant
if we actually have multipath information for a prefix.

This is because the link bandwidth code was always adding the
data structure.  We should not be allocated multipath information
unless we actually have multipath information

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7425 from sworleys/Fix-Bgp-Dist-Help
Mark Stapp [Mon, 2 Nov 2020 12:54:00 +0000 (07:54 -0500)]
Merge pull request #7425 from sworleys/Fix-Bgp-Dist-Help

bgpd: fix help for ipv6 under distance src command

4 years agoospfd: OSPF external summarisation documentation 6922/head
rgirada [Sun, 6 Sep 2020 07:21:23 +0000 (00:21 -0700)]
ospfd: OSPF external summarisation documentation

Description:
Documentation for external summarisation feature support.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoospfd: OSPF external summarisation debug support
rgirada [Sat, 5 Sep 2020 16:41:04 +0000 (09:41 -0700)]
ospfd: OSPF external summarisation debug support

Description:
Changes to enable/disable debugs for external
LSA sumarisation.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoospfd: OSPF external summarisation scenarios
rgirada [Sat, 5 Sep 2020 15:15:51 +0000 (08:15 -0700)]
ospfd: OSPF external summarisation scenarios

Description:
Aggergation handled in the following scenarios.
1. Route update from Zebra.
2. Refresh external LSA.
3. Processing routemap update.
4. Self originated lsa processing.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoospfd: OSPF external LSA summarisation show commands
rgirada [Tue, 1 Sep 2020 11:47:13 +0000 (04:47 -0700)]
ospfd: OSPF external LSA summarisation show commands

Description:
The below show command introduced to diplay all configured
summary addresss information along with matching corresponding
external route information.

show ip ospf [vrf <NAME|all>] summary-address [detail] [json]

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoospfd: External LSA summarisation config commands.
rgirada [Tue, 1 Sep 2020 07:58:47 +0000 (00:58 -0700)]
ospfd: External LSA summarisation config commands.

Description:
The following config commands introduced for external route
aggregation.

[no] summary-address A.B.C.D/M [tag (1-4294967295)]
[no] summary-address A.B.C.D/M no-advertise
aggregation timer (5-1800)
no aggregation timer

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoospfd: ospf summarisation core handlers
rgirada [Sat, 15 Aug 2020 09:55:40 +0000 (02:55 -0700)]
ospfd: ospf summarisation core handlers

Description:
Apis for creating/deleting aggregate routes.
Origination of summary route on behalf of matched external routes.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoospfd: Summarisation init/de-init.
rgirada [Sat, 15 Aug 2020 08:27:40 +0000 (01:27 -0700)]
ospfd: Summarisation init/de-init.

Description:
       Summarisation initilisation and de-init apis.
       summary route table will be created as part of initilisation
       at the time of ospf deamon init.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoospfd: summarisation specific data structures.
rgirada [Sat, 15 Aug 2020 07:27:25 +0000 (00:27 -0700)]
ospfd: summarisation specific data structures.

Description:
Data structures definitions for summary route.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoospfd: json support for ospf database command. 6795/head
rgirada [Thu, 23 Jul 2020 23:25:04 +0000 (16:25 -0700)]
ospfd: json support for ospf database command.

Description:
Added json support to ospf lsdb command and its subcommands.
Added json to the following sub commands.
show ip ospf  database json
show ip ospf  database router json
show ip ospf  database network json
show ip ospf  database external json
show ip ospf  database summary json
show ip ospf  database asbr-summary json
show ip ospf  database nssa-external json
show ip ospf  databas max-age json
show ip ospf  database self-originate json

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoMerge pull request #7429 from opensourcerouting/rpm-subpkgs
Donald Sharp [Sat, 31 Oct 2020 11:08:47 +0000 (07:08 -0400)]
Merge pull request #7429 from opensourcerouting/rpm-subpkgs

RPM Subpackages for RPKI and SNMP

4 years agoospf6d : Transformation changes for ospf6 vrf support.
harios_niral [Thu, 8 Oct 2020 05:38:43 +0000 (22:38 -0700)]
ospf6d : Transformation changes for ospf6 vrf support.

1. All the changes are related to handle ospf6 with different vrf.
2. The dependancy of global ospf6 is removed.

Co-authored-by: Kaushik <kaushik@niralnetworks.com>
Signed-off-by: harios_niral <hari@niralnetworks.com>
4 years agoredhat: Update changelog in frr.spec.in 7429/head
Martin Winter [Sat, 31 Oct 2020 01:19:18 +0000 (02:19 +0100)]
redhat: Update changelog in frr.spec.in

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>