]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
4 years agoldpd: Prevent usage after free 7602/head
Donald Sharp [Wed, 25 Nov 2020 12:36:43 +0000 (07:36 -0500)]
ldpd: Prevent usage after free

We are using data after it has been freed and handed back to the
OS.
Address Sanitizer output:

error 23-Nov-2020 18:53:57 ERROR: AddressSanitizer: heap-use-after-free on address 0x631000024838 at pc 0x55f825998f58 bp 0x7fffa5b0f5b0 sp 0x7fffa5b0f5a0
error 23-Nov-2020 18:53:57 READ of size 4 at 0x631000024838 thread T0
error 23-Nov-2020 18:53:57     #0 0x55f825998f57 in lde_imsg_compose_parent_sync ldpd/lde.c:226
error 23-Nov-2020 18:53:57     #1 0x55f8259ca9ed in vlog ldpd/log.c:48
error 23-Nov-2020 18:53:57     #2 0x55f8259cb1c8 in log_info ldpd/log.c:102
error 23-Nov-2020 18:53:57     #3 0x55f82599e841 in lde_shutdown ldpd/lde.c:208
error 23-Nov-2020 18:53:57     #4 0x55f8259a2703 in lde_dispatch_parent ldpd/lde.c:666
error 23-Nov-2020 18:53:57     #5 0x55f825ac3815 in thread_call lib/thread.c:1681
error 23-Nov-2020 18:53:57     #6 0x55f825998d5e in lde ldpd/lde.c:160
error 23-Nov-2020 18:53:57     #7 0x55f82598a289 in main ldpd/ldpd.c:320
error 23-Nov-2020 18:53:57     #8 0x7fe3f749db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
error 23-Nov-2020 18:53:57     #9 0x55f825982579 in _start (/usr/lib/frr/ldpd+0xb3579)
error 23-Nov-2020 18:53:57
error 23-Nov-2020 18:53:57 0x631000024838 is located 65592 bytes inside of 65632-byte region [0x631000014800,0x631000024860)
error 23-Nov-2020 18:53:57 freed by thread T0 here:
error 23-Nov-2020 18:53:57     #0 0x7fe3f8a4d7a8 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde7a8)
error 23-Nov-2020 18:53:57     #1 0x55f82599e830 in lde_shutdown ldpd/lde.c:206
error 23-Nov-2020 18:53:57     #2 0x55f8259a2703 in lde_dispatch_parent ldpd/lde.c:666
error 23-Nov-2020 18:53:57     #3 0x55f825ac3815 in thread_call lib/thread.c:1681
error 23-Nov-2020 18:53:57     #4 0x55f825998d5e in lde ldpd/lde.c:160
error 23-Nov-2020 18:53:57     #5 0x55f82598a289 in main ldpd/ldpd.c:320
error 23-Nov-2020 18:53:57     #6 0x7fe3f749db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
error 23-Nov-2020 18:53:57
error 23-Nov-2020 18:53:57 previously allocated by thread T0 here:
error 23-Nov-2020 18:53:57     #0 0x7fe3f8a4dd28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
error 23-Nov-2020 18:53:57     #1 0x55f825998cb7 in lde ldpd/lde.c:151
error 23-Nov-2020 18:53:57     #2 0x55f82598a289 in main ldpd/ldpd.c:320
error 23-Nov-2020 18:53:57     #3 0x7fe3f749db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
error 23-Nov-2020 18:53:57

The fix is to put this in global space.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7594 from ton31337/feature/show_pfxSnt_for_show_bgp_summary
Donald Sharp [Wed, 25 Nov 2020 12:02:13 +0000 (07:02 -0500)]
Merge pull request #7594 from ton31337/feature/show_pfxSnt_for_show_bgp_summary

bgpd: Show pfxSnt in JSON output for show bgp summary even if not established

4 years agoMerge pull request #7502 from AnuradhaKaruppiah/evpn-mh-irb
Patrick Ruddy [Wed, 25 Nov 2020 09:57:56 +0000 (09:57 +0000)]
Merge pull request #7502 from AnuradhaKaruppiah/evpn-mh-irb

evpn-mh: support for symmetric routing

4 years agobgpd: Show pfxSnt in JSON output for show bgp summary even if not established 7594/head
Donatas Abraitis [Tue, 24 Nov 2020 08:22:01 +0000 (10:22 +0200)]
bgpd: Show pfxSnt in JSON output for show bgp summary even if not established

spine1-debian-9# show ip bgp summary json
{
"ipv4Unicast":{
  "routerId":"192.168.3.2",
  "as":200,
  "vrfId":0,
  "vrfName":"default",
  "tableVersion":4,
  "ribCount":1,
  "ribMemory":184,
  "peerCount":1,
  "peerMemory":23384,
  "peers":{
    "192.168.0.1":{
      "hostname":"exit1-debian-9",
      "remoteAs":100,
      "version":4,
      "msgRcvd":5,
      "msgSent":6,
      "tableVersion":0,
      "outq":0,
      "inq":0,
      "peerUptime":"00:00:09",
      "peerUptimeMsec":9000,
      "peerUptimeEstablishedEpoch":1606206209,
      "pfxRcd":0,
      "pfxSnt":0,
      "state":"Idle (Admin)",
      "connectionsEstablished":1,
      "connectionsDropped":1,
      "idType":"ipv4"
    }
  },
  "failedPeers":1,
  "totalPeers":1,
  "dynamicPeers":0,
  "bestPath":{
    "multiPathRelax":"false"
  }
}
}

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #7591 from opensourcerouting/isisd-bug-fixes
Donald Sharp [Wed, 25 Nov 2020 01:59:50 +0000 (20:59 -0500)]
Merge pull request #7591 from opensourcerouting/isisd-bug-fixes

isisd: assorted bug fixes

4 years agoMerge pull request #7595 from ton31337/feature/bgpState_json
Donald Sharp [Wed, 25 Nov 2020 01:55:34 +0000 (20:55 -0500)]
Merge pull request #7595 from ton31337/feature/bgpState_json

bgpd: Add peerStatus for show bgp summary json

4 years agobgpd: enable L3NHG installation for EVPN host routes by default 7502/head
Anuradha Karuppiah [Wed, 17 Jun 2020 18:43:58 +0000 (11:43 -0700)]
bgpd: enable L3NHG installation for EVPN host routes by default

L3NHG allows for fast failover of routed traffic (from remote-rack
to local-rack).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: add a config knob to enable use of L3 NHG for EVPN host routes
Anuradha Karuppiah [Mon, 18 May 2020 22:55:39 +0000 (15:55 -0700)]
bgpd: add a config knob to enable use of L3 NHG for EVPN host routes

Sample config -
vtysh -c "conf t"  -c "router bgp <N>" -c "address-family l2vpn evpn" -c "use-es-l3nhg"

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: Use L3NHGs for symmetric IRB host routes
Anuradha Karuppiah [Fri, 15 May 2020 23:33:41 +0000 (16:33 -0700)]
bgpd: Use L3NHGs for symmetric IRB host routes

Two L3 next groups are installed per-VRF per-ES for v4 and v6. These
NHGs are used as an indirect destination for symmetric IRB host routes.

Using L3NHGs allows for efficient failover of an ES (similar to the
use of L2NHGs) i.e. when an ES goes down the number of dataplane
updates are limited to 2xN (where N is the number of tenant VRFs
associated with the ES) instead of updating all host-routes behind the
ES.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: change the nhg format from hex to dec for easy match up with the dp
Anuradha Karuppiah [Tue, 19 May 2020 00:52:52 +0000 (17:52 -0700)]
zebra: change the nhg format from hex to dec for easy match up with the dp

Dataplane/kernel prints the NHG and NH ids as decimal. Zebra
was printing it as hex (to display type vs. val). This became a
debugging hassle hence normalizing the format.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: commands to display L3 NHGs and MAC-IP paths linked to an ES
Anuradha Karuppiah [Sat, 9 May 2020 02:49:33 +0000 (19:49 -0700)]
bgpd: commands to display L3 NHGs and MAC-IP paths linked to an ES

Sample output -
===============
torm-11# sh bgp l2vpn evpn es-vrf
ES-VRF Flags: A Active
ESI                            VRF             Flags IPv4-NHG IPv6-NHG Ref
03:44:38:39:ff:ff:01:00:00:01  vrf3            A     1        0        2
03:44:38:39:ff:ff:01:00:00:01  vrf2            A     6        0        4
03:44:38:39:ff:ff:01:00:00:01  vrf1            A     7        0        4
03:44:38:39:ff:ff:01:00:00:02  vrf3            A     2        0        2
03:44:38:39:ff:ff:01:00:00:02  vrf2            A     4        0        4
03:44:38:39:ff:ff:01:00:00:02  vrf1            A     8        0        4

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: use L3NHG while installing EVPN host routes in zebra
Anuradha Karuppiah [Sat, 9 May 2020 02:44:35 +0000 (19:44 -0700)]
bgpd: use L3NHG while installing EVPN host routes in zebra

Host routes imported into the VRF can have a destination ES (per-VRF)
which is set up as a L3NHG for efficient failover.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: Handle ES VTEP add/del to a host route
Anuradha Karuppiah [Sat, 9 May 2020 02:36:47 +0000 (19:36 -0700)]
bgpd: Handle ES VTEP add/del to a host route

1. MAC-IP routes in the VPN routing table are linked to the
destination ES for efficient handling for remote ES link flaps.
2. Only MAC-IP paths whose nexthops are active (added via EAD-ES)
are imported into the VRF routing table.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: L3NHG infrastructure for host routes in EVPN
Anuradha Karuppiah [Sat, 9 May 2020 02:24:56 +0000 (19:24 -0700)]
bgpd: L3NHG infrastructure for host routes in EVPN

ES-VRF entries are maintained for the purpose of L3-NHG creation -
1. Each ES-EVI entry is associated with a tenant VRF. This associaton
triggers the creation of an ES-VRF entry.
2. Type-2/MAC-IP routes are imported into a tenant VRF and programmed as
a /32 or host route entry in the dataplane. If the destination of
the host route is a remote-ES the route is programmed with the
corresponding (keyed in by {vrf,ES-id}) L3-NHG.
3. The reason for this indirection (route->L3-NHG, L3-NHG->list-of-VTEPs)
is to avoid route updates to the dplane when a remote-ES link flaps i.e.
instead of updating all the dependent routes the NHG's contents are
updated. This reduces the amount of dataplane updates (fewer nhg updates vs.
route updates) allowing for a faster failover.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: skip VRF import of MAC-IP routes that belong to locally attached hosts
Anuradha Karuppiah [Sat, 9 May 2020 02:19:57 +0000 (19:19 -0700)]
bgpd: skip VRF import of MAC-IP routes that belong to locally attached hosts

Local attached hosts are routed via the access ports using the neigh and
fdb/MAC dplane entries.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agoMerge pull request #7475 from eololab/add-more-parameters-for-crosscompilation
Quentin Young [Tue, 24 Nov 2020 16:44:29 +0000 (11:44 -0500)]
Merge pull request #7475 from eololab/add-more-parameters-for-crosscompilation

build: add more precious variables for cross-compilation

4 years agoMerge pull request #7560 from opensourcerouting/fix_topotest_logs
Donald Sharp [Tue, 24 Nov 2020 16:30:14 +0000 (11:30 -0500)]
Merge pull request #7560 from opensourcerouting/fix_topotest_logs

topotests: Fix logging by redirecting it to correct file

4 years agobgpd: Add peerState field into JSON output for show bgp summary 7595/head
Donatas Abraitis [Tue, 24 Nov 2020 13:51:51 +0000 (15:51 +0200)]
bgpd: Add peerState field into JSON output for show bgp summary

vtysh -c 'show bgp summary json' | \
> jq '.ipv4Unicast.peers."192.168.0.2".peerState'
"Passive"

vtysh -c 'show bgp summary json' | \
> jq '.ipv4Unicast.peers."192.168.0.2".state'
"Established"

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoRevert "bgpd: identify passive connections in JSON summary"
Donatas Abraitis [Tue, 24 Nov 2020 13:32:35 +0000 (15:32 +0200)]
Revert "bgpd: identify passive connections in JSON summary"

This reverts commit 266ae3aa532d26d4e4ed2d1d1ca5887bb2ac882e.

4 years agoMerge pull request #7577 from donaldsharp/datacenter_stuff
Donatas Abraitis [Tue, 24 Nov 2020 08:02:39 +0000 (10:02 +0200)]
Merge pull request #7577 from donaldsharp/datacenter_stuff

Datacenter stuff

4 years agoMerge pull request #7592 from mjstapp/fix_restore_topo_scale
Donatas Abraitis [Tue, 24 Nov 2020 08:01:36 +0000 (10:01 +0200)]
Merge pull request #7592 from mjstapp/fix_restore_topo_scale

tests: restore route scale test to 1M routes

4 years agotests: restore route scale test to 1M routes 7592/head
Mark Stapp [Mon, 23 Nov 2020 21:53:43 +0000 (16:53 -0500)]
tests: restore route scale test to 1M routes

Restore the scale topotest config to use 1M routes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7223 from idryzhov/fix-vtysh-view-node
Quentin Young [Mon, 23 Nov 2020 18:36:41 +0000 (13:36 -0500)]
Merge pull request #7223 from idryzhov/fix-vtysh-view-node

vtysh: fix execution of commands from the view node

4 years agoisisd, tests: fix bug when sending TI-LFA repair paths to zebra 7591/head
Renato Westphal [Fri, 20 Nov 2020 03:54:41 +0000 (00:54 -0300)]
isisd, tests: fix bug when sending TI-LFA repair paths to zebra

Commit 4c75f7c7730220b fixed a bug in which the TI-LFA repair paths
weren't preserving the original Prefix-SID of the routes. That
commit, however, didn't update the zebra interface code to account
for backup nexthops that don't have a repair list but do have a
SR label. As a consequence, backup nexthops that didn't have any
repair label were not preserving the original Prefix-SID of the
corresponding routes. Fix this and update the TI-LFA topotest
accordingly.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoisisd: check vertex type before checking its data
Renato Westphal [Fri, 20 Nov 2020 22:26:45 +0000 (19:26 -0300)]
isisd: check vertex type before checking its data

vertex->N is an union whose "id" and "ip" fields are only valid
depending on the vertex type (IS adjacency or IP reachability
information). As such, add a vertex type check before consulting
vertex->N.id in order to prevent unexpected behavior from happening.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoisisd: fix some crashes with --tcli
Renato Westphal [Fri, 6 Nov 2020 13:02:16 +0000 (10:02 -0300)]
isisd: fix some crashes with --tcli

The "ifp" variable returned by nb_running_get_entry() might be
NULL when using the transactional CLI mode. Make the required
modifications to avoid null pointer dereferences.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoisisd: uninstall local routes that don't have any valid nexthop
Renato Westphal [Thu, 5 Nov 2020 12:40:26 +0000 (09:40 -0300)]
isisd: uninstall local routes that don't have any valid nexthop

Once the remote end of a connected link is shut down (or lose
its address), isisd will remove the corresponding route from its
RIB after SPF runs. A new route for the same destination should
be computed based on the local LSP, and that route by definition
doesn't have any nexthop.  The problem is that, when isisd tries
to replace the old route by the new one, it fails because routes
without nexthops can't be installed.  That causes the old invalid
route to remain in the RIB when it shouldn't. To fix this problem,
change the zebra interface code to uninstall a route whenever it
can't be installed (because it lacks nexthops) instead of doing
nothing in that case.

This change should fix occasional failures of the test_isis_sr_topo1
topotest.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #7565 from vishaldhingra/bgp_nb
Donatas Abraitis [Sat, 21 Nov 2020 20:19:53 +0000 (22:19 +0200)]
Merge pull request #7565 from vishaldhingra/bgp_nb

bgpd: sh running config is not considering values provided via -e for max-paths

4 years agoMerge pull request #7580 from ckishimo/bit-Nt
Donald Sharp [Sat, 21 Nov 2020 16:36:01 +0000 (11:36 -0500)]
Merge pull request #7580 from ckishimo/bit-Nt

ospfd: fix NSSA translate-always

4 years agoMerge pull request #7581 from mboehn/master
Donald Sharp [Sat, 21 Nov 2020 16:33:28 +0000 (11:33 -0500)]
Merge pull request #7581 from mboehn/master

doc: add bpgd --listenon implies --no_kernel

4 years agodoc: add bpgd --listenon implies --no_kernel 7581/head
Mathias Bøhn Grytemark [Sat, 21 Nov 2020 12:42:44 +0000 (13:42 +0100)]
doc: add bpgd --listenon implies --no_kernel

The bgpd --listenon option implies --no_kernel. This commit makes note
of that in the documentation.

Signed-off-by: Mathias Bøhn Grytemark <mathias@grytemark.no>
4 years agovtysh: fix node for "show yang operational-data" 7223/head
Igor Ryzhov [Sat, 21 Nov 2020 12:06:04 +0000 (15:06 +0300)]
vtysh: fix node for "show yang operational-data"

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agovtysh: fix execution of commands from the view node
Igor Ryzhov [Thu, 1 Oct 2020 16:12:10 +0000 (19:12 +0300)]
vtysh: fix execution of commands from the view node

We should not prepend "do" when executing commands from the view node,
because view node doesn't support "do" shortcut.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoospfd: fix NSSA translate-always 7580/head
ckishimo [Fri, 20 Nov 2020 21:53:20 +0000 (13:53 -0800)]
ospfd: fix NSSA translate-always

When an ABR NSSA router is configured to be ALWAYS the translator:
  r22(config-router)# area 1 nssa translate-always

It will advertise this condition in the type-1 LSA setting the Nt
bit, taking over the translator role from r33

  r22# show ip ospf
     We are an ABR and always an NSSA Translator.
  r33# show ip ospf
     We are an ABR, but not the NSSA Elected Translator.

However when the command above is removed:
  r22(config-router)# no area 1 nssa translate-always

the bit Nt needs to be cleared otherwise we end up with no translator
in the area
  r22# show ip ospf
     We are an ABR, but not the NSSA Elected Translator.
  r33# show ip ospf
     We are an ABR, but not the NSSA Elected Translator.

This PR forces the ABR to send a type-1 LSA with the Nt bit updated
according to the translator role

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
4 years agoMerge pull request #7576 from donaldsharp/rpki_stuff
Mark Stapp [Fri, 20 Nov 2020 20:07:44 +0000 (15:07 -0500)]
Merge pull request #7576 from donaldsharp/rpki_stuff

bgpd: Cleanup rpki indentation

4 years agobgpd: Remove restriction on certain connection types under HAVE_CUMULUS 7577/head
Donald Sharp [Fri, 20 Nov 2020 13:00:08 +0000 (08:00 -0500)]
bgpd: Remove restriction on certain connection types under HAVE_CUMULUS

Current code when we are establishing a peering relationship when
under the HAVE_CUMULUS block will dissallow v4/v6 connections if
we do not have v4/v6 addresses applied.  This restriction is
a bit harsh and should be allowed but warned against.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agovtysh: Start deprecation cycle for `address-family evpn`
Donald Sharp [Fri, 20 Nov 2020 01:46:55 +0000 (20:46 -0500)]
vtysh: Start deprecation cycle for `address-family evpn`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7574 from idryzhov/fix-quit
Donald Sharp [Fri, 20 Nov 2020 18:00:56 +0000 (13:00 -0500)]
Merge pull request #7574 from idryzhov/fix-quit

vtysh: send quit command to watchfrr

4 years agoMerge pull request #7551 from mjstapp/fix_doc_no_index
Quentin Young [Fri, 20 Nov 2020 17:15:31 +0000 (12:15 -0500)]
Merge pull request #7551 from mjstapp/fix_doc_no_index

doc: don't index 'no' forms of commands

4 years agotopotests: Fix logging by redirecting it to correct file 7560/head
Martin Winter [Thu, 19 Nov 2020 01:45:24 +0000 (02:45 +0100)]
topotests: Fix logging by redirecting it to correct file

Fix lib to start loggin to correct daemon file on startup
Fix bgp-auth tests for the logging changes
Fixes Issue # 7545

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
4 years agovtysh: send quit command to watchfrr 7574/head
Igor Ryzhov [Fri, 20 Nov 2020 14:42:39 +0000 (17:42 +0300)]
vtysh: send quit command to watchfrr

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agobgpd: Cleanup rpki indentation 7576/head
Donald Sharp [Fri, 20 Nov 2020 13:44:25 +0000 (08:44 -0500)]
bgpd: Cleanup rpki indentation

Rework a couple functions to allow the indentation to be a bit
cleaner.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7569 from patrasar/pim_coverity_fix
Donald Sharp [Fri, 20 Nov 2020 12:40:06 +0000 (07:40 -0500)]
Merge pull request #7569 from patrasar/pim_coverity_fix

pimd: Fix SA issues found in Coverity Scan

4 years agobgpd: sh running config is not considering values provided via -e for max-paths 7565/head
vdhingra [Thu, 19 Nov 2020 12:46:39 +0000 (04:46 -0800)]
bgpd: sh running config is not considering values provided via -e for max-paths

problem
1. run the bgp with -e1 option
2. c t
   router bgp 100
3. show running config
    !
     address-family ipv6 multicast
      maximum-paths 1
      maximum-paths ibgp 1
     exit-address-family
    !
address families should not dump maximum-paths if there
value is same as value provided at run time.

fix
if the maxpaths_ebgp value is same as multipath_num global
object, don't dump maximum-paths.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
4 years agopimd: Fix SA issues found in Coverity Scan 7569/head
Sarita Patra [Fri, 20 Nov 2020 08:01:19 +0000 (00:01 -0800)]
pimd: Fix SA issues found in Coverity Scan

Signed-off-by: Sarita Patra <saritap@vmware.com>
4 years agoMerge pull request #7562 from donaldsharp/python_fixes
Donatas Abraitis [Fri, 20 Nov 2020 07:37:58 +0000 (09:37 +0200)]
Merge pull request #7562 from donaldsharp/python_fixes

tests: Fix common_config.py issues

4 years agoMerge pull request #7559 from ckishimo/translator
Donald Sharp [Fri, 20 Nov 2020 00:33:59 +0000 (19:33 -0500)]
Merge pull request #7559 from ckishimo/translator

ospfd: fix NSSA translator

4 years agoMerge pull request #7546 from mjstapp/limit_fds
Donald Sharp [Fri, 20 Nov 2020 00:28:57 +0000 (19:28 -0500)]
Merge pull request #7546 from mjstapp/limit_fds

lib: add startup-time option to limit fds used

4 years agoMerge pull request #7568 from idryzhov/fix-naming
Donald Sharp [Fri, 20 Nov 2020 00:25:56 +0000 (19:25 -0500)]
Merge pull request #7568 from idryzhov/fix-naming

lib: fix local variable shadowing global one

4 years agoMerge pull request #7544 from andylemin/master
Donald Sharp [Fri, 20 Nov 2020 00:24:42 +0000 (19:24 -0500)]
Merge pull request #7544 from andylemin/master

bgpd: added bmp read check to detect broken sessions

4 years agoMerge pull request #7564 from pguibert6WIND/fix_typo_topotest
Donald Sharp [Thu, 19 Nov 2020 23:36:48 +0000 (18:36 -0500)]
Merge pull request #7564 from pguibert6WIND/fix_typo_topotest

doc: topotest json typo error

4 years agoRevert "debian: Merge various debian changelogs in debian/changelog"
Quentin Young [Thu, 19 Nov 2020 22:12:42 +0000 (17:12 -0500)]
Revert "debian: Merge various debian changelogs in debian/changelog"

This reverts commit da3a39ff6a131039ef67e01637333353f3095adb.

4 years agoRevert "debian: Adjust tarsource.sh to use native debian/changelog"
Quentin Young [Thu, 19 Nov 2020 22:12:41 +0000 (17:12 -0500)]
Revert "debian: Adjust tarsource.sh to use native debian/changelog"

This reverts commit 4ffb9a4c9ddd0ef3f770c0bc2674c4818331780d.

4 years agoRevert "debian: Update tools/build-debian-package.sh to use git-buildpackage"
Quentin Young [Thu, 19 Nov 2020 22:12:40 +0000 (17:12 -0500)]
Revert "debian: Update tools/build-debian-package.sh to use git-buildpackage"

This reverts commit 63c0c8ed89e1564294ff174b819e520d5977f499.

4 years agoRevert "debian: Remove the changelog-auto automation in favor of dch"
Quentin Young [Thu, 19 Nov 2020 22:12:40 +0000 (17:12 -0500)]
Revert "debian: Remove the changelog-auto automation in favor of dch"

This reverts commit cace1d9bf178d447599fe7caa5ccad9a89babe03.

4 years agoRevert "debian: Remove now obsolete tarsource.sh script"
Quentin Young [Thu, 19 Nov 2020 22:12:38 +0000 (17:12 -0500)]
Revert "debian: Remove now obsolete tarsource.sh script"

This reverts commit bc304e08ea48523b4c70d1d330eaefba3b6b7a6c.

4 years agoRevert "debian: Update the tools/build-debian-package.sh to be example build script"
Quentin Young [Thu, 19 Nov 2020 22:12:27 +0000 (17:12 -0500)]
Revert "debian: Update the tools/build-debian-package.sh to be example build script"

This reverts commit c950a7f214cd713652da1b6b78eca9278c33b448.

4 years agolib: fix local variable shadowing global one 7568/head
Igor Ryzhov [Thu, 19 Nov 2020 21:41:50 +0000 (00:41 +0300)]
lib: fix local variable shadowing global one

start_config and end_config are already used as function names in DEFUN,
so the current naming is a little bit confusing. Let's use different
names for arguments.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agodebian: Update the tools/build-debian-package.sh to be example build script
Ondřej Surý [Sun, 27 Sep 2020 11:17:57 +0000 (13:17 +0200)]
debian: Update the tools/build-debian-package.sh to be example build script

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agodebian: Remove now obsolete tarsource.sh script
Ondřej Surý [Sun, 27 Sep 2020 10:18:21 +0000 (12:18 +0200)]
debian: Remove now obsolete tarsource.sh script

4 years agodebian: Remove the changelog-auto automation in favor of dch
Ondřej Surý [Sun, 27 Sep 2020 09:46:31 +0000 (11:46 +0200)]
debian: Remove the changelog-auto automation in favor of dch

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agodebian: Update tools/build-debian-package.sh to use git-buildpackage
Ondřej Surý [Sun, 27 Sep 2020 09:08:13 +0000 (11:08 +0200)]
debian: Update tools/build-debian-package.sh to use git-buildpackage

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agodebian: Adjust tarsource.sh to use native debian/changelog
Ondřej Surý [Sat, 26 Sep 2020 16:53:34 +0000 (18:53 +0200)]
debian: Adjust tarsource.sh to use native debian/changelog

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agodebian: Merge various debian changelogs in debian/changelog
Ondřej Surý [Sat, 26 Sep 2020 16:33:06 +0000 (18:33 +0200)]
debian: Merge various debian changelogs in debian/changelog

Signed-off-by: Ondřej Surý <ondrej@sury.org>
4 years agoMerge pull request #7566 from ton31337/fix/topotests_bgp_ebgp_requires_policy
Mark Stapp [Thu, 19 Nov 2020 18:32:56 +0000 (13:32 -0500)]
Merge pull request #7566 from ton31337/fix/topotests_bgp_ebgp_requires_policy

tests: Add more descriptive error messages and increase timeouts

4 years agoMerge pull request #7424 from donaldsharp/config_commands
Mark Stapp [Thu, 19 Nov 2020 17:40:50 +0000 (12:40 -0500)]
Merge pull request #7424 from donaldsharp/config_commands

lib, sharpd, vtysh: When reading a file in for config send start/end …

4 years agoMerge pull request #6145 from patrasar/pim_nb_code_upstream
Donald Sharp [Thu, 19 Nov 2020 16:03:00 +0000 (11:03 -0500)]
Merge pull request #6145 from patrasar/pim_nb_code_upstream

pimd: northbound backend code

4 years agoMerge pull request #7563 from donaldsharp/why_not_cut_n_paste
Mark Stapp [Thu, 19 Nov 2020 15:58:21 +0000 (10:58 -0500)]
Merge pull request #7563 from donaldsharp/why_not_cut_n_paste

ospf6d: More lists being leaked

4 years agoMerge pull request #7561 from donaldsharp/resources_are_the_life
Mark Stapp [Thu, 19 Nov 2020 14:56:51 +0000 (09:56 -0500)]
Merge pull request #7561 from donaldsharp/resources_are_the_life

lib: Stop socket from leaking.

4 years agolib: Add information log of how long configuration took to read in 7424/head
Donald Sharp [Fri, 30 Oct 2020 19:33:33 +0000 (15:33 -0400)]
lib: Add information log of how long configuration took to read in

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib, sharpd, vtysh: When reading a file in for config send start/end indicators
Donald Sharp [Fri, 30 Oct 2020 18:10:55 +0000 (14:10 -0400)]
lib, sharpd, vtysh: When reading a file in for config send start/end indicators

When reading a file in for configuration, send start and end indicators
to interested parties.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agotests: Add more descriptive error messages and increase timeouts 7566/head
Donatas Abraitis [Thu, 19 Nov 2020 14:32:46 +0000 (16:32 +0200)]
tests: Add more descriptive error messages and increase timeouts

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agodoc: topotest json typo error 7564/head
Philippe Guibert [Wed, 18 Nov 2020 10:38:19 +0000 (10:38 +0000)]
doc: topotest json typo error

fix the typo error.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agoospf6d: More lists being leaked 7563/head
Donald Sharp [Thu, 19 Nov 2020 13:04:51 +0000 (08:04 -0500)]
ospf6d: More lists being leaked

Apparently the person who wrote this code was big into
cut-n-paste.  Commit 710a61d57c8f1b0ea66a37f09bad2161d7e2ddb7
found the first instance, but upon code inspection this morning
it became evident that 2 other functions had the exact same
problem.

Fix.  Note I have not cleaned up the cut-n-paste code for
two reasons: a) I'm chasing something else b) this code
has been fairly un-maintained for a very long time.  No
need to start up now.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agotests: Fix common_config.py issues 7562/head
Donald Sharp [Thu, 19 Nov 2020 12:40:03 +0000 (07:40 -0500)]
tests: Fix common_config.py issues

1) in generate_ips if start_ipaddr does not have a `/` in it
there exists a code path where both mask and step are
null values.  Write a bit of code to ensure this pre-req
is found early and often

2) in verify_rib there exists a code path where static_route
is null when we get to the non static route section.  Change
the code to operate on the advertise_network_dict that
we are iterating over.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib: Stop socket from leaking. 7561/head
Donald Sharp [Thu, 19 Nov 2020 12:02:15 +0000 (07:02 -0500)]
lib: Stop socket from leaking.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7554 from donaldsharp/sockunion2hostprefix_watch_returns
Donatas Abraitis [Thu, 19 Nov 2020 09:26:02 +0000 (11:26 +0200)]
Merge pull request #7554 from donaldsharp/sockunion2hostprefix_watch_returns

bgpd, lib, nhrpd, zebra: verify return of sockunion2hostprefix

4 years agoMerge pull request #7528 from donaldsharp/changelog_update
Donatas Abraitis [Thu, 19 Nov 2020 08:43:26 +0000 (10:43 +0200)]
Merge pull request #7528 from donaldsharp/changelog_update

Changelog update

4 years agoospfd: fix NSSA translator 7559/head
ckishimo [Thu, 19 Nov 2020 07:23:14 +0000 (23:23 -0800)]
ospfd: fix NSSA translator

Having 2 ABR in NSSA area where R3 is the elected translator

R3# show ip ospf
  We are an ABR and the NSSA Elected Translator.
R2# show ip ospf
  We are an ABR, but not the NSSA Elected Translator.

When R3 loses the Border condition by shutting down the interface
to the backbone, we end up with no translator in the NSSA area. It
is expected R2 to take over the translator role

R3# sh ip ospf
  It is not ABR, therefore not Translator.
R2# show ip ospf
   We are an ABR, but not the NSSA Elected Translator.

This PR forces the ABR to reevaluate the translator condition, so
R2 becomes the elected Translator

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
4 years agopimd: fix indentation issues 6145/head
Sarita Patra [Fri, 6 Nov 2020 11:51:20 +0000 (03:51 -0800)]
pimd: fix indentation issues

Signed-off-by: Sarita Patra <saritap@vmware.com>
4 years agoMerge pull request #7210 from idryzhov/route-types-disable-daemon
Donald Sharp [Thu, 19 Nov 2020 00:38:14 +0000 (19:38 -0500)]
Merge pull request #7210 from idryzhov/route-types-disable-daemon

lib: respect --disable-daemon flags in route_types.h

4 years agoMerge pull request #7454 from ranjanyash54/dev_8
Donald Sharp [Wed, 18 Nov 2020 23:37:30 +0000 (18:37 -0500)]
Merge pull request #7454 from ranjanyash54/dev_8

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

4 years agoMerge pull request #7455 from ranjanyash54/dev_3
Donald Sharp [Wed, 18 Nov 2020 23:33:09 +0000 (18:33 -0500)]
Merge pull request #7455 from ranjanyash54/dev_3

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

4 years agoMerge pull request #7467 from ton31337/fix/bgpd_null_dereference
Donald Sharp [Wed, 18 Nov 2020 23:13:04 +0000 (18:13 -0500)]
Merge pull request #7467 from ton31337/fix/bgpd_null_dereference

bgpd: Check if peer is not NULL before calling peer_as_change()

4 years agoMerge pull request #7558 from opensourcerouting/bfd-v6-same
Donald Sharp [Wed, 18 Nov 2020 22:53:42 +0000 (17:53 -0500)]
Merge pull request #7558 from opensourcerouting/bfd-v6-same

bfdd: fix multiple links same address

4 years agoMerge pull request #7296 from YashRanjanVMWare/dev_1
Donald Sharp [Wed, 18 Nov 2020 22:50:42 +0000 (17:50 -0500)]
Merge pull request #7296 from YashRanjanVMWare/dev_1

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

4 years agoMerge pull request #7556 from donaldsharp/memory_shenanigans
Mark Stapp [Wed, 18 Nov 2020 22:31:03 +0000 (17:31 -0500)]
Merge pull request #7556 from donaldsharp/memory_shenanigans

Memory shenanigans

4 years agolib: add startup option to limit fds 7546/head
Mark Stapp [Tue, 17 Nov 2020 18:30:05 +0000 (13:30 -0500)]
lib: add startup option to limit fds

Add a startup-time option to limit the number of fds used
by the thread/event infrastructure. If nothing is configured,
the system ulimit is used.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7552 from volta-networks/fix_reload_l2pvn
Donald Sharp [Wed, 18 Nov 2020 20:27:51 +0000 (15:27 -0500)]
Merge pull request #7552 from volta-networks/fix_reload_l2pvn

tools: fix frr-reload l2vpn delete

4 years agoMerge pull request #7555 from idryzhov/cppcheck-fixes
Mark Stapp [Wed, 18 Nov 2020 19:29:25 +0000 (14:29 -0500)]
Merge pull request #7555 from idryzhov/cppcheck-fixes

fix a couple of issues found by cppcheck

4 years agobfdd: fix multiple links same address 7558/head
Rafael Zalamena [Wed, 18 Nov 2020 18:47:00 +0000 (15:47 -0300)]
bfdd: fix multiple links same address

Allows users with multiple links using same IPv6 address (same VRF) to
work.

Reported-by: Matti Suuronen
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agobgpd: Prevent ecommunity_ecom2str memory leak 7556/head
Donald Sharp [Wed, 18 Nov 2020 17:50:48 +0000 (12:50 -0500)]
bgpd: Prevent ecommunity_ecom2str memory leak

We were allocating but never freeing memory associated with the
ecommunity_ecom2str allocation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Do not leak vname if we find the match
Donald Sharp [Wed, 18 Nov 2020 17:10:22 +0000 (12:10 -0500)]
bgpd: Do not leak vname if we find the match

If we are attempting to store the bgp name for route
leaking and we find a match do not leak the memory.

Please note this is probably not really going to happen
ever.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7553 from donaldsharp/mem_leak_ferr
Mark Stapp [Wed, 18 Nov 2020 16:56:34 +0000 (11:56 -0500)]
Merge pull request #7553 from donaldsharp/mem_leak_ferr

lib: Cleanup mem-leaks in error case

4 years agoospf6d: Free up list memory
Donald Sharp [Wed, 18 Nov 2020 16:42:50 +0000 (11:42 -0500)]
ospf6d: Free up list memory

OSPFv3 snmp code creates a list but never deletes the actual
list.  Do so.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agopimd: A buffer may be used uninited
Donald Sharp [Wed, 18 Nov 2020 16:42:06 +0000 (11:42 -0500)]
pimd: A buffer may be used uninited

If we screw up and don't have the right flags we'll print
out garbage.  At the very least just print out nothing.

Signed-off-by: Donald Sharp <sharp@nvidia.com>
4 years agolib: fix macro style 7555/head
Igor Ryzhov [Wed, 18 Nov 2020 16:13:47 +0000 (19:13 +0300)]
lib: fix macro style

We prefer semicolon in the actual code instead of macro elsewhere in the
code.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoisisd: fix uninitialized variable
Igor Ryzhov [Wed, 18 Nov 2020 16:07:49 +0000 (19:07 +0300)]
isisd: fix uninitialized variable

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoospf6d: fix compilation of debug code
Igor Ryzhov [Wed, 18 Nov 2020 16:06:10 +0000 (19:06 +0300)]
ospf6d: fix compilation of debug code

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agozebra: fix writing to pointer instead of value
Igor Ryzhov [Wed, 18 Nov 2020 16:05:30 +0000 (19:05 +0300)]
zebra: fix writing to pointer instead of value

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>