]>
git.puffer.fish Git - matthieu/frr.git/log
Donatas Abraitis [Thu, 21 Sep 2023 06:21:52 +0000 (09:21 +0300)]
Merge pull request #14455 from fdumontet6WIND/fix_coverity_as_path
bgpd: fix coverity issue on aspath_filter_exclude_acl
Russ White [Thu, 21 Sep 2023 03:09:35 +0000 (23:09 -0400)]
Merge pull request #14089 from dmytroshytyi-6WIND/srv6_multiple_segs_sids
bgpd,doc,lib,sharpd,staticd,yang,zebra: SRv6 multiple segs SIDs
Francois Dumontet [Wed, 20 Sep 2023 15:26:12 +0000 (17:26 +0200)]
bgpd: fix coverity issue on aspath_filter_exclude_acl
CID
1566378 (#1-4 of 4): Use after free (USE_AFTER_FREE)76.
use_after_free: Using freed pointer cur_seg.
now the prev_seg pointer is set with always existaing values.
Link: https://scan7.scan.coverity.com/reports.htm#v39104/p13747/fileInstanceId=146858993&defectInstanceId=18968273&mergedDefectId=1566378&fileStart=1376&fileEnd=1625
Fixes: 4685db418e3a861205a28f975afeb9869f674337 (bgpd: add set as-path exclude acl-list command)
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
Donald Sharp [Wed, 20 Sep 2023 16:04:05 +0000 (12:04 -0400)]
Merge pull request #14452 from opensourcerouting/fix/coverity_issues
Some recent coverity fixes
Dmytro Shytyi [Fri, 21 Jul 2023 12:19:20 +0000 (14:19 +0200)]
tests: add srv6 multiple segs SIDs topotest
Configure and verify the installed srv6 route with multiple segs SIDs
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Dmytro Shytyi [Wed, 26 Jul 2023 16:44:23 +0000 (18:44 +0200)]
staticd: add vtysh srv6 multiple segs SIDs
Append staticd vty with multiple segs SIDs.
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Dmytro Shytyi [Wed, 26 Jul 2023 16:01:20 +0000 (18:01 +0200)]
staticd: northbound srv6 hooks for segs stack yang model
Provive hooks for srv6 segs SIDs stack yang model.
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Dmytro Shytyi [Wed, 26 Jul 2023 16:00:17 +0000 (18:00 +0200)]
staticd: zebra, modify nexthop to support multiple srv6 segs SIDs
Adapt the nexthop from 1 to multiple srv6 seg SIDs
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Dmytro Shytyi [Wed, 26 Jul 2023 16:43:51 +0000 (18:43 +0200)]
staticd: add srv6 static route seg information
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Dmytro Shytyi [Wed, 26 Jul 2023 15:58:03 +0000 (17:58 +0200)]
zebra: add northbound api hooks for nexthop segments
Provide skeleton hooks for nexthop segments
Those hooks address seg6 segs stack entries defined in the YANG
model
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Dmytro Shytyi [Wed, 26 Jul 2023 15:59:36 +0000 (17:59 +0200)]
yang: provide a yang model for seg6 segs SIDs stack
Add seg6 segs SIDs stack into frr-nexhop.yang file.
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Dmytro Shytyi [Thu, 27 Jul 2023 09:40:22 +0000 (11:40 +0200)]
lib: adapt nexthop_cmp to handle multiple segs SIDs
Extend nexthop_cmp function to process multiple segs
SIDs.
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Dmytro Shytyi [Thu, 3 Aug 2023 16:35:53 +0000 (18:35 +0200)]
lib: update del_srv6_seg6_local to handle seg6_segs
Adapt de_srv6_seg6local to handle seg6_segs structure.
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Dmytro Shytyi [Thu, 3 Aug 2023 14:20:47 +0000 (16:20 +0200)]
lib: nexthop, free the multiple seg6_segs
Adapt the function that fees srv6 nexthop to handle multiple segs.
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Dmytro Shytyi [Thu, 3 Aug 2023 14:12:04 +0000 (16:12 +0200)]
lib: in nexthop adaptation pass the number of segs to jhash
Adapt nexthop file to handle hash of multiple segments
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Dmytro Shytyi [Wed, 26 Jul 2023 15:56:32 +0000 (17:56 +0200)]
bgpd,lib,sharpd,zebra: srv6 introduce multiple segs/SIDs in nexthop
Append zebra and lib to use muliple SRv6 segs SIDs, and keep one
seg SID for bgpd and sharpd.
Note: bgpd and sharpd compilation relies on the lib and zebra files,
i.e if we separate this: lib or zebra or bgpd or sharpd in different
commits - this will not compile.
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Dmytro Shytyi [Wed, 26 Jul 2023 15:46:31 +0000 (17:46 +0200)]
doc: srv6 multiple segs SIDs documentation
Provide a paragraph for srv6 multiple segs SIDs in documentation
to describe the multiple segs functionality.
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Donatas Abraitis [Wed, 20 Sep 2023 12:24:25 +0000 (15:24 +0300)]
staticd: Check against NULL before dereferencing vrf
If VRF is not found by the given name, validate it and return an error.
Fixes: 76b2bc97e738 ("staticd: Accept full blackhole typed keywords for ip_route_cmd")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Wed, 20 Sep 2023 12:05:35 +0000 (15:05 +0300)]
bgpd: Initialise prd despite if it's safi-related or not
Fixes: d33bd631262d60a7c0a2d56a2fe143bff45e32f0 ("bgpd: fix coverity issue in bgpd")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Mark Stapp [Wed, 20 Sep 2023 11:49:14 +0000 (07:49 -0400)]
Merge pull request #14448 from qlyoung/doc-add-northbound-api-docs
doc: add northbound api arch docs
Donald Sharp [Wed, 20 Sep 2023 11:32:51 +0000 (07:32 -0400)]
Merge pull request #14442 from mjstapp/fix_no_ctime
bgpd, pathd: replace ctime() with ctime_r()
Donatas Abraitis [Wed, 20 Sep 2023 06:58:58 +0000 (09:58 +0300)]
Merge pull request #14440 from fdumontet6WIND/fix_oid_bgp4v2
bgpd: fix SNMP oid in bgp4v2
Donatas Abraitis [Wed, 20 Sep 2023 06:58:13 +0000 (09:58 +0300)]
Merge pull request #14445 from donaldsharp/use_my_cabbage
couple bgp coverity issues
Quentin Young [Wed, 20 Sep 2023 01:36:04 +0000 (21:36 -0400)]
doc: add northbound api arch docs
Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
Donald Sharp [Wed, 20 Sep 2023 00:01:45 +0000 (20:01 -0400)]
Merge pull request #14443 from opensourcerouting/coverity-redux-
20230919
lib: constrain hash table "tabshift" both ways
Donatas Abraitis [Tue, 19 Sep 2023 20:53:49 +0000 (23:53 +0300)]
Merge pull request #14416 from donaldsharp/oil_parent_wrong
pimd: Use a better name for oil_parent
Mark Stapp [Tue, 19 Sep 2023 20:24:07 +0000 (16:24 -0400)]
tests: replace ctime with ctime_r
Replace ctime with ctime_r in bgp test.
Signed-off-by: Mark Stapp <mjs@labn.net>
Mark Stapp [Tue, 19 Sep 2023 17:15:55 +0000 (13:15 -0400)]
pathd: replace ctime with ctime_r
No ctime - replace with ctime_r()
Signed-off-by: Mark Stapp <mjs@labn.net>
Mark Stapp [Tue, 19 Sep 2023 17:15:21 +0000 (13:15 -0400)]
bgpd: replace ctime with ctime_r
No ctime, use ctime_r.
Signed-off-by: Mark Stapp <mjs@labn.net>
Donald Sharp [Tue, 19 Sep 2023 19:51:05 +0000 (15:51 -0400)]
bgpd: Make debug a passed in variable for bgp_evpn_path_info_cmp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Tue, 19 Sep 2023 19:48:57 +0000 (15:48 -0400)]
bgpd: Prevent use after free from coverity's perspective
Prevent a use after free from coverity's perspective. A
bgp node may have been freed.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
David Lamparter [Tue, 19 Sep 2023 19:03:24 +0000 (21:03 +0200)]
lib: constrain hash table "tabshift" both ways
The previous change to assume() did address the coverity warning about
one direction of the shift in HASH_KEY, let's constrain the other in
HASH_SIZE as well.
To be fair, the hash table *will* break at 1G entries, but at that point
we have other problems RAM-wise. (Could bump the thing to 64-bit, but
then we need better item hash functions too on every single user.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Donald Sharp [Thu, 14 Sep 2023 11:18:37 +0000 (07:18 -0400)]
pimd: Use a better name for oil_parent
Use oil_incoming_vif instead of oil_parent. I had
to go look this up as that I failed to remember that
the linux kernel calls this parent for some bizarre
reason.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Russ White [Tue, 19 Sep 2023 15:36:04 +0000 (11:36 -0400)]
Merge pull request #14299 from SaiGomathiN/14286
pimd,pim6d: Resolving the YANG datatype Inconsistency for PIM Hello Interval
Russ White [Tue, 19 Sep 2023 14:19:07 +0000 (10:19 -0400)]
Merge pull request #14414 from opensourcerouting/coverity-assume
lib: another attempt at Coverity false positives
Russ White [Tue, 19 Sep 2023 14:18:14 +0000 (10:18 -0400)]
Merge pull request #14436 from opensourcerouting/fix/set_mss_for_passive_nodes
bgpd: Set TCP MSS for the socket even if the session is set to passive
Russ White [Tue, 19 Sep 2023 14:16:33 +0000 (10:16 -0400)]
Merge pull request #14420 from opensourcerouting/fix/remove_private_asn_after_route_map
bgpd: Remove private ASNs after we modify the as-path with the route-map
Russ White [Tue, 19 Sep 2023 14:14:14 +0000 (10:14 -0400)]
Merge pull request #14398 from m-varasteh/ospfd-rfc5709
ospfd: add support for RFC 5709 OSPFv2 HMAC-SHA Cryptographic Authentication
Russ White [Tue, 19 Sep 2023 14:12:35 +0000 (10:12 -0400)]
Merge pull request #14382 from opensourcerouting/feature/long_lived_graceful_restart_dynamic_capability_split
bgpd: Handle LLGR capability using dynamic capabilities
Russ White [Tue, 19 Sep 2023 14:08:43 +0000 (10:08 -0400)]
Merge pull request #14350 from FRIDM636/pcep-no-commands
pathd: add no command for pce/pce-config options
Francois Dumontet [Thu, 14 Sep 2023 12:47:59 +0000 (14:47 +0200)]
bgpd: snmp MIB bgp4v2 fix indexes in OID
currently snmpwalk give results such :
BGP4V2-MIB::bgp4V2PeerRemoteAddrType.1.ipv6z.10.125.0.2 = INTEGER: ipv4(1)
BGP4V2-MIB::bgp4V2PeerRemoteAddrType.2.dns.253.0.1.37.0.0.0.0.0.0.0.0.0.0.0.3 = INTEGER: ipv6(2)
BGP4V2-MIB::bgp4V2PeerRemoteAddr.1.ipv6z.10.125.0.2 = Hex-STRING: 0A 7D 00 02
BGP4V2-MIB::bgp4V2PeerRemoteAddr.2.dns.253.0.1.37.0.0.0.0.0.0.0.0.0.0.0.3 = Hex-STRING: FD 00 01 25 00 00 00 00 00 00 00 00 00 00 00 03
the expected result is the following
BGP4V2-MIB::bgp4V2PeerRemoteAddrType.1.ipv4.10.125.0.2 = INTEGER: ipv4(1)
BGP4V2-MIB::bgp4V2PeerRemoteAddrType.1.ipv6.253.0.1.37.0.0.0.0.0.0.0.0.0.0.0.3 =
INTEGER: ipv6(2)
BGP4V2-MIB::bgp4V2PeerRemoteAddr.1.ipv4.10.125.0.2 = Hex-STRING: 0A 7D 00 02
BGP4V2-MIB::bgp4V2PeerRemoteAddr.1.ipv6.253.0.1.37.0.0.0.0.0.0.0.0.0.0.0.3 = Hex
-STRING: FD 00 01 25 00 00 00 00 00 00 00 00 00 00 00 03
in draft-ietf-idr-bgp4-mibv2-11
INDEX for Bgp4V2PeerEntry is define as follows
INDEX {
bgp4V2PeerInstance,
bgp4V2PeerRemoteAddrType,
bgp4V2PeerRemoteAddr
}
the peer instance is defined as follows
OBJECT bgp4V2PeerInstance
SYNTAX Unsigned32 (1..
4294967295 )
more this interpretation is conformant with the snmpwalk implementation
for instance we obtain the following result
swBgp.bgp4V2.bgp4V2Objects.bgp4V2PeerTable.bgp4V2PeerEntry.bgp4V2PeerRemotePort.1.ipv6.253.0.1.37.0.0.0.0.0.0.0.0.0.0.0.3 = Gauge32: 179
swBgp.bgp4V2.bgp4V2Objects.bgp4V2PeerTable.bgp4V2PeerEntry.bgp4V2PeerRemoteAs.1.ipv4.10.125.0.2 = Gauge32: 65200
since currently we are not supporting multi instance for bgp peer in
SNMP the bgp4V2PeerInstance value is set to 1 coforming to:
"Implementations that do not support multiple routing instances should return 1 for this object."
test is updated accordingly to fix.
currently index for bgp4V2NlriEntry is not coformant to MIB definition
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
Francois Dumontet [Wed, 13 Sep 2023 12:26:48 +0000 (14:26 +0200)]
bgpd: snmp MIB bg4v2 fix invalid address Type value
currently an snmpwalk gives:
BGP4V2-MIB::bgp4V2PeerFsmEstablishedTime.1.ipv6z.10.125.0.2 = Gauge32: 103 seconds
BGP4V2-MIB::bgp4V2PeerFsmEstablishedTime.2.dns.253.0.1.37.0.0.0.0.0.0.0.0.0.0.0.3 = Gauge32: 103 seconds
but ipv6z and dns are not the valid address type this must be ipv4 and
ipv6.
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
Francois Dumontet [Wed, 13 Sep 2023 12:29:34 +0000 (14:29 +0200)]
bgpd: snmp MIB bg4v2 fix wrong type values
snmpwalk exhibit the followinfg errors:
BGP4V2-MIB::bgp4V2PeerLastErrorReceivedTime.1.ipv6z.10.125.0.2 = Wrong Type (should be Timeticks): Gauge32: 0
BGP4V2-MIB::bgp4V2PeerLastErrorReceivedTime.2.dns.253.0.1.37.0.0.0.0.0.0.0.0.0.0.0.3 = Wrong Type (should be Timeticks): Hex-STRING: 00 00 00 00 00 00 00 00
BGP4V2-MIB::bgp4V2PeerLastErrorSentTime.1.ipv6z.10.125.0.2 = Wrong Type (should be Timeticks): Gauge32: 178
BGP4V2-MIB::bgp4V2PeerLastErrorSentTime.2.dns.253.0.1.37.0.0.0.0.0.0.0.0.0.0.0.3 = Wrong Type (should be Timeticks): Hex-STRING: B2 00 00 00 00 00 00 00
Error: OID not increasing: BGP4V2-MIB::bgp4V2NlriIndex.1.4.10.200."".0.24.10.125.0.2
>= BGP4V2-MIB::bgp4V2NlriIndex.1.4.10.200."".0.24."".0.0.0
draft-ietf-idr-bgp4-mibv2-11 states the following
bgp4V2PeerLastErrorReceivedTime OBJECT-TYPE
SYNTAX TimeStamp
bgp4V2PeerLastErrorSentTime OBJECT-TYPE
SYNTAX TimeStamp
we set the correct values
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
Donatas Abraitis [Tue, 19 Sep 2023 11:43:22 +0000 (14:43 +0300)]
Merge pull request #14422 from cscarpitta/bugfix/fix-coverity-isis-srv6
isisd: Fix a bunch of coverity issues in IS-IS
Donatas Abraitis [Mon, 18 Sep 2023 19:54:53 +0000 (22:54 +0300)]
tests: Check if TCP MSS is synced if using a passive neighbor
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Mon, 18 Sep 2023 19:34:45 +0000 (22:34 +0300)]
bgpd: Set TCP min MSS per listener
Set only if at least one peer is in passive mode.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Mark Stapp [Mon, 18 Sep 2023 19:16:02 +0000 (15:16 -0400)]
Merge pull request #14429 from opensourcerouting/ospf6d-warnfix-
20230916
ospf6d: fix uninitialized warnings
Donatas Abraitis [Mon, 18 Sep 2023 12:54:43 +0000 (15:54 +0300)]
bgpd: Show TCP MSS per neighbor always, despite if it's configured or not
To show the TCP MSS value per neighbor you have to configure it, otherwise you
don't see the actual value.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Fri, 15 Sep 2023 11:05:41 +0000 (14:05 +0300)]
bgpd: Set TCP MSS for the socket even if the session is set to passive
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Mon, 18 Sep 2023 08:40:48 +0000 (11:40 +0300)]
Merge pull request #14406 from donaldsharp/pim_debug_fun
pimd: Display oil_parent as a string name of the interface
Donatas Abraitis [Mon, 18 Sep 2023 08:06:05 +0000 (11:06 +0300)]
Merge pull request #14431 from idryzhov/zebra-cleanup
zebra: remove duplicated code
Donatas Abraitis [Mon, 18 Sep 2023 08:05:33 +0000 (11:05 +0300)]
Merge pull request #14418 from bisdn/jogo_frrcommon_fix_stop_quiet
tools: make --quiet actually suppress output
Donatas Abraitis [Mon, 18 Sep 2023 07:09:12 +0000 (10:09 +0300)]
Merge pull request #14409 from pguibert6WIND/donotuse_redistribute_table_on_non_default_bgp
bgpd: fix forbiding 'redistribute table' usage on non default instances
Igor Ryzhov [Sun, 17 Sep 2023 19:34:51 +0000 (22:34 +0300)]
zebra: remove duplicated code
The same thing is done in zebra_if_update_link a couple of lines above.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
David Lamparter [Sat, 16 Sep 2023 12:17:24 +0000 (14:17 +0200)]
ospf6d: fix uninitialized warnings
GCC 13.2.0 complains:
```
ospf6d/ospf6_intra.c:139:25: error: ‘json_arr’ may be used uninitialized [-Werror=maybe-uninitialized]
ospf6d/ospf6_intra.c:485:20: error: ‘json_arr’ may be used uninitialized [-Werror=maybe-uninitialized]
```
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Mahdi Varasteh [Tue, 12 Sep 2023 11:39:44 +0000 (15:09 +0330)]
[ospfd]: add support for RFC 5709 HMAC-SHA Auth
This patch includes:
* Implementation of RFC 5709 support in OSPF. Using
openssl library and FRR key-chain,
one can use SHA1, SHA256, SHA384, SHA512 and
keyed-MD5( backward compatibility with RFC 2328) HMAC algs.
* Updating documentation of OSPF
* add topotests for new HMAC algorithms
Signed-off-by: Mahdi Varasteh <varasteh@amnesh.ir>
Igor Ryzhov [Fri, 15 Sep 2023 22:03:21 +0000 (01:03 +0300)]
Merge pull request #14417 from Jafaral/veth
zebra: fix link update for veth interfaces
Carmine Scarpitta [Fri, 15 Sep 2023 10:36:30 +0000 (12:36 +0200)]
isisd: Fix CID
1568134 (Null pointer dereference)
Null check `isis` pointer before dereferencing it.
Fixes this coverity issue:
*** CID
1568134 : Null pointer dereferences (NULL_RETURNS)
/isisd/isis_zebra.c: 1146 in isis_zebra_process_srv6_locator_chunk()
1140 "prefix %pFX, block_len %u, node_len %u, func_len %u, arg_len %u",
1141 chunk->locator_name, &chunk->prefix, chunk->block_bits_length,
1142 chunk->node_bits_length, chunk->function_bits_length,
1143 chunk->argument_bits_length);
1144
1145 /* Walk through all areas of the ISIS instance */
>>> CID
1568134 : Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing "isis", which is known to be "NULL".
1146 for (ALL_LIST_ELEMENTS_RO(isis->area_list, node, area)) {
1147 if (strncmp(area->srv6db.config.srv6_locator_name,
1148 chunk->locator_name,
1149 sizeof(area->srv6db.config.srv6_locator_name)) != 0)
1150 continue;
1151
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine Scarpitta [Fri, 15 Sep 2023 10:30:39 +0000 (12:30 +0200)]
isisd: Fix CID
1568133 (Null pointer dereference)
Null checking the `sra` pointer after dereferencing it causes a
coverity issue. Let's perform the null check before dereferencing the
pointer.
Fixes this coverity issue:
*** CID
1568133 : Null pointer dereferences (REVERSE_INULL)
/isisd/isis_zebra.c: 1077 in isis_zebra_srv6_adj_sid_uninstall()
1071 enum seg6local_action_t action = ZEBRA_SEG6_LOCAL_ACTION_UNSPEC;
1072 struct interface *ifp;
1073 uint16_t prefixlen = IPV6_MAX_BITLEN;
1074 struct isis_circuit *circuit = sra->adj->circuit;
1075 struct isis_area *area = circuit->area;
1076
>>> CID
1568133 : Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "sra" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1077 if (!sra)
1078 return;
1079
1080 switch (sra->behavior) {
1081 case SRV6_ENDPOINT_BEHAVIOR_END_X:
1082 prefixlen = IPV6_MAX_BITLEN;
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine Scarpitta [Fri, 15 Sep 2023 10:25:50 +0000 (12:25 +0200)]
isisd: Fix CID
1568132 (Null pointer dereference)
Null checking the `sra` pointer after dereferencing it causes a
coverity issue. Let's perform the null check before dereferencing the
pointer.
Fixes this coverity issue:
*** CID
1568132 : Null pointer dereferences (REVERSE_INULL)
/isisd/isis_zebra.c: 1023 in isis_zebra_srv6_adj_sid_install()
1017 struct seg6local_context ctx = {};
1018 uint16_t prefixlen = IPV6_MAX_BITLEN;
1019 struct interface *ifp;
1020 struct isis_circuit *circuit = sra->adj->circuit;
1021 struct isis_area *area = circuit->area;
1022
>>> CID
1568132 : Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "sra" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1023 if (!sra)
1024 return;
1025
1026 sr_debug("ISIS-SRv6 (%s): setting adjacency SID %pI6", area->area_tag,
1027 &sra->sid);
1028
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Carmine Scarpitta [Fri, 15 Sep 2023 10:13:45 +0000 (12:13 +0200)]
isisd: Fix CID
1568129 (Null pointer dereference)
Fix this coverity issue:
*** CID
1568129 : Null pointer dereferences (REVERSE_INULL)
/isisd/isis_tlvs.c: 2813 in unpack_item_srv6_end_sid()
2807 sid->subsubtlvs = NULL;
2808 }
2809
2810 append_item(&subtlvs->srv6_end_sids, (struct isis_item *)sid);
2811 return 0;
2812 out:
>>> CID
1568129 : Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "sid" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
2813 if (sid)
2814 free_item_srv6_end_sid((struct isis_item *)sid);
2815 return 1;
2816 }
2817
2818 /* Functions related to TLVs 1 Area Addresses */
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Donatas Abraitis [Thu, 14 Sep 2023 18:52:21 +0000 (21:52 +0300)]
tests: Check if private ASNs are removed if modified by route-map
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Thu, 14 Sep 2023 18:17:07 +0000 (21:17 +0300)]
bgpd: Remove private ASNs after we modify the as-path with the route-map
If we modify as-path with route-map and prepend with private ASNs, then we
advertise a new as-path without stripping private ASNs. Let's fix this, and
remove private ASNs despite if they were sent by the origin or prepended locally.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donald Sharp [Tue, 12 Sep 2023 22:19:23 +0000 (18:19 -0400)]
pimd: Display oil_parent as a string name of the interface
When debugging and outputting the oil_parent() let's just
convert it to a string that is useful for people trying
to debug pim
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Jonas Gorski [Thu, 14 Sep 2023 15:04:16 +0000 (17:04 +0200)]
tools: make --quiet actually suppress output
When calling daemon_stop() with --quiet and e.g. the pidfile is empty,
it won't return early since while "$fail" is set, "$2" is "--quiet", so
the if condition isn't met and it will continue executing, resulting
in error messages in the log:
> Sep 14 14:48:33 localhost watchfrr[2085]: [YFT0P-5Q5YX] Forked background command [pid 2086]: /usr/lib/frr/watchfrr.sh restart all
> Sep 14 14:48:33 localhost frrinit.sh[2075]: /usr/lib/frr/frrcommon.sh: line 216: kill: `': not a pid or valid job spec
> Sep 14 14:48:33 localhost frrinit.sh[2075]: /usr/lib/frr/frrcommon.sh: line 216: kill: `': not a pid or valid job spec
> Sep 14 14:48:33 localhost frrinit.sh[2075]: /usr/lib/frr/frrcommon.sh: line 216: kill: `': not a pid or valid job spec
Fix this by moving the --quiet check into the block to log_failure_msg(),
and also add the check to all other invocations of log_*_msg() to make
--quiet properly suppress output.
Fixes: 19a99d89f088 ("tools: suppress unuseful warnings during restarting frr")
Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
Jafar Al-Gharaibeh [Thu, 14 Sep 2023 14:24:25 +0000 (09:24 -0500)]
zebra: fix link update for veth interfaces
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Farid Mihoub [Wed, 30 Aug 2023 12:32:43 +0000 (14:32 +0200)]
pathd: reset pcc peer connection when pce options modified
Reset the PCC peer connection to take into account new changes of the
PCE options.
Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
Farid MIHOUB [Thu, 24 Aug 2023 08:23:01 +0000 (10:23 +0200)]
pathd: add no command for pce/pce-config sub-commands
Add "no" command for pcep pce/pce-config sub-commands, this will mainly
restart configured options to default values.
Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
David Lamparter [Thu, 14 Sep 2023 09:43:56 +0000 (11:43 +0200)]
lib: another attempt at Coverity false positives
Typesafe hash tables do this:
assume((tabshift) >= 2 && (tabshift) <= 33);
(val) >> (33 - (tabshift));
Sadly, Coverity currently ignores assume() and says:
[...] right shifting by more than 31 bits has undefined behavior.
The shift amount, "33 - h->hh.tabshift", is 33.
Let's see if Coverity understands this can't happen...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Donatas Abraitis [Wed, 13 Sep 2023 18:52:37 +0000 (21:52 +0300)]
Merge pull request #14383 from donaldsharp/bgp_coverity_cleanup_early_sept
Bgp coverity cleanup early sept
Donald Sharp [Wed, 13 Sep 2023 16:12:13 +0000 (12:12 -0400)]
Merge pull request #14410 from opensourcerouting/fix/keep_su_remote_local
bgpd: Keep remote/local socket unions on BGP start event
Donatas Abraitis [Wed, 13 Sep 2023 10:21:47 +0000 (13:21 +0300)]
bgpd: Keep remote/local socket unions on BGP start event
Not sure why this is needed, because it's reset on bgp_connect_success(),
when the session is UP.
When the session is reset, it clears those variables, and we are not able to
see what remote address was before, etc.
hostLocal, hostRemote reports Unknown for `show bgp neighbor json`.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Philippe Guibert [Wed, 13 Sep 2023 09:36:23 +0000 (11:36 +0200)]
bgpd: fix forbiding 'redistribute table' usage on non default instances
The 'redistribute table' command can be used by configuration on a
non default BGP instance, but this command does not work for multiple
reasons:
- The route entries configured on a given table are always configured
from the default vrf. This constraint prevents from redistributing a
prefix from the default vrf to an other non default bgp instance.
- The importation of route entries requires 'ip import-table' on vrfs
and this command is not available
Fix this by preventing from configuring this kind of redistribution
on non default bgp instances.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Russ White [Wed, 13 Sep 2023 09:57:49 +0000 (05:57 -0400)]
Merge pull request #14162 from opensourcerouting/feature/turn_on_nht_resolve_via_default_for_traditional_profile
zebra: Turn on `nht resolve-via-default` by default for traditional profile
Donatas Abraitis [Thu, 7 Sep 2023 07:23:26 +0000 (10:23 +0300)]
tests: Check if LLGR settings can be changed via BGP dynamic capabilities
LLGR stale-time setting.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Thu, 7 Sep 2023 07:21:45 +0000 (10:21 +0300)]
bgpd: Handle LLGR capability using dynamic capabilities
LLGR stale time is exchanged using OPEN messages. In order to
reduce stal time before doing an actual graceful restart + LLGR, it might be useful
to increase the time, but this is not possible without resetting the session.
With this change, it's possible to send dynamic capability with a new value, and
GR will respect a new reset time value when LLGR kicks in.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Thu, 7 Sep 2023 07:17:52 +0000 (10:17 +0300)]
bgpd: Move BGP_CAP_LLGR_MIN_PACKET_LEN to headers file
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Thu, 7 Sep 2023 07:16:22 +0000 (10:16 +0300)]
bgpd: Use explicit data types for graceful_restart_af struct
afi/safi comes as integers, but we should decode them as uint16/uint8
accordingly.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Thu, 7 Sep 2023 07:14:45 +0000 (10:14 +0300)]
bgpd: Show LLGR timers under `show bgp neighbor`
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Donatas Abraitis [Wed, 13 Sep 2023 08:23:42 +0000 (11:23 +0300)]
Merge pull request #14400 from louis-6wind/local-no-retain
bgpd: fix import from a local VRF with no bgp retain
Donatas Abraitis [Wed, 13 Sep 2023 06:52:19 +0000 (09:52 +0300)]
Merge pull request #14404 from donaldsharp/snmp_mess_ups
tests: snmp tests sometimes fail with `Unable to bind`
Jafar Al-Gharaibeh [Tue, 12 Sep 2023 20:12:15 +0000 (15:12 -0500)]
Merge pull request #14399 from opensourcerouting/fix/bgpd_handle_BGP_MAX_ATTR
bgpd: BGP_ATTR_MAX can be 255, allow using it for path attr
Donald Sharp [Tue, 12 Sep 2023 17:05:05 +0000 (13:05 -0400)]
tests: snmp tests sometimes fail with `Unable to bind`
the snmp tests are using zebra.conf to setup the
address that they are binding to and immediately
after that they are starting snmpd. If snmpd
starts up *before* zebra has installed the address
the bind on the address will fail. Causing the entire
test to fail. Modify the snmpd.conf for all our
snmp tests to bind to all addresses. Things still
work and we no longer have an issue.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Donald Sharp [Tue, 12 Sep 2023 16:05:20 +0000 (12:05 -0400)]
Merge pull request #14397 from manojvn/mgmt_sb_commands
mgmtd: support bundle commands for mgmt.
Russ White [Tue, 12 Sep 2023 15:28:20 +0000 (11:28 -0400)]
Merge pull request #14237 from Keelan10/pbrd-map-leak
pbrd: Free Memory in pbr_map_delete
Mark Stapp [Tue, 12 Sep 2023 15:20:50 +0000 (11:20 -0400)]
Merge pull request #14365 from opensourcerouting/typesafe-const-declutter
Revert "lib: add a frr_each_const macro"
Louis Scalbert [Tue, 12 Sep 2023 11:30:57 +0000 (13:30 +0200)]
topotests: check route import in bgp_vpnv4_noretain
Check route import in bgp_vpnv4_noretain
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Louis Scalbert [Tue, 12 Sep 2023 11:57:50 +0000 (13:57 +0200)]
topotest: fix bgp_vpnv4_noretain test descriptions
Fix bgp_vpnv4_noretain test descriptions
Fixes: 22dfa04b78 ("topotests: more tests in bgp_vpnv4_noretain")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Louis Scalbert [Mon, 11 Sep 2023 16:33:23 +0000 (18:33 +0200)]
bgpd: fix vpn import from local vrf with no retain
The BGP "no retain" VPN option avoids storing VPN prefixes that are not
imported in the incoming BGP table (aka. Adj RIB in). When a VPN import
policy is changed, BGP does a soft clear so that a prefix refresh is
requested from the peers. However, the import from local VPN prefixes
is never requested.
Fix this issue by requesting a local import refresh.
Fixes: a486300b26 ("bgpd: implement retain route-target all behaviour")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Russ White [Tue, 12 Sep 2023 12:51:50 +0000 (08:51 -0400)]
Merge pull request #14379 from donaldsharp/peer_connection_part_two
Peer connection part two
Russ White [Tue, 12 Sep 2023 12:45:14 +0000 (08:45 -0400)]
Merge pull request #14348 from opensourcerouting/fpm-rr
zebra: support route replace semantic in FPM
Russ White [Tue, 12 Sep 2023 12:33:42 +0000 (08:33 -0400)]
Merge pull request #13724 from cscarpitta/feature/isisd-srv6-support
isisd: Add support for SRv6 uSID (RFC 9352)
Donatas Abraitis [Tue, 12 Sep 2023 11:46:11 +0000 (14:46 +0300)]
bgpd: BGP_ATTR_MAX can be 255, allow using it for path attr discard/withdraw cmds
https://www.rfc-editor.org/rfc/rfc2042.html
says: 255 reserved for development
In FRR, 255 is kinda used too BGP_ATTR_VNC, even more we allow setting 255 in CLI.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Manoj Naragund [Tue, 12 Sep 2023 08:53:04 +0000 (01:53 -0700)]
mgmtd: support bundle commands for mgmt daemon.
Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
Carmine Scarpitta [Sat, 3 Jun 2023 11:53:33 +0000 (13:53 +0200)]
doc: Add documentation for IS-IS SRv6 features
Add documentation for IS-IS SRv6 functionalities (RFC 9352)
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Carmine Scarpitta [Tue, 13 Dec 2022 15:15:21 +0000 (16:15 +0100)]
tests: Add `isis_srv6_topo1` test for IS-IS SRv6
Add a new topotest `isis_srv6_topo1` for verifying SRv6 functionalities
in IS-IS (RFC 9352).
This topotest consists of nine tests:
* Network convergence after applying SRv6 configuration
* Disable SRv6 Locator on zebra on r1
* Enable SRv6 Locator on zebra on r1
* Disable SRv6 Locator on ISIS on r1
* Enable SRv6 Locator on ISIS on r1
* Disable SRv6 on ISIS on r1
* Enable SRv6 on ISIS on r1
* Disable SRv6 on zebra on r1
* Enable SRv6 on zebra on r1
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Carmine Scarpitta [Mon, 12 Jun 2023 16:58:34 +0000 (18:58 +0200)]
tests: Update fuzz test to match expected output
Update IS-IS fuzz test to match corrected output after the introduction
of SRv6-related TLVs.
The update was performed using wuschl [1] like this:
$ wuschl rebuild tests/isisd/test_fuzz_isis_tlv
$ gzip -9 tests/isisd/test_fuzz_isis_tlv_tests.h
[1] https://pypi.org/project/wuschl/
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Carmine Scarpitta [Sun, 3 Sep 2023 06:54:57 +0000 (08:54 +0200)]
isisd: Make SRv6 interface configurable
Add CLI command and functions to configure the interface used for
installing SRv6 SIDs into Linux data plane
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Carmine Scarpitta [Sun, 3 Sep 2023 17:21:50 +0000 (19:21 +0200)]
yang: Add SRv6 interface to IS-IS YANG model
Add SRv6 interface to the IS-IS YANG model
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Carmine Scarpitta [Fri, 4 Aug 2023 06:11:46 +0000 (08:11 +0200)]
isisd: Make SRv6 Node MSDs customizable
Add CLI commands to customize SRv6 Node MSD values.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>