]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
2 years agoMerge pull request #10400 from opensourcerouting/pim6-compilefix
Donald Sharp [Sat, 26 Feb 2022 13:03:06 +0000 (08:03 -0500)]
Merge pull request #10400 from opensourcerouting/pim6-compilefix

pim6d: get running with ipv6 types throughout

2 years agoMerge pull request #10658 from proelbtn/fix/srv6-l3vpn-transposition
Russ White [Fri, 25 Feb 2022 21:06:47 +0000 (16:06 -0500)]
Merge pull request #10658 from proelbtn/fix/srv6-l3vpn-transposition

bgpd: Change the format of announcement for SRv6 L3VPN

2 years agoMerge pull request #10655 from donaldsharp/timers_warning_when_large
Sri Mohana Singamsetty [Fri, 25 Feb 2022 16:05:45 +0000 (08:05 -0800)]
Merge pull request #10655 from donaldsharp/timers_warning_when_large

lib: Add a Dev catch for when a timer is set for > 1 year

2 years agobgpd: change the treatment for SRv6 routes
Ryoga Saito [Fri, 25 Feb 2022 13:44:07 +0000 (13:44 +0000)]
bgpd: change the treatment for SRv6 routes

This patch adds transpostion_offset and transposition_len to bgp_sid_info,
and transposes SID only at bgp_zebra_announce.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
2 years agobgpd: announce locators instead of transposed SIDs
Ryoga Saito [Fri, 25 Feb 2022 13:42:32 +0000 (13:42 +0000)]
bgpd: announce locators instead of transposed SIDs

This patch changes the format of the Prefix-SID advertised by
bgpd. In current implementation, transposed SIDs were
advertised, which caused two problems:

1. bgpd that receives SRv6 L3VPN routes whose SID is
   transposed couldn't put bgp_attr_srv6_l3vpn whose those
   routes together. This leads extra memory consumption.

2. Some implementation will reject a route with transposed SID.
   This will affect interoperability.

For those reasons, in this patch, instead of advertising
transposed SID, we change it to advertise the locator of SID.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
2 years agobgpd: update logic to allocate SRv6 locator
Ryoga Saito [Fri, 25 Feb 2022 13:40:28 +0000 (13:40 +0000)]
bgpd: update logic to allocate SRv6 locator

For the later patches, this patch changes the behavior of alloc_new sid
so that bgpd record not only SID for VRF, but also Locator of SID.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
2 years agolib: Add a Dev catch for when a timer is set for > 1 year
Donald Sharp [Fri, 25 Feb 2022 13:19:07 +0000 (08:19 -0500)]
lib: Add a Dev catch for when a timer is set for > 1 year

Since there are timers that are created based upon doing some
math and we know that unsigned values when doing math and we accidently
subtract a larger number from a smaller number causes the unsigned
number to wrap to very large numbers, let's put in a small catch
in place to see if there are any places in the system that
mistakes are made and FRR is accidently creating a problem
for itself.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10650 from rgirada/ospf_ei
Donald Sharp [Thu, 24 Feb 2022 19:44:55 +0000 (14:44 -0500)]
Merge pull request #10650 from rgirada/ospf_ei

ospfd: NULL passed instead of ei pointer in external lsa origination

2 years agoospfd: NULL passed instead of ei pointer in external lsa origination
rgirada [Thu, 24 Feb 2022 17:33:08 +0000 (09:33 -0800)]
ospfd: NULL passed instead of ei pointer in external lsa origination

Description:
NULL pointer wrongly passed instead of 'ei' pointer to
ospf_external_lsa_originate() API in opaque capability enable/disable
which always make it to fail in origination.
Corrected it by passing actual ei pointer.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2 years agoMerge pull request #10632 from donaldsharp/thread_return_null
Christian Hopps [Thu, 24 Feb 2022 06:43:48 +0000 (01:43 -0500)]
Merge pull request #10632 from donaldsharp/thread_return_null

*: Change thread->func to return void instead of int

2 years agoMerge pull request #10628 from anlancs/pimd-minors
Jafar Al-Gharaibeh [Thu, 24 Feb 2022 05:26:58 +0000 (23:26 -0600)]
Merge pull request #10628 from anlancs/pimd-minors

pimd: cosmetic change

2 years ago*: Change thread->func to return void instead of int
Donald Sharp [Wed, 23 Feb 2022 00:04:25 +0000 (19:04 -0500)]
*: Change thread->func to return void instead of int

The int return value is never used.  Modify the code
base to just return a void instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10385 from iqras23/nh
Russ White [Wed, 23 Feb 2022 21:45:36 +0000 (16:45 -0500)]
Merge pull request #10385 from iqras23/nh

zebra: Nexthop tracking, route resolution recursive lookup

2 years agoMerge pull request #10621 from donaldsharp/cov_fun
Jafar Al-Gharaibeh [Wed, 23 Feb 2022 17:33:46 +0000 (11:33 -0600)]
Merge pull request #10621 from donaldsharp/cov_fun

Cov fun

2 years agoMerge pull request #10585 from ton31337/feature/advmap_set
Igor Ryzhov [Wed, 23 Feb 2022 16:23:03 +0000 (19:23 +0300)]
Merge pull request #10585 from ton31337/feature/advmap_set

bgpd: Allow setting attributes over route-maps for conditional advert…

2 years agoMerge pull request #10633 from ton31337/fix/deprecate_sr_local-block
Igor Ryzhov [Wed, 23 Feb 2022 11:37:45 +0000 (14:37 +0300)]
Merge pull request #10633 from ton31337/fix/deprecate_sr_local-block

isisd: Drop deprecated `segment-routing local-block` command

2 years agoisisd: Drop deprecated `segment-routing local-block` command
Donatas Abraitis [Wed, 23 Feb 2022 06:43:07 +0000 (08:43 +0200)]
isisd: Drop deprecated `segment-routing local-block` command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #10615 from mobash-rasool/fixes
Jafar Al-Gharaibeh [Tue, 22 Feb 2022 17:45:45 +0000 (11:45 -0600)]
Merge pull request #10615 from mobash-rasool/fixes

pimd: Do not allow 224.0.0.0/24 range in igmp join

2 years agotests: Fix style issues in common_config.py
Iqra Siddiqui [Tue, 22 Feb 2022 17:25:58 +0000 (09:25 -0800)]
tests: Fix style issues in common_config.py

Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
2 years agotests: Add supporting test to validate NH resolution logic
Iqra Siddiqui [Thu, 17 Feb 2022 09:58:15 +0000 (01:58 -0800)]
tests: Add supporting test to validate NH resolution logic

Co-authored-by: Vijay Kumar Gupta <vijayg@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
2 years agozebra: Nexthop tracking, route resolution recursive lookup
vdhingra [Wed, 3 Feb 2021 13:58:12 +0000 (05:58 -0800)]
zebra: Nexthop tracking, route resolution recursive lookup

Description:
===========
Change is intended for fixing the NHT resolution logic.
While recursively resolving nexthop, keep looking for a valid/useable route in the rib,
by not stopping at the first/most-specific route in the rib.

Consider the following set of events taking place on R1:
R1(config)# ip route 2.2.2.0/24 ens192
R1# sharp watch nexthop 2.2.2.32 connected
R1# show ip nht
2.2.2.32(Connected)
 resolved via static
 is directly connected, ens192
 Client list: sharp(fd 33)

-2.2.2.32 NHT is resolved over the above valid static route.

R1# sharp install routes 2.2.2.32 nexthop 2.2.2.32 1
R1# 2.2.2.32(Connected)
 resolved via static
 is directly connected, ens192
 Client list: sharp(fd 33)

-.32/32 comes which is going to resolve through itself, but since this is an invalid route,
it will be marked as inactive and will not affect the NHT.

R1# sharp install routes 2.2.2.31 nexthop 2.2.2.32 1
R1# 2.2.2.32(Connected)
 unresolved(Connected)
 Client list: sharp(fd 50)

-Now a .31/32 comes which will resolve over .32 route, but as per the current logic,
this will trigger the NHT check, in turn making the NHT unresolved.

-With fix, NHT should stay in resolved state as long as the valid static or connected route stays installed

Fix:
====
-While resolving nexthops, walk up the tree from the most-specific match,
walk up the tree without any ZEBRA_NHT_CONNECTED check.

Co-authored-by: Vishal Dhingra <vdhingra@vmware.com>
Co-authored-by: Kantesh Mundaragi <kmundaragi@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
2 years agoMerge pull request #10593 from donaldsharp/rip_cleanup
Russ White [Tue, 22 Feb 2022 16:30:36 +0000 (11:30 -0500)]
Merge pull request #10593 from donaldsharp/rip_cleanup

ripd: Cleanup ripd.c indentation levels and comments

2 years agoMerge pull request #10625 from Jafaral/ospf-ns-vrf
Russ White [Tue, 22 Feb 2022 16:28:19 +0000 (11:28 -0500)]
Merge pull request #10625 from Jafaral/ospf-ns-vrf

topotests: give  a couple of ospf topotests better descriptive names

2 years agopceplib: Fix uninited data in test vehicle
Donald Sharp [Tue, 22 Feb 2022 13:21:32 +0000 (08:21 -0500)]
pceplib: Fix uninited data in test vehicle

Coverity SA found this.  Fix

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoeigrpd: Up convert to uint64_t before doing math
Donald Sharp [Fri, 18 Feb 2022 15:55:16 +0000 (10:55 -0500)]
eigrpd: Up convert to uint64_t before doing math

Intentionally up convert uint8_t and uint32_t values
to a uint64_t before doing math to make Coverity happy.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobfdd: Fix overflow possibility with time statements
Donald Sharp [Fri, 18 Feb 2022 15:45:46 +0000 (10:45 -0500)]
bfdd: Fix overflow possibility with time statements

If time ( a uint64_t ) is large enough doing division
and subtraction can still lead to situations where
the resulting number is greater than a uint32_t.
Just use uint32_t as an intermediate storage spot.
This is unlikely to every occur in a time frame
I could possibly care about but makes Coverity happy.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib: Fix possible usage of uninited data
Donald Sharp [Thu, 17 Feb 2022 19:07:57 +0000 (14:07 -0500)]
lib: Fix possible usage of uninited data

assert when if_lookup_address is passed with
a family that is not AF_INET or AF_INET6 as
that we are dead in the water and this is a
dev escape

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10618 from louis-oui/topo-win-title
Jafar Al-Gharaibeh [Mon, 21 Feb 2022 16:26:34 +0000 (10:26 -0600)]
Merge pull request #10618 from louis-oui/topo-win-title

topotests: fix the usage of screen

2 years agopimd: cosmetic change
anlan_cs [Sun, 30 Jan 2022 07:13:39 +0000 (02:13 -0500)]
pimd: cosmetic change

Remove one empty line. And correct one word.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agotopotests: set router name as title in screen and xterm
Louis Scalbert [Fri, 18 Feb 2022 12:37:00 +0000 (13:37 +0100)]
topotests: set router name as title in screen and xterm

When running a topotest with the --shell or --vtysh argument, the
window titles of the routers are generic.

Set the router name as title to identify correctly the window.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agotopotests: fix usage of screen
Louis Scalbert [Fri, 18 Feb 2022 12:34:50 +0000 (13:34 +0100)]
topotests: fix usage of screen

Opening new tab in screen is not possible when using option --vtysh or
--shell. Error 'No such file or directory'.

Fix the issue.

Fixes: 6a5433ef0b ("tests: NEW micronet replacement for mininet")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2 years agopimd: Do not allow 224.0.0.0/24 range in igmp join
Mobashshera Rasool [Fri, 18 Feb 2022 06:03:07 +0000 (22:03 -0800)]
pimd: Do not allow 224.0.0.0/24 range in igmp join

224.0.0.0/24 cannot be used by igmp since this is reserved
for routing protocols and other low-level topology discovery or
maintenance protocols.

Fixes: #10614
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agotests: rename topotest ospf_topo1_vrf to ospf_netns_vrf
Jafar Al-Gharaibeh [Sun, 20 Feb 2022 20:12:43 +0000 (14:12 -0600)]
tests: rename topotest ospf_topo1_vrf to ospf_netns_vrf

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agotests: rename topotest ospf_topo2 to ospf_unnumbered
Jafar Al-Gharaibeh [Sun, 20 Feb 2022 19:57:56 +0000 (13:57 -0600)]
tests: rename topotest ospf_topo2 to ospf_unnumbered

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agoMerge pull request #10539 from chiragshah6/evpn_dev1
Donatas Abraitis [Sat, 19 Feb 2022 09:08:29 +0000 (11:08 +0200)]
Merge pull request #10539 from chiragshah6/evpn_dev1

bgpd: evpn route-map match ead type-1 route-type

2 years agobgpd: Allow setting attributes over route-maps for conditional advertisements
Donatas Abraitis [Tue, 15 Feb 2022 16:08:32 +0000 (18:08 +0200)]
bgpd: Allow setting attributes over route-maps for conditional advertisements

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoMerge pull request #10604 from mjstapp/fix_staticd_nh_count
Jafar Al-Gharaibeh [Fri, 18 Feb 2022 00:51:51 +0000 (18:51 -0600)]
Merge pull request #10604 from mjstapp/fix_staticd_nh_count

staticd: reject route config with too many nexthops

2 years agoMerge pull request #10591 from donaldsharp/rip_packet_fix
Donatas Abraitis [Thu, 17 Feb 2022 19:58:50 +0000 (21:58 +0200)]
Merge pull request #10591 from donaldsharp/rip_packet_fix

ripd: Fix packet send for non primary addresses

2 years agodoc: add description for match evpn route-type
Chirag Shah [Thu, 17 Feb 2022 05:39:43 +0000 (21:39 -0800)]
doc: add description for match evpn route-type

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agobgpd: evpn route-map match esr type-4 route-type
Chirag Shah [Fri, 11 Feb 2022 03:35:14 +0000 (19:35 -0800)]
bgpd: evpn route-map match esr type-4 route-type

Testing:

After fix:

bharat(config-route-map)# match evpn route-type
  1          EAD (Type-1) route
  2          MAC-IP (Type-2) route
  3          Multicast (Type-3) route
  4          Ethernet Segment (Type-4) route <----
  5          Prefix (Type-5) route
  ead        EAD (Type-1) route
  es         Ethernet Segment (Type-4) route
  macip      MAC-IP (Type-2) route
  multicast  Multicast (Type-3) route
  prefix     Prefix (Type-5) route

bharat(config-route-map)# match evpn route-type 4
bharat(config-route-map)# do show running-config
Building configuration...
...
!
route-map ALLOW_EVPN_R permit 10
 match evpn route-type es    <----
exit

BGP:
route-map: ALLOW_EVPN_R Invoked: 0 Optimization: enabled Processed Change: false
 permit, sequence 10 Invoked 0
  Match clauses:
    evpn route-type es  <-----
  Set clauses:
  Call clause:
  Action:
    Exit routemap

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agobgpd: evpn route-map match ead type-1 route-type
Chirag Shah [Tue, 8 Feb 2022 20:59:16 +0000 (12:59 -0800)]
bgpd: evpn route-map match ead type-1 route-type

Add evpn mh route type-1 (EAD) to match clause
of route-map.

Ticket: issue#10461
Reviewed By:
Testing Done:

With fix:

vtep1(config-route-map)# match evpn route-type
  1          EAD (Type-1) route
  2          MAC-IP (Type-2) route
  3          Multicast (Type-3) route
  5          Prefix (Type-5) route
  ead        EAD (Type-1) route
  macip      MAC-IP (Type-2) route
  multicast  Multicast (Type-3) route
  prefix     Prefix (Type-5) route

vtep1# show running-config bgpd
....
route-map HOST_ALLOW_1 permit 1
 match evpn route-type ead

vtep1# show route-map HOST_ALLOW_1

BGP:
route-map: HOST_ALLOW_1 Invoked: 6 Optimization: disabled Processed Change: false
 permit, sequence 1 Invoked 6
  Match clauses:
    ip address prefix-list LOCAL_HOST_VRF1
    evpn route-type ead

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agostaticd: reject route config with too many nexthops
Mark Stapp [Thu, 17 Feb 2022 14:49:41 +0000 (09:49 -0500)]
staticd: reject route config with too many nexthops

Restrict the number of nexthops for a route to the compiled-in
limit. Be careful with the zapi route struct's array of nexthops
too.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2 years agostaticd: capture zebra's advertised ECMP limit
Mark Stapp [Thu, 17 Feb 2022 14:53:25 +0000 (09:53 -0500)]
staticd: capture zebra's advertised ECMP limit

Capture the ECMP limit advertised by zebra (via zapi).

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2 years agostaticd: fix spelling in an error message
Mark Stapp [Thu, 17 Feb 2022 14:48:07 +0000 (09:48 -0500)]
staticd: fix spelling in an error message

whitespace change to fix a typo.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2 years agoMerge pull request #10557 from alexk99/zebra-fpm-multihop-weight
Donald Sharp [Thu, 17 Feb 2022 14:41:52 +0000 (09:41 -0500)]
Merge pull request #10557 from alexk99/zebra-fpm-multihop-weight

Zebra FPM: don't lose next hop weights while exporting via FPM

2 years agoMerge pull request #10582 from anlancs/pimd-remove-redundant
Donald Sharp [Thu, 17 Feb 2022 13:06:14 +0000 (08:06 -0500)]
Merge pull request #10582 from anlancs/pimd-remove-redundant

pimd: remove redundant code

2 years agoMerge pull request #8968 from donaldsharp/route_map_test
Jafar Al-Gharaibeh [Thu, 17 Feb 2022 05:07:25 +0000 (23:07 -0600)]
Merge pull request #8968 from donaldsharp/route_map_test

tests: Cleanup test_route_map_topo1.py from pylint

2 years agoMerge pull request #10547 from donaldsharp/10458
Russ White [Thu, 17 Feb 2022 00:20:47 +0000 (19:20 -0500)]
Merge pull request #10547 from donaldsharp/10458

zebra: Keep the interface flags safe on multiple ioctl calls

2 years agotests: Cleanup test_route_map_topo1.py from pylint
Donald Sharp [Thu, 1 Jul 2021 11:35:28 +0000 (07:35 -0400)]
tests: Cleanup test_route_map_topo1.py from pylint

noticed that pylint was complaining about some easily
fixable stuff in test_route_map_topo1.py so let's clean
it up some.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10558 from Jafaral/ospf-net-or-iface
Donatas Abraitis [Wed, 16 Feb 2022 20:10:21 +0000 (22:10 +0200)]
Merge pull request #10558 from Jafaral/ospf-net-or-iface

doc: mixing `ip ospf` and `network` commands is not supported

2 years agoMerge pull request #10598 from mobash-rasool/pim-compile-fix
Igor Ryzhov [Wed, 16 Feb 2022 19:15:09 +0000 (22:15 +0300)]
Merge pull request #10598 from mobash-rasool/pim-compile-fix

pimd: Fix Compilation issue in PIM

2 years agoMerge pull request #10561 from mjstapp/nlsock_hash_lock
Jafar Al-Gharaibeh [Wed, 16 Feb 2022 19:11:21 +0000 (13:11 -0600)]
Merge pull request #10561 from mjstapp/nlsock_hash_lock

zebra: make netlink object hash threadsafe

2 years agopimd: Fix Compilation issue in PIM
Mobashshera Rasool [Wed, 16 Feb 2022 17:04:08 +0000 (09:04 -0800)]
pimd: Fix Compilation issue in PIM

A recent merge caused this, fixing it.

Signed-off-by: Mobashshera Rasool <mrasool@gmail.com>
2 years agoMerge pull request #10590 from donaldsharp/bgp_error_codes
Sri Mohana Singamsetty [Wed, 16 Feb 2022 16:44:20 +0000 (08:44 -0800)]
Merge pull request #10590 from donaldsharp/bgp_error_codes

Bgp error codes

2 years agoMerge pull request #9224 from SaiGomathiN/saig
Donald Sharp [Wed, 16 Feb 2022 16:26:03 +0000 (11:26 -0500)]
Merge pull request #9224 from SaiGomathiN/saig

pimd: IGMP Query Generation

2 years agoMerge pull request #10586 from punithkumar-spk/master
Mark Stapp [Wed, 16 Feb 2022 15:57:08 +0000 (10:57 -0500)]
Merge pull request #10586 from punithkumar-spk/master

bgpd: uninitialized compiler warning

2 years agopim6d: remove `PIM_V6_TEMP_BREAK`
David Lamparter [Fri, 21 Jan 2022 15:47:18 +0000 (16:47 +0100)]
pim6d: remove `PIM_V6_TEMP_BREAK`

It's no longer necessary, pim6d now compiles without this hack.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopim6d: get into a kinda-working state wrt. zebra
David Lamparter [Fri, 21 Jan 2022 15:42:03 +0000 (16:42 +0100)]
pim6d: get into a kinda-working state wrt. zebra

Fix up just enough to make us not operate in complete darkness.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopim6d: isolate remaining TODOs into stubs file
David Lamparter [Wed, 19 Jan 2022 14:45:11 +0000 (15:45 +0100)]
pim6d: isolate remaining TODOs into stubs file

This creates `pim6_stubs.c`, which is intended to temporarily provide
stubbed-out definitions of some functions we don't have yet for IPv6.
This makes pim6d compile without the `PIM_V6_TEMP_BREAK` hack, and is
very important as an intermediate step to get a working environment for
further work.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopim6d: drop off MLAG code
David Lamparter [Tue, 18 Jan 2022 12:49:07 +0000 (13:49 +0100)]
pim6d: drop off MLAG code

2 years agopim6d: drop off IGMP code
David Lamparter [Tue, 18 Jan 2022 10:37:56 +0000 (11:37 +0100)]
pim6d: drop off IGMP code

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopim6d: IPv6-adjust BSM code
David Lamparter [Wed, 19 Jan 2022 14:21:44 +0000 (15:21 +0100)]
pim6d: IPv6-adjust BSM code

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopim6d: IPv6-adjust static multicast routes
David Lamparter [Tue, 18 Jan 2022 14:07:38 +0000 (15:07 +0100)]
pim6d: IPv6-adjust static multicast routes

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopim6d: IPv6-adjust mroute code
David Lamparter [Tue, 18 Jan 2022 13:33:04 +0000 (14:33 +0100)]
pim6d: IPv6-adjust mroute code

This is just hitting the pim_mroute code with a hammer until it doesn't
print warnings anymore.  This is NOT quite tested or working yet, it
just compiles.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopim6d: IPv6-adjust northbound code
David Lamparter [Tue, 18 Jan 2022 14:23:36 +0000 (15:23 +0100)]
pim6d: IPv6-adjust northbound code

Just fixing a bunch of compiler errors, this will NOT actually configure
IPv6 PIM properly.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopim6d: IPv6-adjust RPF lookups
David Lamparter [Tue, 18 Jan 2022 10:54:36 +0000 (11:54 +0100)]
pim6d: IPv6-adjust RPF lookups

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopim6d: IPv6-adjust upstream_rpf_genid_changed
David Lamparter [Tue, 18 Jan 2022 10:44:26 +0000 (11:44 +0100)]
pim6d: IPv6-adjust upstream_rpf_genid_changed

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agoMerge pull request #10356 from opensourcerouting/pim6-adjust-20220117
Donald Sharp [Wed, 16 Feb 2022 14:53:48 +0000 (09:53 -0500)]
Merge pull request #10356 from opensourcerouting/pim6-adjust-20220117

pim6d: conversion work batch

2 years agoripd: Cleanup ripd.c indentation levels and comments
Donald Sharp [Wed, 16 Feb 2022 13:05:34 +0000 (08:05 -0500)]
ripd: Cleanup ripd.c indentation levels and comments

The entirety of this file is heavily indented.  Work some coding
structure to make it easier to read and understand and not be
so heavily indented.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10575 from donaldsharp/bgp_requires_policy
Russ White [Wed, 16 Feb 2022 02:33:16 +0000 (21:33 -0500)]
Merge pull request #10575 from donaldsharp/bgp_requires_policy

bgp: Add a 6 hour warning to missing policy

2 years agoripd: Fix packet send for non primary addresses
Donald Sharp [Wed, 16 Feb 2022 00:47:23 +0000 (19:47 -0500)]
ripd: Fix packet send for non primary addresses

When rip is configured to work on secondary addresses
on an interface, rip was not properly sending out
the packets on secondary addresses because the source of the
packet was never properly being setup and rip would
send the packet out multiple times for the primary address
not once for each address on the interface that is setup to work.

tcpdump + rip debugs output with fix:

2022/02/15 19:59:50 RIP: [ZG173-BHW0K] turn on virbr0
2022/02/15 19:59:51 RIP: [PYB7S-80D89] multicast join at virbr0
2022/02/15 19:59:51 RIP: [GZR24-FCQGG] multicast request on virbr0
2022/02/15 19:59:51 RIP: [JTNCV-XD8S1] rip_send_packet 192.168.122.1 > 224.0.0.9 (virbr0)
2022/02/15 19:59:51 RIP: [VEJY5-67P5X] SEND to  224.0.0.9520
2022/02/15 19:59:51 RIP: [JTNCV-XD8S1] rip_send_packet 73.3.3.8 > 224.0.0.9 (virbr0)
2022/02/15 19:59:51 RIP: [VEJY5-67P5X] SEND to  224.0.0.9520
19:59:51.831128 IP 192.168.122.1.route > rip2-routers.mcast.net.route: RIPv2, Request, length: 24
19:59:51.831161 IP c-73-3-3-8.hsd1.mo.comcast.net.route > rip2-routers.mcast.net.route: RIPv2, Request, length: 24

Fixes: #10588
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Fix uninitialized compiler warning
Punith Kumar [Tue, 15 Feb 2022 22:07:19 +0000 (22:07 +0000)]
bgpd: Fix uninitialized compiler warning

Signed-off-by: Punith Kumar <punithkumar.spk@gmail.com>
2 years agobgpd: Renumber bgp_create_error_code enum values
Donald Sharp [Tue, 15 Feb 2022 21:36:30 +0000 (16:36 -0500)]
bgpd: Renumber bgp_create_error_code enum values

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Convert bgp error codes for cli input to an enum
Donald Sharp [Tue, 15 Feb 2022 20:53:30 +0000 (15:53 -0500)]
bgpd: Convert bgp error codes for cli input to an enum

Conversion of bgp error codes returned for cli input into
an enum and then properly handling all the error cases
in bgp_vty_return.

Because not all error codes returned were properly handled
in this function there existed configuration examples that
were accepted on the cli without an error message but not
saved.

Fixes: #10589
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Remove unused BGP_ERR_MAX #define
Donald Sharp [Tue, 15 Feb 2022 21:12:02 +0000 (16:12 -0500)]
bgpd: Remove unused BGP_ERR_MAX #define

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Move some error codes to bgp_vty_return handling
Donald Sharp [Tue, 15 Feb 2022 21:04:50 +0000 (16:04 -0500)]
bgpd: Move some error codes to bgp_vty_return handling

BGP_ERR_PEER_GROUP_MEMBER and BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT
both are not handled by bgp_vty_return, but both can be handled by
this function as that there is nothing special going on here.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Remove impossible invalid state
Donald Sharp [Tue, 15 Feb 2022 20:54:53 +0000 (15:54 -0500)]
bgpd: Remove impossible invalid state

confederations are checking to see that the bgp pointer
is non-null.  But it's impossible to have a null pointer
in the cli and in all paths we have already deref'ed the bgp
pointer.  Let's remove that error code as that it is impossible
to happen.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10571 from rameshabhinay/ospf6_auth_trailer
Russ White [Tue, 15 Feb 2022 18:19:48 +0000 (13:19 -0500)]
Merge pull request #10571 from rameshabhinay/ospf6_auth_trailer

ospf6d: fix coverity issues.

2 years agoMerge pull request #10546 from ton31337/fix/check_for_null_inside_unintern
Russ White [Tue, 15 Feb 2022 17:59:45 +0000 (12:59 -0500)]
Merge pull request #10546 from ton31337/fix/check_for_null_inside_unintern

bgpd: Check for NULL inside aspath_unintern()

2 years agoMerge pull request #10555 from anlancs/doc-comment
Russ White [Tue, 15 Feb 2022 17:58:28 +0000 (12:58 -0500)]
Merge pull request #10555 from anlancs/doc-comment

doc: add "cost" to ospfd "range" command

2 years agoMerge pull request #10562 from donaldsharp/starv_warn
Russ White [Tue, 15 Feb 2022 17:57:39 +0000 (12:57 -0500)]
Merge pull request #10562 from donaldsharp/starv_warn

lib: Save number of times a thread is starved

2 years agobgp: Add a 15 minute warning to missing policy
Donald Sharp [Mon, 14 Feb 2022 12:57:45 +0000 (07:57 -0500)]
bgp: Add a 15 minute warning to missing policy

Add a 15 minute warning to the logging system when
bgp policy is not setup properly.  Operators keep asking
about the missing policy( on upgrade typically ).  Let's
try to give them a bit more of a hint when something is
going wrong as that they are clearly missing the other
various places FRR tells them about it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10573 from ton31337/fix/doc_rc_tag
Russ White [Tue, 15 Feb 2022 16:33:02 +0000 (11:33 -0500)]
Merge pull request #10573 from ton31337/fix/doc_rc_tag

doc: An example how we do RC tagging for stabilization branch

2 years agopimd: remove redundant code
anlan_cs [Sun, 13 Feb 2022 06:45:02 +0000 (14:45 +0800)]
pimd: remove redundant code

`ifchannel_rb` is already cleaned by `pim_ifchannel_delete_all`, so
it should be removed.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #10577 from donaldsharp/speeling
Donatas Abraitis [Mon, 14 Feb 2022 20:17:54 +0000 (22:17 +0200)]
Merge pull request #10577 from donaldsharp/speeling

Speeling

2 years agozebra: Fix spelling mistake
Donald Sharp [Mon, 14 Feb 2022 17:56:44 +0000 (12:56 -0500)]
zebra: Fix spelling mistake

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoyang: Fix spelling mistake
Donald Sharp [Mon, 14 Feb 2022 17:56:21 +0000 (12:56 -0500)]
yang: Fix spelling mistake

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agovtysh: Fix spelling mistakes
Donald Sharp [Mon, 14 Feb 2022 17:56:04 +0000 (12:56 -0500)]
vtysh: Fix spelling mistakes

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Fix spelling and grammar mistakes
Donald Sharp [Mon, 14 Feb 2022 17:55:20 +0000 (12:55 -0500)]
tests: Fix spelling and grammar mistakes

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopceplib: Fix spelling mistakes
Donald Sharp [Mon, 14 Feb 2022 17:54:05 +0000 (12:54 -0500)]
pceplib: Fix spelling mistakes

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopathd: Fix spelling mistakes
Donald Sharp [Mon, 14 Feb 2022 17:53:48 +0000 (12:53 -0500)]
pathd: Fix spelling mistakes

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoospfd: Fix spelling mistakes
Donald Sharp [Mon, 14 Feb 2022 17:53:16 +0000 (12:53 -0500)]
ospfd: Fix spelling mistakes

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoospf6d: Fix spelling mistakes
Donald Sharp [Mon, 14 Feb 2022 17:52:05 +0000 (12:52 -0500)]
ospf6d: Fix spelling mistakes

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agodoc: Fix spelling mistakes
Donald Sharp [Mon, 14 Feb 2022 17:51:22 +0000 (12:51 -0500)]
doc: Fix spelling mistakes

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Fix spelling mistakes
Donald Sharp [Mon, 14 Feb 2022 17:50:58 +0000 (12:50 -0500)]
bgpd: Fix spelling mistakes

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoospf6d: fix coverity issues.
Abhinay Ramesh [Sat, 12 Feb 2022 12:05:57 +0000 (12:05 +0000)]
ospf6d: fix coverity issues.

Fixed below coverity issues
________________________________________________________________________________________________________
*** CID 1511366:    (TAINTED_SCALAR)
/ospf6d/ospf6_message.c: 2631 in ospf6_make_lsupdate_list()
2625                          + OSPF6_HEADER_SIZE)
2626                         > ospf6_packet_max(on->ospf6_if)) {
2627                             ospf6_fill_header(on->ospf6_if, (*op)->s,
2628                                               length + OSPF6_HEADER_SIZE);
2629                             (*op)->length = length + OSPF6_HEADER_SIZE;
2630                             ospf6_fill_lsupdate_header((*op)->s, *lsa_cnt);
>>>     CID 1511366:    (TAINTED_SCALAR)
>>>     Passing tainted variable "(*op)->length" to a tainted sink.
2631                             ospf6_send_lsupdate(on, NULL, *op);
2632
2633                             /* refresh packet */
2634                             *op = ospf6_packet_new(on->ospf6_if->ifmtu);
2635                             length = OSPF6_LS_UPD_MIN_SIZE;
2636                             *lsa_cnt = 0;
/ospf6d/ospf6_message.c: 2631 in ospf6_make_lsupdate_list()
2625                          + OSPF6_HEADER_SIZE)
2626                         > ospf6_packet_max(on->ospf6_if)) {
2627                             ospf6_fill_header(on->ospf6_if, (*op)->s,
2628                                               length + OSPF6_HEADER_SIZE);
2629                             (*op)->length = length + OSPF6_HEADER_SIZE;
2630                             ospf6_fill_lsupdate_header((*op)->s, *lsa_cnt);
>>>     CID 1511366:    (TAINTED_SCALAR)
>>>     Passing tainted variable "(*op)->length" to a tainted sink.
2631                             ospf6_send_lsupdate(on, NULL, *op);

________________________________________________________________________________________________________
*** CID 1511365:    (TAINTED_SCALAR)
/ospf6d/ospf6_message.c: 2674 in ospf6_make_ls_retrans_list()
2669                             if (on->ospf6_if->state == OSPF6_INTERFACE_POINTTOPOINT)
2670                                     (*op)->dst = allspfrouters6;
2671                             else
2672                                     (*op)->dst = on->linklocal_addr;
2673
>>>     CID 1511365:    (TAINTED_SCALAR)
>>>     Passing tainted variable "(*op)->length" to a tainted sink.
2674                             ospf6_fill_hdr_checksum(on->ospf6_if, *op);
2675                             ospf6_packet_add(on->ospf6_if, *op);
2676                             OSPF6_MESSAGE_WRITE_ON(on->ospf6_if);
/ospf6d/ospf6_message.c: 2674 in ospf6_make_ls_retrans_list()
2669                             if (on->ospf6_if->state == OSPF6_INTERFACE_POINTTOPOINT)
2670                                     (*op)->dst = allspfrouters6;
2671                             else
2672                                     (*op)->dst = on->linklocal_addr;
2673
>>>     CID 1511365:    (TAINTED_SCALAR)
>>>     Passing tainted variable "(*op)->length" to a tainted sink.
2674                             ospf6_fill_hdr_checksum(on->ospf6_if, *op);
2675                             ospf6_packet_add(on->ospf6_if, *op);
2676                             OSPF6_MESSAGE_WRITE_ON(on->ospf6_if);
/ospf6d/ospf6_message.c: 2674 in ospf6_make_ls_retrans_list()
2668                             ospf6_fill_lsupdate_header((*op)->s, *lsa_cnt);
2669                             if (on->ospf6_if->state == OSPF6_INTERFACE_POINTTOPOINT)
2670                                     (*op)->dst = allspfrouters6;
2671                             else
2672                                     (*op)->dst = on->linklocal_addr;
2673
>>>     CID 1511365:    (TAINTED_SCALAR)
>>>     Passing tainted variable "(*op)->length" to a tainted sink.
2674                             ospf6_fill_hdr_checksum(on->ospf6_if, *op);
2675                             ospf6_packet_add(on->ospf6_if, *op);
2676                             OSPF6_MESSAGE_WRITE_ON(on->ospf6_if);

________________________________________________________________________________________________________
*** CID 1511364:  Insecure data handling  (TAINTED_SCALAR)
/ospf6d/ospf6_message.c: 2125 in ospf6_write()
2120                     if (oi->at_data.flags != 0) {
2121                             at_len = ospf6_auth_len_get(oi);
2122                             if (at_len) {
2123                                     iovector[0].iov_len =
2124                                             ntohs(oh->length) + at_len;
>>>     CID 1511364:  Insecure data handling  (TAINTED_SCALAR)
>>>     Passing tainted variable "iovector[0].iov_len" to a tainted sink.
2125                                     ospf6_auth_digest_send(oi->linklocal_addr, oi,
2126                                                            oh, at_len,
2127                                                            iovector[0].iov_len);
2128                             } else {
2129                                     iovector[0].iov_len = ntohs(oh->length);
2130                             }

________________________________________________________________________________________________________
*** CID 1511363:    (DEADCODE)
/ospf6d/ospf6_auth_trailer.c: 275 in ospf6_hash_hmac_sha_digest()
269      case KEYCHAIN_ALGO_HMAC_SHA512:
270     #ifdef CRYPTO_OPENSSL
271              sha512_digest(mes, len, digest);
272     #endif
273              break;
274      case KEYCHAIN_ALGO_NULL:
>>>     CID 1511363:    (DEADCODE)
>>>     Execution cannot reach this statement: "case KEYCHAIN_ALGO_MAX:".
275      case KEYCHAIN_ALGO_MAX:
276      default:

/ospf6d/ospf6_auth_trailer.c: 274 in ospf6_hash_hmac_sha_digest()
269      case KEYCHAIN_ALGO_HMAC_SHA512:
270     #ifdef CRYPTO_OPENSSL
271              sha512_digest(mes, len, digest);
272     #endif
273              break;
>>>     CID 1511363:    (DEADCODE)
>>>     Execution cannot reach this statement: "case KEYCHAIN_ALGO_NULL:".
274      case KEYCHAIN_ALGO_NULL:
275      case KEYCHAIN_ALGO_MAX:
276      default:

________________________________________________________________________________________________________
*** CID 1511362:  Insecure data handling  (TAINTED_SCALAR)
/ospf6d/ospf6_auth_trailer.c: 541 in ospf6_auth_check_digest()
535
536      auth_len = ntohs(ospf6_auth->length);
537
538      memcpy(temp_hash, ospf6_auth->data, hash_len);
539      memcpy(ospf6_auth->data, apad, hash_len);
540
>>>     CID 1511362:  Insecure data handling  (TAINTED_SCALAR)
>>>     Passing tainted variable "oh_len + auth_len + lls_block_len" to a tainted sink.
541      ospf6_auth_update_digest(oi, oh, ospf6_auth, auth_str,
542                               (oh_len + auth_len + lls_block_len),
543                               hash_algo);

________________________________________________________________________________________________________
*** CID 1511361:  Insecure data handling  (TAINTED_SCALAR)
/ospf6d/ospf6_auth_trailer.c: 124 in ospf6_auth_hdr_dump_recv()
118      at_len = length - (oh_len + lls_len);
119      if (at_len > 0) {
120              ospf6_at_hdr =
121                      (struct ospf6_auth_hdr *)((uint8_t *)ospfh + oh_len);
122              at_hdr_len = ntohs(ospf6_at_hdr->length);
123              hash_len = at_hdr_len - OSPF6_AUTH_HDR_MIN_SIZE;
>>>     CID 1511361:  Insecure data handling  (TAINTED_SCALAR)
>>>     Passing tainted variable "hash_len" to a tainted sink.
124              memcpy(temp, ospf6_at_hdr->data, hash_len);
125              temp[hash_len] = '\0';

________________________________________________________________________________________________________
*** CID 1482146:  Insecure data handling  (TAINTED_SCALAR)
/ospf6d/ospf6_message.c: 2787 in ospf6_lsupdate_send_neighbor_now()
2781
2782             if (IS_OSPF6_DEBUG_FLOODING
2783                 || IS_OSPF6_DEBUG_MESSAGE(OSPF6_MESSAGE_TYPE_LSUPDATE, SEND_HDR))
2784                     zlog_debug("%s: Send lsupdate with lsa %s (age %u)", __func__,
2785                                lsa->name, ntohs(lsa->header->age));
2786
>>>     CID 1482146:  Insecure data handling  (TAINTED_SCALAR)
>>>     Passing tainted variable "op->length" to a tainted sink.
2787             ospf6_send_lsupdate(on, NULL, op);

Signed-off-by: Abhinay Ramesh <rabhinay@vmware.com>
2 years agopim6d: IPv6-adjust pim_msg_send() and related
David Lamparter [Fri, 14 Jan 2022 19:17:46 +0000 (20:17 +0100)]
pim6d: IPv6-adjust pim_msg_send() and related

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopim6d: IPv6-adjust pim_ifchannel_*
David Lamparter [Fri, 14 Jan 2022 19:02:36 +0000 (20:02 +0100)]
pim6d: IPv6-adjust pim_ifchannel_*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopim6d: IPv6-adjust assert-related addrs
David Lamparter [Fri, 14 Jan 2022 18:53:55 +0000 (19:53 +0100)]
pim6d: IPv6-adjust assert-related addrs

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopim6d: IPv6-adjust jp_agg->group
David Lamparter [Fri, 14 Jan 2022 18:43:37 +0000 (19:43 +0100)]
pim6d: IPv6-adjust jp_agg->group

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>