When a peer is bound to a peer-group, the GR flags set on the
peer are over-written.
Update the GR flags for the peer after it has been bound to a
peer-group.
Donald Sharp [Tue, 2 Jun 2020 20:10:48 +0000 (16:10 -0400)]
bgpd: Actually find the sequence number for `bgp extcommunity-list...`
The code in the bgp extcommunity-list function was using
argv_find to get the correct idx. The problem was that
we had already done argv_finds before and idx was non-zero
thus having us always set the seq pointer to what was last
looked up. This causes us to pass in a value to the
underlying function and it would just wisely ignore it
causing a seq number of 0.
We would then write this seq number of 0 and then immediately
reject it on read in again. BOO!
Actually handle argv_find the way it was meant to be.
Ticket:CM-29926 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Olivier Dugeon [Tue, 2 Jun 2020 17:24:46 +0000 (19:24 +0200)]
ospfd: Move Segment Routing Zebra functions
For coherency, move and rename functions that send MPLS labels configurations
from ospf_sr.c to ospf_zebra.c:
- ospf_zebra_update_prefix_sid()
- ospf_zebra_delete_prefix_sid()
- ospf_zebra_send_adjacency_sid()
Olivier Dugeon [Tue, 12 May 2020 14:42:38 +0000 (16:42 +0200)]
ospfd: Update Prefix & Adjacency SIDs Management
SIDs are not uninstall in LFIB when ospf adjacenyi or loopback goes down as
self LSA flusing is not handle by ospf_ext_link_lsa_update(). The patch
introduces new functions ospf_sr_ext_itf_add() and ospf_sr_ext_itf_delete() in
ospf_sr.c to directly manage LFIB for SIDs when change is detected in
ospf_ext_link_ism_change() and ospf_ext_link_nsm_change().
Update OSPF Segment Routing topotest in conformity to ECMP
- Add one more interface between r1 and r2 for ECMP
- Anonymize Adjacency SID
- Update expected json output
- Improve parsing of Router Information, especially when a router
stops advertising Segment Routing capabilities
- Finish conversion to '%pFX' and '%pI4'
Olivier Dugeon [Fri, 20 Mar 2020 10:34:52 +0000 (11:34 +0100)]
ospfd: Add ECMP support to OSPF Segment Routing
* Change sr_prefix structure in ospf_sr.h to add support to ECMP
* Add new Segment Routing information to ospf_paths in ospf_route.h
* Backport MPLS label configuration from IS-IS Segment Routing implementation
* Re-write log message in ospf_sr.c and ospf_ext.c
Richard Wu [Wed, 3 Jun 2020 01:44:16 +0000 (09:44 +0800)]
zebra: Fix zebra crashed in building FPM netlink message when bgp sends aggregation routes to zebra.
Issue:
When BGP sends aggregation routes to zebra, the next hop is black hole.
Then Zebra will try to build the netlink FPM message, but there is no
next hop as it is a black hole route. Then the netlink_route_info_fill
function returns 0. In the result, zebra will crashed in
"assert(data_len)" of zfpm_build_route_updates.
This issue also happen when I create a static black hole route via
staticd.
Fix:
As the netlink message of the blackhole route is legal, it should return
success.
Donald Sharp [Tue, 2 Jun 2020 16:23:09 +0000 (12:23 -0400)]
bgpd: Fix crash in `match ip next-hop address` command
When issuing the command `match ip next-hop address`
bgp would crash. This is because the no form of the
command was making the address optional and we would
try to read data we should not be.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Mark Stapp [Tue, 21 Apr 2020 12:41:35 +0000 (08:41 -0400)]
zebra: handle OPAQUE registrations and forward messages
Add initial support to maintain client daemon registrations for
OPAQUE messages. Use the registered zapi client info to forward
copies of OPAQUE messages sent to zebra.
Mark Stapp [Wed, 8 Apr 2020 20:39:49 +0000 (16:39 -0400)]
zebra: call zapi message handler with a batch
The zapi code processes a batch of incoming messages, using a
fifo. Hand the entire batch into the main zebra handling code,
and let it loop through the individual messages.
Divert the special OPAQUE messages from the normal processing
flow, and offer them to the new zebra_opaque module instead.
Mark Stapp [Tue, 7 Apr 2020 13:50:53 +0000 (09:50 -0400)]
zebra: add lock and busy counter for zclients
Add a mutex used to manage the list of zclients. Add a busy
counter to the zapi client session, so that we can use a
client session from another pthread.
Mark Stapp [Sun, 19 Apr 2020 17:23:09 +0000 (13:23 -0400)]
zebra: add zebra opaque module
Add the zebra_opaque module, designed to offload some opaque zapi
message processing to a new, dedicated pthread. Add to the build;
also re-sort the lists of zebra files in subdir.am.
Start, stop, and clean-up the opaque module, integrate with zebra
start and shutdown.
Mark Stapp [Mon, 6 Apr 2020 20:10:13 +0000 (16:10 -0400)]
lib: add OPAQUE zapi message
Add a zapi message type designed to carry opaque data. Add
'send' api, and prototype for client handler function. Also
add registration/unreg messages, so that clients can 'subscribe'
to receive these messages as they're passing through zebra.
Mark Stapp [Sun, 5 Apr 2020 15:48:05 +0000 (11:48 -0400)]
lib: add stream_fifo_init, more const
Add utilities that init and deinit a stream_fifo - this lets us
use an on-stack fifo in some places, avoiding malloc'ing. Also
add const to some apis (no functional changes there).
Karen Schoener [Thu, 28 May 2020 20:36:35 +0000 (16:36 -0400)]
ldpd: Relay data plane pseudowire status in LDP notification
Provide a way for the data plane to indicate pseudowire
status (such as: not forwarding, AC failure).
On a data plane pseudowire install failure, data plane
sets the pseudowire status.
Zebra relays the pseudowire status to LDP.
LDP includes the pseudowire status in the LDP notification
to the LDP peer.
Mark Stapp [Mon, 1 Jun 2020 12:59:06 +0000 (08:59 -0400)]
zebra: include dest addr when deleting p2p from interface
When deleting a p2p address from an interface, include
the destination address. Without this, we don't find the
internal connected datastruct and process the delete
correctly on netlink OSes.
Quentin Young [Fri, 22 May 2020 20:12:38 +0000 (16:12 -0400)]
bgpd: avoid spamming bgp_accept() on bad vrf sock
bgp_accept() gets called over and over again when a VRF device is
deleted out from under a bgp listener socket that is bound to it.
Prevent this by noting the error and cancelling ourselves, allowing the
vrf status code to clean up the mess when it receives word about the
change from Zebra.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Sun, 31 May 2020 08:10:33 +0000 (04:10 -0400)]
alpine: update packages
Alpine builds have been failing for some time as a consequence of only
installing python 2 development packages when we have build scripts that
require python 3.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Donald Sharp [Sat, 30 May 2020 19:44:54 +0000 (15:44 -0400)]
bgpd: Improve connection rejection messages
Try to give a bit more useful data about where we
think the connection is trying to come in from.
Hopefully this will let us debug connection issues
a bit faster in cases where there are config issues.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Appu Joseph [Fri, 29 May 2020 14:23:36 +0000 (10:23 -0400)]
bgpd: Fix "malformed communities" for accept-own-nexthop
"set community accept-own-nexthop" returns "malformed communities"
error. This is because the token matching hits an earlier "accept-own"
and leaves "-nexthop" as a separate token to be processed.
Reorder the switch cases so that both are processed correctly.
we were not correctly checking the MPLS-TE status of the area when
adding an IP address to a circuit, and this was preventing the local
address TLV to be populated after an interfaced flap.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Bart Vrancken [Tue, 26 May 2020 07:35:46 +0000 (09:35 +0200)]
doc: Update snmp.rst
Updated documentation for routers with a large route table, which breaks
SNMP/AgentX and in some conditions even crashes FRR. The documentation
proposal amends the SNMP configuration to exclude certain OID's that
are not needed in normal cases.
Format-fixed-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: Bart Vrancken <bart@abuse.io>