]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
3 years agoFRR Release 8.1 docker/8.1.0 frr-8.1
Jafar Al-Gharaibeh [Thu, 4 Nov 2021 19:40:38 +0000 (14:40 -0500)]
FRR Release 8.1

FRR 8.1 brings a long list of enhancements and fixes with 1200 commits from
75 developers. Thanks to all contributers.

* New Features

- Lua hooks are now feature complete, with one hook available for use
  (http://docs.frrouting.org/en/latest/scripting.html)
- Improvements to SRv6 (Segment Routing over IPv6)
  (http://docs.frrouting.org/en/latest/zebra.html#segment-routing-ipv6)
- Improvements to Prefix-SID (Type 5)
- EVPN route type-5 gateway IP overlay Index
  (http://docs.frrouting.org/en/latest/bgp.html#evpn-overlay-index-gateway-ip)
- OSPFv3 NSSA and NSSA totally stub areas
  (http://docs.frrouting.org/en/latest/ospf6d.html#ospf6-area)
- OSPFv3 ASBR summarization
  (http://docs.frrouting.org/en/latest/ospf6d.html#asbr-summarisation-support-in-ospfv3)
- OSPFv3 Graceful Restart
  (http://docs.frrouting.org/en/latest/ospf6d.html#graceful-restart)
- OSPFv2 Graceful Restart (restarting mode added, helper was already implemented)
  (http://docs.frrouting.org/en/latest/ospfd.html#graceful-restart)

* FRRouting 2021 GSOC Project

  FRRouting's GSOC student implemented the infrastructure needed to add the
  ability to call out to user provided Lua scripts from within FRR. Keep an eye
  out for developments in this area.

  You can read about the work he did here:

  https://frrouting.github.io/frr-gsoc/year-2021/projects/lua-hook-points
  https://dlqs.dev/frr-gsoc-2021.html

  And its presentation at Netdev 0x15:
  https://www.youtube.com/watch?v=_8R1MYP7M48&t=1051s

  Thank you @dlqs!

* Behavior Changes

- Every node in running config now has an explicit "exit" tag
- Link bandwidth in BGP is now correctly encoded according to IEEE 754.
  To stay with old incorrect encoding use:
  `neighbor PEER disable-link-bw-encoding-ieee`

* Changelog

alpine
    Fix path for daemons file install

bgpd
    Add "json" option to "show bgp as-path-access-list"
    Add `disable-addpath-rx` knob
    Add an ability to set extcommunity to none in route-maps
    Add counter of displayed show bgp summary when filtering
    Add knob to config cond-adv scanner period
    Add route-map `match alias` command
    Add rpki source address configuration
    Add show bgp summary filter by neighbor or as
    Add terse display option on show bgp summary
    Allow for auto-completion of community alias's created
    Bgp knob to teardown session immediately when peer is unreachable
    Expand 'bgp default <afi>-<safi>' cmds
    Extend evpn next hop tracking to type-1 and type-4 routes
    Fix "no router bgp x vrf default"
    Flowspec redirect vrf uses vrf table instead of allocated table id
    Handle quick flaps of an evpn prefix properly
    Initial batch of evpn lttng tracepoints
    Limit processing to what is needed in rpki validation
    Modify vrf/view display in show bgp summary
    Set 4096 instead of 65535 as new max packet size for a new peer
    Set extended msg size only if we advertised and received capability
    Show bgp community alias in json community list output
    Show bgp prefixes by community alias
    Show max packet size per update-group
    Split soft reconfigure table task into several jobs to not block vtysh
    Store distance received from a redistribute statement
    Update route-type-1 legend to match output

isis
    Fix sending of lsp with null seqno

lib
    Add "json" option to "show ip[v6] access-list"
    Add "json" option to "show ip[v6] prefix-list"
    Add "json" option to "show route-map"
    Prevent grpc assert on missing yang node

nhrp
    Clear cache when shortcuts are cleared
    Fix corrupt address being shown for shortcuts with no cache entry
    Set prefix correctly in resolution request

ospf6
    Add debug commands for lsa all and route all
    Add warning log for late hello packets
    Add write-multiplier configuration
    Don't update router-id if at least one adjacency is full
    Extend the "redistribute" command with more options
    Fix issue when displaying the redistribute command
    Fix logging of border router routes
    Json output for database dump show command
    Link state id in lsa database json output
    Send lsa update immediately when ospf instance is deleted

ospfd
    Fix crash when creating vlink in unknown vrf
    Gr conformance fix for hello packet dr election
    Print extra lsa information in some log messages
    Rfc conformance test case 25.23 issue fix
    Show ip ospf route json does not shown metric and tag
    Summary lsa is not originated when process is reset

pathd
    Handle pcinitiated configuration, main thread
    Handle pcinitiated messages, thread controller
    Handle srp_id correctly
    If pce ret no-path to pcreq don't retry pcreq nor delegate

pbrd
    Add `match ip-protocol [tcp|udp]`
    Add ability to set/unset src and dest ports
    Nhg "add" edge case for last in table range
    Start inclusion of src and dst ports for pbrd

pimd
    Add tos/ttl check for igmp conformance
    Allow join prune intervals to be as small as 5 seconds
    Allow msdp group name 'default'
    Fix register suppress timer code
    Fix uaf/heap corruption in bsm code
    Fix command "no ip msdp mesh-group member"
    Igmp groups are not getting timeout
    Igmp memberships are not querier specific
    Igmp sockets need to be iface-bound too
    Prevent uninited usage of nexthop
    Support msdp global timers configuration

vtysh
    Add cli timestamp '-t' flag
    Add error code if daemon is not running
    Fix searching commands in parent nodes

yang
    Add msdp timer configuration
    Fix bgp multicast prefix type
    Mark a couple of prefix-list/access-list leafs as mandatory
    Move multicast prefix type definition
    Replace an empty pattern with a zero-length restriction
    Rework pim msdp mesh group
    Simplify msdp peer handling

zebra
    Add "json" option to "show interface"
    Various improvment to dataplane interface
    Add message counts for `show zebra client`
    Add nhg id to show ip route json
    Add show command for ra interface lists
    Fix ipv4 routes with ipv6 link local next hops install in fpm
    Handle bridge mac address update in evpn contexts
    Move individual lines to table in `show zebra client` command
    Refresh vxlan evpn contexts, when bridge interface goes up
    Update zl3vni when bridge link refreshed in other namespaces

* Contributers

Aaron Pereira <pereiraaa@vmware.com>
Abhinay Ramesh <rabhinay@vmware.com>
Abhishek Naik <bhini@amazon.com>
Adriano Marto Reis <adrianomarto@gmail.com>
Alexander Chernavin <achernavin@netgate.com>
Alexander Skorichenko <askorichenko@netgate.com>
Ameya Dharkar <adharkar@vmware.com>
Amol Lad <amol.lad@4rf.com>
anlan_cs <anlan_cs@tom.com>
Anuradha Karuppiah <anuradhak@nvidia.com>
Basha Mougamadou <b.mougamadou@criteo.com>
batmancn <batmanustc@gmail.com>
Chirag Shah <chirag@nvidia.com>
Christian Hopps <chopps@gmail.com>
Colin Sames <colin.sames@haw-hamburg.de>
David Lamparter <equinox@diac24.net>
Dmitrii Turlupov <dturlupov@factor-ts.ru>
Donald Lee <dlqs@gmx.com>
Donald Sharp <sharpd@nvidia.com>
Donatas Abraitis <donatas.abraitis@gmail.com>
Don Slice <dslice@nvidia.com>
Emanuele Di Pascale <emanuele@voltanet.io>
enigamict <mochienper@gmail.com>
ewlumpkin <ewlumpkin@gmail.com>
GalaxyGorilla <sascha@netdef.org>
github login name <ranjany@vmware.com>
gord_chen <gord_chen@edge-core.com>
G. Paul Ziemba <p-fbsd-bugs@ziemba.us>
Guillaume Solignac <guillaume.solignac@orange.com>
Hiroki Shirokura <slank.dev@gmail.com>
Igor Ryzhov <iryzhov@nfware.com>
Jafar Al-Gharaibeh <jafar@atcorp.com>
Javier Garcia <javier.garcia@voltanet.io>
John W. O'Brien <john@saltant.com>
Kantesh Mundaragi <kmundaragi@vmware.com>
Karen Schoener <karen@voltanet.io>
Kaushik <kaushiknath.null@gmail.com>
Kuldeep Kashyap <kashyapk@vmware.com>
Lars Seipel <ls@slrz.net>
Lou Berger <lberger@labn.net>
Louis Scalbert <louis.scalbert@6wind.com>
lynne <lynne@voltanet.io>
Mark Stapp <mstapp@nvidia.com>
Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
Martin Winter <mwinter@opensourcerouting.org>
Mobashshera Rasool <mrasool@vmware.com>
nguggarigoud <nguggarigoud@vmware.com>
Nikhil Kelapure <nikhil.kelapure@broadcom.com>
Olivier Dugeon <olivier.dugeon@orange.com>
Ondřej Surý <ondrej@sury.org>
Pat Ruddy <pat@voltanet.io>
Pavel Ivashchenko <pivashchenko@nfware.com>
Philippe Guibert <philippe.guibert@6wind.com>
Prerana GB <prerana@vmware.com>
Quentin Young <qlyoung@nvidia.com>
Rafael Zalamena <rzalamena@opensourcerouting.org>
Renato Westphal <renato@opensourcerouting.org>
Reuben Dowle <reuben.dowle@4rf.com>
rgirada <rgirada@vmware.com>
Ryoga <contact@proelbtn.com>
Sai Gomathi <nsaigomathi@vmware.com>
schylar <schylarutley@hotmail.com>
Soman K.S <somanks@gmail.com>
Steffen Neubauer <s.neubauer@syseleven.de>
Stephen Worley <sworley@nvidia.com>
Takemasa Imada <takemasa.imada@gmail.com>
Tomáš Szaniszlo <tomaxuser@gmail.com>
Trey Aspelund <taspelund@nvidia.com>
vivek <vivek@cumulusnetworks.com>
Wesley Coakley <wcoakley@nvidia.com>
Xiao Liang <shaw.leon@gmail.com>
Yaroslav Fedoriachenko <yar.fed99@gmail.com>
Yash Ranjan <ranjany@vmware.com>
Yuan Yuan <yyuanam@amazon.com>
zyxwvu Shi <shiyuchen.syc@bytedance.com>

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 years agoMerge pull request #9992 from FRRouting/mergify/bp/stable/8.1/pr-9954
Donald Sharp [Sun, 7 Nov 2021 16:00:36 +0000 (11:00 -0500)]
Merge pull request #9992 from FRRouting/mergify/bp/stable/8.1/pr-9954

zebra: Send up ifindex for redistribution when appropriate (backport #9954)

3 years agozebra: Send up ifindex for redistribution when appropriate
Donald Sharp [Thu, 4 Nov 2021 12:01:14 +0000 (08:01 -0400)]
zebra: Send up ifindex for redistribution when appropriate

Currently the NEXTHOP_TYPE_IPV4 and NEXTHOP_TYPE_IPV6 are
not sending up the resolved ifindex for the route.  This
is causing upper level protocols that have something like
this:

route-map FOO permit 10
  match interface swp13
!

router ospf
   redistribute static
!

ip route 4.5.6.7/32 10.10.10.10

where 10.10.10.10 resolves to interface swp13.  The route-map
will never match in this case.

Since FRR has the resolved nexthop interface, FRR might as
well send it up to be selected on by the upper level protocol
as needed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 6f77db57794d40e34b09f0049c2323c0b7f462a3)

3 years agoMerge pull request #9990 from FRRouting/mergify/bp/stable/8.1/pr-9972
Donald Sharp [Sat, 6 Nov 2021 20:49:24 +0000 (16:49 -0400)]
Merge pull request #9990 from FRRouting/mergify/bp/stable/8.1/pr-9972

bfdd,bgpd: fix some integration bugs (backport #9972)

3 years agobgpd: update BFD config on update-source change
Rafael Zalamena [Wed, 3 Nov 2021 11:43:17 +0000 (08:43 -0300)]
bgpd: update BFD config on update-source change

Update BFD sessions when the update-source configuration is set so the
session follows the new configured source address.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
(cherry picked from commit 7196f56eb3d3866ccafee095c8be66f058d99abf)

3 years agobgpd: fix BFD configuration update on TTL change
Rafael Zalamena [Tue, 2 Nov 2021 21:54:23 +0000 (18:54 -0300)]
bgpd: fix BFD configuration update on TTL change

When altering the TTL of a eBGP peer also update the BFD
configuration. This was only working when the configuration happened
after the peer connection had been established.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
(cherry picked from commit 4ba37eb691f9574e908ec7ed03e8f4cb4214f2d5)

3 years agolib: constify read only parameters
Rafael Zalamena [Wed, 3 Nov 2021 11:45:02 +0000 (08:45 -0300)]
lib: constify read only parameters

Constify some BFD library function parameters to signalize they are
not going to get modified.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
(cherry picked from commit ca30ac7fc375e3979776bb229587415f05bd4ce9)

3 years agolib: fix BFD IPv6 session address change
Renato Westphal [Thu, 28 Oct 2021 15:35:56 +0000 (12:35 -0300)]
lib: fix BFD IPv6 session address change

Pass the correct family type and remove unneeded casts.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
(cherry picked from commit ae0945733333f60fccb0b4ac170ca3ee7351828b)

3 years agoMerge pull request #9985 from FRRouting/mergify/bp/stable/8.1/pr-9978
Igor Ryzhov [Sat, 6 Nov 2021 14:12:59 +0000 (17:12 +0300)]
Merge pull request #9985 from FRRouting/mergify/bp/stable/8.1/pr-9978

doc: Drop misleading explanation about `neighbor X interface IFNAME` (backport #9978)

3 years agodoc: Drop misleading explanation about `neighbor X interface IFNAME`
Donatas Abraitis [Fri, 5 Nov 2021 20:59:52 +0000 (22:59 +0200)]
doc: Drop misleading explanation about `neighbor X interface IFNAME`

This command is not deprecated.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
(cherry picked from commit a13e0374fe73a97e11c65e3df0554de42b282efb)

3 years agoMerge pull request #9911 from FRRouting/mergify/bp/dev/8.1/pr-9083
Donald Sharp [Thu, 28 Oct 2021 11:58:32 +0000 (07:58 -0400)]
Merge pull request #9911 from FRRouting/mergify/bp/dev/8.1/pr-9083

pimd: In Prune Pending state, the holdtime change is not taking effect (backport #9083)

3 years agopimd: In Prune Pending state, the holdtime change is not taking effect
github login name [Mon, 19 Jul 2021 07:46:00 +0000 (00:46 -0700)]
pimd: In Prune Pending state, the holdtime change is not taking effect

Problem Statement:
In Prune pending state, when Join is received, and there is hold timer change
the Expiry timer is not getting updated with new Hold timer.

Root Cause:
When thread_add_timer function is called and the thread is already in the list
the thread api just returns, it does not modify the timer value.
So when we want to change the timer, we need to first call THREAD_OFF and then
call thread_add_timer.
The Expiry timer thread is not cancelled in PIM_IFJOIN_PRUNE_PENDING state,
therefore the timer change is not taking effect.

Fix:
Call THREAD_OFF in that flow.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
(cherry picked from commit b206dc5566dc790174f2fd1d14687612a54c7acd)

3 years agoMerge pull request #9784 from FRRouting/mergify/bp/dev/8.1/pr-9737
Donatas Abraitis [Wed, 27 Oct 2021 11:02:14 +0000 (14:02 +0300)]
Merge pull request #9784 from FRRouting/mergify/bp/dev/8.1/pr-9737

yang: replace an empty pattern with a zero-length restriction (backport #9737)

3 years agoMerge pull request #9901 from FRRouting/mergify/bp/dev/8.1/pr-9886
Donald Sharp [Wed, 27 Oct 2021 10:58:06 +0000 (06:58 -0400)]
Merge pull request #9901 from FRRouting/mergify/bp/dev/8.1/pr-9886

lib: fix srv6 route hardcode with BGP (backport #9886)

3 years agoMerge pull request #9904 from FRRouting/mergify/bp/dev/8.1/pr-9791
Donatas Abraitis [Wed, 27 Oct 2021 04:19:57 +0000 (07:19 +0300)]
Merge pull request #9904 from FRRouting/mergify/bp/dev/8.1/pr-9791

3 years agoMerge pull request #9891 from FRRouting/mergify/bp/dev/8.1/pr-9873
Igor Ryzhov [Tue, 26 Oct 2021 21:53:14 +0000 (00:53 +0300)]
Merge pull request #9891 from FRRouting/mergify/bp/dev/8.1/pr-9873

3 years agobgpd: remove bogus check
Rafael Zalamena [Mon, 11 Oct 2021 21:29:54 +0000 (18:29 -0300)]
bgpd: remove bogus check

`bgp` pointer always exists and is used before this function call.

Calling `free` in `json` in this context will also cause a
use-after-free crash.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
(cherry picked from commit 21e33c958d6258943796a04b9ac29838a7b41283)

3 years agobgpd: fix json object handling
Martin Winter [Fri, 8 Oct 2021 17:19:53 +0000 (19:19 +0200)]
bgpd: fix json object handling

Fix memory leaks when quitting early and double free when headers are
not set.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
(cherry picked from commit 690c3134a4f5657bce8d533d8459c2e9e1dcfe86)

3 years agolib: fix srv6 route hardcode with BGP
Hiroki Shirokura [Mon, 25 Oct 2021 23:36:14 +0000 (23:36 +0000)]
lib: fix srv6 route hardcode with BGP

zclient_send_localsid is called by various routing protocol daemons. To set the
srv6 endpoint function. Fix a hard-coded error in the initial implementation.
Before this PR, the srv6 function will be registered to zebra as a BGP route
even if isisd executes zclient_send_localsid.

Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
(cherry picked from commit 8563b9722ac7293b0cca4bc7d869943fef9a09c4)

3 years agoMerge pull request #9893 from FRRouting/mergify/bp/dev/8.1/pr-9876
Igor Ryzhov [Tue, 26 Oct 2021 12:15:10 +0000 (15:15 +0300)]
Merge pull request #9893 from FRRouting/mergify/bp/dev/8.1/pr-9876

bgpd: When issuing `no ... ebgp-multihop` always resets (backport #9876)

3 years agobgpd: When issuing `no ... ebgp-multihop` always resets
Donald Sharp [Sun, 24 Oct 2021 19:02:11 +0000 (15:02 -0400)]
bgpd: When issuing `no ... ebgp-multihop` always resets

When removing the command `no neighbor <X> ebgp-multihop <Y>`
the bgp code was always resetting the connection even if
the command would do nothing.

Fixes: #6464
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 6e26b2e21f1f742bd0b4f40b4535c75b03b49a89)

3 years agobgpd: Reset dynamic peer counter
Abhishek Naik [Tue, 19 Oct 2021 23:45:26 +0000 (23:45 +0000)]
bgpd: Reset dynamic peer counter

Dynamic peer count is inconsistent in
"show bgp summary json" and "show bgp summary failed json" due to
dynamic peer counter 'dn_count' being reused without resetting

Signed-off-by: Abhishek Naik <bhini@amazon.com>
(cherry picked from commit 800867d85e5fae7d41131c2552dec290f2246077)

3 years agoMerge pull request #9857 from FRRouting/mergify/bp/dev/8.1/pr-9856
Donald Sharp [Thu, 21 Oct 2021 17:58:51 +0000 (13:58 -0400)]
Merge pull request #9857 from FRRouting/mergify/bp/dev/8.1/pr-9856

zebra: Fix code paths that always resolve to true (backport #9856)

3 years agozebra: Fix code paths that always resolve to true
Donald Sharp [Wed, 20 Oct 2021 14:15:41 +0000 (10:15 -0400)]
zebra: Fix code paths that always resolve to true

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit e8e6febb746c52354396e4004fccc46ef4dde684)

3 years agoMerge pull request #9845 from idryzhov/8.1-ospf-vlink-crash frr-8.1-rc2
Jafar Al-Gharaibeh [Tue, 19 Oct 2021 21:57:57 +0000 (16:57 -0500)]
Merge pull request #9845 from idryzhov/8.1-ospf-vlink-crash

[8.1] ospfd: fix crash when creating vlink in unknown vrf

3 years agoospfd: fix crash when creating vlink in unknown vrf
Igor Ryzhov [Mon, 18 Oct 2021 14:16:35 +0000 (17:16 +0300)]
ospfd: fix crash when creating vlink in unknown vrf

if_create_name crashes when vrf_id is VRF_UNKNOWN:
```
nfware# conf t
nfware(config)# router ospf vrf doesnt-exist
nfware(config-router)# area 1.1.1.1 virtual-link 2.2.2.2
vtysh: error reading from ospfd: Success (0)Warning: closing connection to ospfd because of an I/O error!
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9808 from FRRouting/mergify/bp/dev/8.1/pr-9686
Donald Sharp [Fri, 15 Oct 2021 13:13:39 +0000 (09:13 -0400)]
Merge pull request #9808 from FRRouting/mergify/bp/dev/8.1/pr-9686

zebra: fix buffer overflow (backport #9686)

3 years agoMerge pull request #9810 from FRRouting/mergify/bp/dev/8.1/pr-9733
Igor Ryzhov [Fri, 15 Oct 2021 09:52:02 +0000 (12:52 +0300)]
Merge pull request #9810 from FRRouting/mergify/bp/dev/8.1/pr-9733

lib: fix gRPC crash on missing YANG node (backport #9733)

3 years agoMerge pull request #9767 from FRRouting/mergify/bp/dev/8.1/pr-9345
Igor Ryzhov [Wed, 13 Oct 2021 22:45:14 +0000 (01:45 +0300)]
Merge pull request #9767 from FRRouting/mergify/bp/dev/8.1/pr-9345

lib: Fix zmq wrapper module mem handling (backport #9345)

3 years agoMerge pull request #9809 from FRRouting/mergify/bp/dev/8.1/pr-9655
Igor Ryzhov [Wed, 13 Oct 2021 22:40:30 +0000 (01:40 +0300)]
Merge pull request #9809 from FRRouting/mergify/bp/dev/8.1/pr-9655

Zebra: Ignore the failure of startup intf lookup. (backport #9655)

3 years agoMerge pull request #9794 from FRRouting/mergify/bp/dev/8.1/pr-9789
Donald Sharp [Wed, 13 Oct 2021 14:15:58 +0000 (10:15 -0400)]
Merge pull request #9794 from FRRouting/mergify/bp/dev/8.1/pr-9789

lib: set type for newly created interfaces (backport #9789)

3 years agolib: prevent gRPC assert on missing YANG node
Rafael Zalamena [Mon, 4 Oct 2021 21:10:58 +0000 (18:10 -0300)]
lib: prevent gRPC assert on missing YANG node

`yang_dnode_get` will `assert` if no YANG node/model exist, so lets test for
its existence first before trying to access it.

This `assert` is only acceptable for internal FRR usage otherwise we
might miss typos or unmatching YANG models nodes/leaves. For gRPC usage
we should let users attempt to use non existing models without
`assert`ing.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
(cherry picked from commit 0f538858c2bd22072539c8dbd4ad87601b0fc8ac)

3 years agoZebra: Ignore the failure of startup intf lookup.
Yuan Yuan [Wed, 22 Sep 2021 20:02:40 +0000 (20:02 +0000)]
Zebra: Ignore the failure of startup intf lookup.

In startup, zebra would dump interface information from Kernel in 3
steps w/o lock: step1, get interface information; step2, get interface
ipv4 address; step3, get interface ipv6 address.
If any interface gets added after step1, but before step2/3, zebra
would get extra interface addresses in step2/3 that has not been added
into zebra in step1. Returning error in the referenced interface lookup
would cause the startup interface retrieval to be incomplete.

Signed-off-by: Yuan Yuan <yyuanam@amazon.com>
(cherry picked from commit 8eec31ef564dcf4e096e700a648570973ca4e96b)

3 years agozebra: fix buffer overflow
Igor Ryzhov [Tue, 28 Sep 2021 12:44:51 +0000 (15:44 +0300)]
zebra: fix buffer overflow

mac is only 6 bytes long and we shouldn't blindly copy unknown number of
bytes into it.

Fixes #9671.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit b7c21fad11d19458ab62202e10401a954cba5e1c)

3 years agoMerge pull request #9772 from FRRouting/mergify/bp/dev/8.1/pr-9738
Russ White [Tue, 12 Oct 2021 15:47:49 +0000 (11:47 -0400)]
Merge pull request #9772 from FRRouting/mergify/bp/dev/8.1/pr-9738

ospf6d: ospf6d is crashing upon receiving duplicated Grace LSA. (backport #9738)

3 years agolib: set type for newly created interfaces
Igor Ryzhov [Fri, 8 Oct 2021 21:22:31 +0000 (00:22 +0300)]
lib: set type for newly created interfaces

Currently, the ll_type is set only in `netlink_interface` which is
executed only during startup. If the interface is created when the FRR
is already running, the type is not stored.

Fixes #1164.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 8975bbbdd6885b8a99be4893291a82150c254452)

3 years agoMerge pull request #9786 from FRRouting/mergify/bp/dev/8.1/pr-9774
Donatas Abraitis [Mon, 11 Oct 2021 09:10:43 +0000 (12:10 +0300)]
Merge pull request #9786 from FRRouting/mergify/bp/dev/8.1/pr-9774

bgpd: fix crash when using "show bgp vrf all" (backport #9774)

3 years agobgpd: fix crash when using "show bgp vrf all"
Igor Ryzhov [Thu, 7 Oct 2021 15:27:29 +0000 (18:27 +0300)]
bgpd: fix crash when using "show bgp vrf all"

Any command that uses `peer_lookup_in_view` crashes when "vrf all" is
used, because bgp is NULL in this case.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 1c49e8138ee377692d8b683fc4bfe292f77b5004)

3 years agoyang: replace an empty pattern with a zero-length restriction
Igor Ryzhov [Tue, 5 Oct 2021 10:27:39 +0000 (13:27 +0300)]
yang: replace an empty pattern with a zero-length restriction

No functional difference, but `length "0"` is more comprehensible.

Suggested-by: Christian Hopps <chopps@labn.net>
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 405ebe45cf111376fe33bad45b4ec836e0157d9f)

3 years agoospf6d: ospf6d is crashing upon receiving duplicated Grace LSA.
rgirada [Tue, 5 Oct 2021 07:52:36 +0000 (00:52 -0700)]
ospf6d: ospf6d is crashing upon receiving duplicated Grace LSA.

Description:
When grace lsa received, DUT is adding
the copy of the  lsas  to all nbrs retransmission  list as part of
flooding procedure and subsequently incrementing the rmt counter in
the original the LSA. This counter is supposed to be decremented
when ack is received by nbr and the lsa  will be removed from retransmission list.

But in our current scenario,
Step-1:
When GR helper is disabled, if DUT receives the grace lsa
it adds the lsa copy to nbrs retransmission list but original
LSA will be discarded since GR helper disabled.
Step-2:
GR helper enabled and DUT receives the grace lsa, as part
of flooding process all nbrs have same copy of lsa in their
corresponding rmt list which was added in step -1 due to this
the corresponding rmt counter in the original lsa is not getting
incremented.
Step-3:
If the same copy of the grace lsa received by DUT, It considers
as implicit ack from nbr if the same copy of the lsa exits in its
rmt list and subsequently  decrement the rmt counter.
Since counter is zero (because of step-1 and 2) , it is asserting while decrement.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
(cherry picked from commit a60eab9e109fd2625dc3f941d7d9be2b6312f593)

3 years agolib: avoid double-free in zmq wrapper callbacks
Mark Stapp [Mon, 9 Aug 2021 15:57:17 +0000 (11:57 -0400)]
lib: avoid double-free in zmq wrapper callbacks

There were paths where the zmq wrapper lib could call user
callbacks that would free the internal context struct, but the
context was then used in the lib code. Use a boolean to avoid
freeing the context within an application callback.

Restore logic that frees the context within the 'cancel' api.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
(cherry picked from commit 8fd5502b0c2e628b875fdaf1a0ca467f8ba07ce4)

3 years agolib: clear caller's pointer when freeing context struct
Mark Stapp [Mon, 9 Aug 2021 15:55:15 +0000 (11:55 -0400)]
lib: clear caller's pointer when freeing context struct

The zeromq lib wrapper uses an internal context struct to help
interact with the libfrr event mechanism. When freeing that
context struct, ensure the caller's pointer is also cleared.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
(cherry picked from commit cf2182c013e57fbcb98ff0f42be7f0d1542c51df)

3 years agoMerge pull request #9762 from ton31337/fix/revert_23aa35ade57501a408fa57f346450a40f1b...
Donald Sharp [Thu, 7 Oct 2021 00:10:35 +0000 (20:10 -0400)]
Merge pull request #9762 from ton31337/fix/revert_23aa35ade57501a408fa57f346450a40f1b0158c_8.1

Revert "bgpd: initial batch of evpn lttng tracepoints"

3 years agoRevert "bgpd: initial batch of evpn lttng tracepoints"
Donatas Abraitis [Wed, 6 Oct 2021 19:36:47 +0000 (22:36 +0300)]
Revert "bgpd: initial batch of evpn lttng tracepoints"

This reverts commit 23aa35ade57501a408fa57f346450a40f1b0158c.

Pushed into 8.1 accidentaly during the freeze period.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9743 from pguibert6WIND/largecomm base_8.1 frr-8.1-rc1
Jafar Al-Gharaibeh [Tue, 5 Oct 2021 19:30:45 +0000 (14:30 -0500)]
Merge pull request #9743 from pguibert6WIND/largecomm

bgpd: large community exact match fix

3 years agoMerge pull request #9711 from idryzhov/doc-ospf
Jafar Al-Gharaibeh [Tue, 5 Oct 2021 19:25:42 +0000 (14:25 -0500)]
Merge pull request #9711 from idryzhov/doc-ospf

doc: fix ospf distribute-list command and description

3 years agoMerge pull request #9744 from idryzhov/isis-redist-cli
Jafar Al-Gharaibeh [Tue, 5 Oct 2021 19:22:27 +0000 (14:22 -0500)]
Merge pull request #9744 from idryzhov/isis-redist-cli

isisd: fix redistribute CLI

3 years agoMerge pull request #9725 from idryzhov/doc-debug-ospf
Jafar Al-Gharaibeh [Tue, 5 Oct 2021 16:52:32 +0000 (11:52 -0500)]
Merge pull request #9725 from idryzhov/doc-debug-ospf

doc: fix debugging-ospf label

3 years agoMerge pull request #9736 from ewlumpkin/comment_spelling_fixes
Jafar Al-Gharaibeh [Tue, 5 Oct 2021 16:48:20 +0000 (11:48 -0500)]
Merge pull request #9736 from ewlumpkin/comment_spelling_fixes

lib: fix spelling nits in command.h

3 years agoisisd: fix redistribute CLI
Igor Ryzhov [Tue, 5 Oct 2021 14:38:21 +0000 (17:38 +0300)]
isisd: fix redistribute CLI

Currently, it is possible to configure IPv6 protocols for IPv4
redistribution and vice versa in CLI. The YANG model doesn't allow this
so the user receives the following error:
```
nfware(config-router)# redistribute ipv4 ospf6 level-1
% Failed to edit configuration.

YANG error(s):
 Invalid enumeration value "ospf6".
 Invalid enumeration value "ospf6".
 Invalid enumeration value "ospf6".
 YANG path: Schema location /frr-isisd:isis/instance/redistribute/ipv4/protocol.
```

Let's make CLI more user-friendly and allow only supported protocols in
redistribution commands.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: large community exact match fix
Philippe Guibert [Tue, 5 Oct 2021 14:24:41 +0000 (16:24 +0200)]
bgpd: large community exact match fix

The pointer to large community was not the appropriate one.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agolib: fix spelling nits in command.h
ewlumpkin [Tue, 5 Oct 2021 03:05:42 +0000 (03:05 +0000)]
lib: fix spelling nits in command.h

Signed-off-by: ewlumpkin <ewlumpkin@gmail.com>
3 years agoMerge pull request #9726 from donaldsharp/ospf6_expire
Renato Westphal [Tue, 5 Oct 2021 00:13:50 +0000 (21:13 -0300)]
Merge pull request #9726 from donaldsharp/ospf6_expire

ospf6d: Ensure expire thread is properly stopped

3 years agoMerge pull request #9722 from chiragshah6/zdev
Sri Mohana Singamsetty [Mon, 4 Oct 2021 17:07:00 +0000 (10:07 -0700)]
Merge pull request #9722 from chiragshah6/zdev

zebra: add nhg id to show ip route json

3 years agoospf6d: Ensure expire thread is properly stopped
Donald Sharp [Mon, 4 Oct 2021 12:37:16 +0000 (08:37 -0400)]
ospf6d: Ensure expire thread is properly stopped

The lsa->expire thread is for keeping track of when we
are expecting to expire(remove/delete) a lsa.  There
are situations where we just decide to straight up
delete the lsa, but we are not ensuring that the
lsa is not already setup for expiration.
In that case just stop the expiry thread and
do the deletion.

Additionally there was a case where ospf6d was
just dropping the fact that a thread was already
scheduled for expiration.  In that case we
should just setup the timer again and it will
reset it appropriately.

Fixes: #9721
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9689 from AnuradhaKaruppiah/bgp-evpn-lttng
Donatas Abraitis [Mon, 4 Oct 2021 16:05:41 +0000 (19:05 +0300)]
Merge pull request #9689 from AnuradhaKaruppiah/bgp-evpn-lttng

bgpd: initial batch of evpn lttng tracepoints

3 years agodoc: fix debugging-ospf label
Igor Ryzhov [Mon, 4 Oct 2021 12:22:24 +0000 (15:22 +0300)]
doc: fix debugging-ospf label

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agozebra: add nhg id to show ip route json
Chirag Shah [Sun, 3 Oct 2021 22:55:03 +0000 (15:55 -0700)]
zebra: add nhg id to show ip route json

Add json field nexthop group id to
'show ip route json'.

Testing Done:
{
  "27.0.0.14\/32":[
    {
      "prefix":"27.0.0.14\/32",
      "protocol":"bgp",
      "selected":true,
      "destSelected":true,
      "distance":20,
      "metric":0,
      "installed":true,
      "table":254,
      "internalStatus":16,
      "internalFlags":8,
      "internalNextHopNum":2,
      "internalNextHopActiveNum":2,
      "nexthopGroupId":103,     <---- New field
      "uptime":"00:04:37",
      "nexthops":[
        {
          "ip":"fe80::202:ff:fe00:11",
          "interfaceName":"uplink-1",
        },
        {
          "ip":"fe80::202:ff:fe00:1d",
          "interfaceName":"uplink-2",
        }
      ]
    }
  ]
}

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agoMerge pull request #9714 from idryzhov/bgp-ext-comm-doc
Donatas Abraitis [Sat, 2 Oct 2021 17:14:11 +0000 (20:14 +0300)]
Merge pull request #9714 from idryzhov/bgp-ext-comm-doc

doc: fix range for bgp expanded community list

3 years agoMerge pull request #9710 from idryzhov/bgp-distribute-list-update
Donatas Abraitis [Sat, 2 Oct 2021 17:12:47 +0000 (20:12 +0300)]
Merge pull request #9710 from idryzhov/bgp-distribute-list-update

bgpd: fix access-list update callback

3 years agoMerge pull request #9701 from AnuradhaKaruppiah/lttng-build-fix
Donatas Abraitis [Sat, 2 Oct 2021 17:11:32 +0000 (20:11 +0300)]
Merge pull request #9701 from AnuradhaKaruppiah/lttng-build-fix

bgpd: fix build error seen when lttng is enabled

3 years agobgpd: initial batch of evpn lttng tracepoints
Anuradha Karuppiah [Tue, 28 Sep 2021 18:18:43 +0000 (11:18 -0700)]
bgpd: initial batch of evpn lttng tracepoints

Low overhead bgp-evpn TPs have been added which push data out in a binary
format -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@switch:~# lttng list --userspace |grep "frr_bgp:evpn"
      frr_bgp:evpn_mh_nh_rmac_zsend (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)
      frr_bgp:evpn_mh_nh_zsend (loglevel: TRACE_INFO (6)) (type: tracepoint)
      frr_bgp:evpn_mh_nhg_zsend (loglevel: TRACE_INFO (6)) (type: tracepoint)
      frr_bgp:evpn_mh_vtep_zsend (loglevel: TRACE_INFO (6)) (type: tracepoint)
      frr_bgp:evpn_bum_vtep_zsend (loglevel: TRACE_INFO (6)) (type: tracepoint)
      frr_bgp:evpn_mac_ip_zsend (loglevel: TRACE_INFO (6)) (type: tracepoint)
root@switch:~#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

In addition to the tracepoints a babeltrace python plugin for pretty
printing (binary data is converted into grepable strings). Sample usage -
frr_babeltrace.py trace_path

Sample tracepoint output -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1. frr_bgp: evpn_mac_ip_zsend
frr_bgp:evpn_mac_ip_zsend {'action': 'add', 'vni': 1007, 'mac': '00:02:00:00:00:04', 'ip': 'fe80::202:ff:fe00:4', 'vtep': '27.0.0.15', 'esi': '03:44:38:39:ff:ff:01:00:00:02'}

2. frr_bgp: evpn_mh_vtep_zsend
frr_bgp:evpn_mh_vtep_zsend {'action': 'add', 'esi': '03:44:38:39:ff:ff:01:00:00:02', 'vtep': '27.0.0.16'}

3. frr_bgp: evpn_mh_nhg_zsend
frr_bgp:evpn_mh_nhg_zsend {'action': 'add', 'type': 'v4', 'nhg': 74999998, 'esi': '03:44:38:39:ff:ff:01:00:00:02', 'vrf': 85}

4. frr_bgp: evpn_mh_nh_zsend
frr_bgp:evpn_mh_nh_zsend {'nhg': 74999998, 'vtep': '27.0.0.16', 'svi': 93}

5. frr_bgp: evpn_mh_nh_rmac_zsend
frr_bgp:evpn_mh_nh_rmac_zsend {'action': 'add', 'vrf': 85, 'nh': '::ffff:1b00:12', 'rmac': '00:02:00:00:00:50'}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agodoc: fix range for bgp expanded community list
Igor Ryzhov [Fri, 1 Oct 2021 15:36:02 +0000 (18:36 +0300)]
doc: fix range for bgp expanded community list

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agodoc: fix ospf distribute-list command and description
Igor Ryzhov [Fri, 1 Oct 2021 10:05:40 +0000 (13:05 +0300)]
doc: fix ospf distribute-list command and description

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix access-list update callback
Igor Ryzhov [Fri, 1 Oct 2021 09:42:04 +0000 (12:42 +0300)]
bgpd: fix access-list update callback

When a regular access-list is updated, we should update references to
regular access-lists, not as-path access-lists.

Fixes #9707.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9712 from idryzhov/travis-gprc
Donald Sharp [Fri, 1 Oct 2021 11:34:44 +0000 (07:34 -0400)]
Merge pull request #9712 from idryzhov/travis-gprc

docker: remove grpc from Travis CI

3 years agodocker: remove grpc from Travis CI
Igor Ryzhov [Fri, 1 Oct 2021 11:04:42 +0000 (14:04 +0300)]
docker: remove grpc from Travis CI

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix build error seen when lttng is enabled
Anuradha Karuppiah [Thu, 16 Sep 2021 18:46:02 +0000 (11:46 -0700)]
bgpd: fix build error seen when lttng is enabled

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agoMerge pull request #9694 from mjstapp/fix_topo_pim_cmp
Igor Ryzhov [Thu, 30 Sep 2021 09:40:55 +0000 (12:40 +0300)]
Merge pull request #9694 from mjstapp/fix_topo_pim_cmp

tests: fix string comparison in lib/pim.py

3 years agotests: fix string comparison in lib/pim.py
Mark Stapp [Wed, 29 Sep 2021 15:49:43 +0000 (11:49 -0400)]
tests: fix string comparison in lib/pim.py

Use correct string comparison syntax in lib/pim.py

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
3 years agoMerge pull request #9560 from LabNConsulting/ziemba/frrmod_load-error-messages
David Lamparter [Wed, 29 Sep 2021 12:35:35 +0000 (14:35 +0200)]
Merge pull request #9560 from LabNConsulting/ziemba/frrmod_load-error-messages

frrmod_load(): fix error messages

3 years agoMerge pull request #9688 from LabNConsulting/working/lb/fix-tt-bgp-vrf
Donald Sharp [Wed, 29 Sep 2021 11:29:39 +0000 (07:29 -0400)]
Merge pull request #9688 from LabNConsulting/working/lb/fix-tt-bgp-vrf

tests:  get bgp_l3vpn_to_bgp_vrf running again, also improve logging (minor)

3 years agoMerge pull request #9422 from pguibert6WIND/update_autort_l3vni
Sri Mohana Singamsetty [Tue, 28 Sep 2021 16:15:34 +0000 (09:15 -0700)]
Merge pull request #9422 from pguibert6WIND/update_autort_l3vni

bgpd: update auto route target for l3vni appropriately

3 years agotests: get bgp_l3vpn_to_bgp_vrf running, also improve logging
Lou Berger [Tue, 28 Sep 2021 15:29:46 +0000 (11:29 -0400)]
tests:  get bgp_l3vpn_to_bgp_vrf running, also improve logging

Signed-off-by: Lou Berger <lberger@labn.net>
3 years agoMerge pull request #9669 from LabNConsulting/chopps/topo-sudo-env
Quentin Young [Tue, 28 Sep 2021 14:53:23 +0000 (10:53 -0400)]
Merge pull request #9669 from LabNConsulting/chopps/topo-sudo-env

3 years agoMerge pull request #9677 from ton31337/fix/zlog_newline_not_needed
Donald Sharp [Tue, 28 Sep 2021 14:44:54 +0000 (10:44 -0400)]
Merge pull request #9677 from ton31337/fix/zlog_newline_not_needed

tools: Add coccinelle script to catch \n or \r at the end of zlog_*

3 years agoMerge pull request #9682 from adrianomarto/mesh-group-fix
Russ White [Tue, 28 Sep 2021 14:21:17 +0000 (10:21 -0400)]
Merge pull request #9682 from adrianomarto/mesh-group-fix

pimd: fixing command "no ip msdp mesh-group member"

3 years agopimd: fixing command "no ip msdp mesh-group member"
Adriano Marto Reis [Tue, 28 Sep 2021 02:38:41 +0000 (12:38 +1000)]
pimd: fixing command "no ip msdp mesh-group member"

Deleting a mesh-group member no longer deletes the mesh-group.

Complete bug description at:
https://github.com/FRRouting/frr/issues/9664

Signed-off-by: Adriano Marto Reis <adrianomarto@gmail.com>
3 years agoMerge pull request #9675 from opensourcerouting/pim-bsm-uaf
Donald Sharp [Mon, 27 Sep 2021 13:45:38 +0000 (09:45 -0400)]
Merge pull request #9675 from opensourcerouting/pim-bsm-uaf

pimd: fix UAF/heap corruption in BSM code

3 years agoMerge pull request #9673 from donaldsharp/bgp_paf
David Lamparter [Mon, 27 Sep 2021 13:37:43 +0000 (15:37 +0200)]
Merge pull request #9673 from donaldsharp/bgp_paf

3 years agotools: Add coccinelle script to catch \n or \r at the end of zlog_*
Donatas Abraitis [Mon, 27 Sep 2021 12:20:51 +0000 (15:20 +0300)]
tools: Add coccinelle script to catch \n or \r at the end of zlog_*

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9672 from donaldsharp/ospf6_newline
David Lamparter [Mon, 27 Sep 2021 08:45:17 +0000 (10:45 +0200)]
Merge pull request #9672 from donaldsharp/ospf6_newline

3 years agopimd: fix UAF/heap corruption in BSM code
David Lamparter [Mon, 27 Sep 2021 08:33:33 +0000 (10:33 +0200)]
pimd: fix UAF/heap corruption in BSM code

This `XFREE()` call is in plainly in the wrong spot.  `rp_all` (the
224.0.0.0/4 entry) isn't supposed to be free'd ever, and the
conditional above makes quite clear that it remains in use.

It may be possible to exploit this as a heap corruption bug, maybe even
as RCE.  I haven't tried; I randomly noticed this while working on the
BSM code.  Luckily this code is only run by the CLI for the clear
command, so the surface is very small.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agobgpd: Don't lookup paf structure get straight to the point
Donald Sharp [Sun, 26 Sep 2021 23:36:03 +0000 (19:36 -0400)]
bgpd: Don't lookup paf structure get straight to the point

The paf data structure is stored based upon an internal
bgp enum.  The code is looking over all AFI/SAFI's and
doing a paf_af_find which then calls afindex to find
the right paf structure.  Let's just loop over the
peer->peer_af_array[] and cut straight to the chase.
Under some loads the paf_af_find was taking up 6%
of the run time.  This removes it entirely.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospf6d: Log messages cannot have newlines
Donald Sharp [Sun, 26 Sep 2021 23:16:10 +0000 (19:16 -0400)]
ospf6d: Log messages cannot have newlines

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agodoc: add sudo environment setup info for topotests
Christian Hopps [Sat, 25 Sep 2021 18:59:13 +0000 (14:59 -0400)]
doc: add sudo environment setup info for topotests

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #9638 from proelbtn/fix-multipath-srv6-sid
Quentin Young [Fri, 24 Sep 2021 18:58:12 +0000 (14:58 -0400)]
Merge pull request #9638 from proelbtn/fix-multipath-srv6-sid

3 years agoMerge pull request #9659 from idryzhov/dev-doc-fix
Quentin Young [Fri, 24 Sep 2021 18:14:44 +0000 (14:14 -0400)]
Merge pull request #9659 from idryzhov/dev-doc-fix

doc: fix code block in grpc docs

3 years agoMerge pull request #9661 from ton31337/fix/bgp_frrtrace_for_lttng
Quentin Young [Fri, 24 Sep 2021 17:53:03 +0000 (13:53 -0400)]
Merge pull request #9661 from ton31337/fix/bgp_frrtrace_for_lttng

3 years agoMerge pull request #9585 from opensourcerouting/ospf6d-nssa-dflt-originate
Russ White [Fri, 24 Sep 2021 17:42:49 +0000 (13:42 -0400)]
Merge pull request #9585 from opensourcerouting/ospf6d-nssa-dflt-originate

ospf6d: add a knob to generate Type-7 default routes

3 years agoMerge pull request #9660 from pguibert6WIND/bgp_error_swap
Donatas Abraitis [Thu, 23 Sep 2021 17:04:24 +0000 (20:04 +0300)]
Merge pull request #9660 from pguibert6WIND/bgp_error_swap

bgpd: swap bgp error value with file descriptor value

3 years agobgpd: Make sure bgp_dest lock/unlock tracepoints works for LTTng as well
Donatas Abraitis [Thu, 23 Sep 2021 13:59:08 +0000 (16:59 +0300)]
bgpd: Make sure bgp_dest lock/unlock tracepoints works for LTTng as well

Tested with both UDST and LTTng, both are OK.

```
[13:57:31.346131253] (+?.?????????) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "10.0.2.0/24", count = 3 }
[13:57:31.346154756] (+0.000023503) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.0.0/24", count = 3 }
[13:57:31.346156699] (+0.000001943) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.10.0/24", count = 2 }
[13:57:31.346157570] (+0.000000871) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.100.1/32", count = 2 }
[13:57:31.346158521] (+0.000000951) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.100.2/32", count = 2 }
[13:57:31.356149109] (+0.009990588) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "10.0.2.0/24", count = 3 }
[13:57:31.356155889] (+0.000006780) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.0.0/24", count = 3 }
[13:57:31.356156840] (+0.000000951) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.10.0/24", count = 2 }
[13:57:31.356157751] (+0.000000911) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.100.1/32", count = 2 }
[13:57:31.356158683] (+0.000000932) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.100.2/32", count = 2 }
[13:57:34.508252238] (+3.152093555) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "172.16.16.1/32", count = 2 }
[13:57:34.508289549] (+0.000037311) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "172.16.16.2/32", count = 2 }
[13:57:34.508307544] (+0.000017995) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "172.16.16.3/32", count = 2 }
[13:57:34.508433878] (+0.000126334) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "10.0.2.0/24", count = 2 }
[13:57:34.508435891] (+0.000002013) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "10.0.2.0/24", count = 2 }
[13:57:34.508458182] (+0.000022291) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "192.168.0.0/24", count = 2 }
[13:57:34.508458852] (+0.000000670) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "192.168.0.0/24", count = 2 }
[13:57:34.508472821] (+0.000013969) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "192.168.10.0/24", count = 1 }
[13:57:34.508473482] (+0.000000661) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "192.168.10.0/24", count = 1 }
[13:57:34.508487041] (+0.000013559) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "192.168.100.1/32", count = 1 }
[13:57:34.508487792] (+0.000000751) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "192.168.100.1/32", count = 1 }
```

Converting bgp_dest_lock_node/bgp_dest_unlock_node to non-inlined function
because LTTng can't work properly with inlined and the compiler does not like
it.

Not sure how it would be with the performance, but let's see.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agotools: Require a lower LTTng version to compile
Donatas Abraitis [Thu, 23 Sep 2021 13:58:52 +0000 (16:58 +0300)]
tools: Require a lower LTTng version to compile

Debian 9 has 2.9.x, only Ubuntu >= 18 has 2.10.x.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9084 from louis-oui/fix-ospf6-router-id
Igor Ryzhov [Thu, 23 Sep 2021 16:03:35 +0000 (19:03 +0300)]
Merge pull request #9084 from louis-oui/fix-ospf6-router-id

ospf6d: fix LSAs remain in LSDB with an old router-id value

3 years agobgpd: swap bgp error value with file descriptor value
Philippe Guibert [Thu, 23 Sep 2021 11:57:56 +0000 (13:57 +0200)]
bgpd: swap bgp error value with file descriptor value

the values were swapped by mistake. fix it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agodoc: fix code block in grpc docs
Igor Ryzhov [Thu, 23 Sep 2021 09:08:12 +0000 (12:08 +0300)]
doc: fix code block in grpc docs

The code block after the :: is not displayed correctly without an empty
line in between.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6d: reset areas and redistribution at router-id modification
Louis Scalbert [Thu, 10 Jun 2021 09:30:05 +0000 (11:30 +0200)]
ospf6d: reset areas and redistribution at router-id modification

The ospf6 router-id is provided by order of preference by:

 ospf6d itself if the "ospf6 router-id X.X.X.X" command is set.
- zebra. If the "ip router-id X.X.X.X" zebra command is set, the
  configured IP is provided as the ID or alternatively the highest
  loopback IPv4 address or else the highest interface IPv4 address.

The running ospf6 router-id is stored in ospf6->router-id.

ospf6->router-id can change in the following conditions:

- A configuration change provides a new router-id value according to
  the above rules. ospf6->router-id is updated to the new value if
  there is no adjacency in FULL state. Otherwise, the ospf6d process
  must be restarted to take the new router-id into account.
- On startup of both zebra and ospf6d, if ospf6d has not yet received a
  valid router-id, ospf6d->router-id is set to 0 (i.e. 0.0.0.0). Then,
  zebra notifies ospf6d that the router-id is available.

At ospf6->router-id, the current behavior of ospf6d is the following:

- The self generated LSAs that refer to the previous router-id as the
  advertising router are kept.
- Self generated LSAs are created with router-id value.
- LSAs from the redistribution that refer to the previous router-id are
  kept and no new redistribution LSAs are created.

As a consequence, the routers in the ospf6 areas will get incorrect
LSAs and might not be able to install prefixes of those LSAs into their
RIB.

This fix solves this issue by resetting the areas and the redistribution
when ospf6->router-id updated.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 years agoMerge pull request #9650 from mjstapp/fix_dup_lookup_netlink
Sri Mohana Singamsetty [Wed, 22 Sep 2021 23:18:19 +0000 (16:18 -0700)]
Merge pull request #9650 from mjstapp/fix_dup_lookup_netlink

zebra: stop asking for AF_BRIDGE interface info twice

3 years agoMerge pull request #9653 from pguibert6WIND/carriage_return
Sri Mohana Singamsetty [Wed, 22 Sep 2021 23:17:50 +0000 (16:17 -0700)]
Merge pull request #9653 from pguibert6WIND/carriage_return

bgpd: add carriage return when dumping tags from all evpn rds

3 years agoMerge pull request #9429 from yar-fed/vtysh-err-not-running
Igor Ryzhov [Wed, 22 Sep 2021 19:52:52 +0000 (22:52 +0300)]
Merge pull request #9429 from yar-fed/vtysh-err-not-running

vtysh: Add error code if daemon is not running