r05a04_dev
master
v24-dtr-reset-fix
4.32j_maint
4.31h_maint
4.30h_maint
4.11f_maint
82-dvmbridge---implement-notch-filter-for-2175hz-trc-guard-tone
fne_rest_improvements
v24-dtr-rts
4.04d_maint
4.01b_maint
3.6-maint
3.56-maint
3.5-maint
3.0-maint
3.0-rcon_maint
2.0-maint
2022-10-14
2023-02-04
2023-02-09
2023-02-18
2023-02-19
2023-02-25
2023-03-01
2023-03-02
2023-03-06
2023-03-07
2023-03-08
2023-03-09
2023-03-11
2023-03-12
2023-03-16
2023-03-21
2023-03-22
2023-03-23
2023-03-24
2023-03-25
2023-03-26
2023-03-27
2023-03-28
2023-03-29
2023-09-05
2023-09-08
2025-04-16
2025-05-01
2025-05-25
2025-09-03
2025-12-03
${ noResults }
8 Commits (274a8f23fcbb3cc17dd6bfa703107925527894bd)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
274a8f23fc
|
Merge R05A02 (r04k32_dev branch) into Master (#110)
Below is a summary from the various commits, this release updates the major version number. Backward compatibility, with previous versions should not be a problem. But YMMV and its important to note that FNE backward compatibility, specifically might be problematic (FNE's should be at the same release level). This release changes significant under the hood implementations, including the lowest level of our network stack. * update version number for next dev version; * implement passing complex types as refs in lambda functions; * move KMM NoService response into its own helper function; * remove data call collisions (this code was really iffy); refactor log messages; refactor default handling of packets the FNE doesn't process; insert null bits before PDU; * set RSI data properly for outgoing KMM frame; * implement TEK encryption with an AES-256 KEK; * add support for unwrapping (decrypting) a KEK encrypted TEK; * reorganize code and organization for handling P25 OTAR KMMs for better separation and robustness (this is still a WIP and does not function!); * force hard disable KMF services if OpenSSL isn't compiled in; add instance of P25 crypto to P25OTARService; * add support to expose KMF services via DLI UDP; add plumbing to support encrypted KMM frames; * add some debug dumping; * BUGFIX: null reference when trying to perform old style lookup of timestamp when debugging is enabled; * standardize KMM logging; * begin adding support for V.24 PDU data; * fix C++ namespace shenanigans; * fix documentation error; * add support for outgoing V.24 PDU data; * minor alterations to bridge UDP audio logic; set better default for bridge udpJitter buffer; * re-engineer entirely how source untimed raw PCM frames over UDP are handled and timed; refactor how udp end of call is handled; * add support to resize the recv and send buffers on the raw UDP socket; adjust the recv buffer on bridge to use 131K system buffer for the socket (this allows us to hold ~394 frames worth of *raw* PCM + metadata in the socket's internal buffer in the system kernel; * set socket buffer sizes to larger values then the default; * annotate Linux limiting the maximum send and recv socket buffer sizes * update dvmhost submodule; * use a 2M buffer for bridge UDP audio; * display the socket buffer resize as warnings and not errors; * reduce UDP recv/send buffer size to a lower reasonable value of 512K; * update README.md; * add more class copy safety; * correct missing parens; * correct loop indexing; remove unused variable; * deprecate unused DIU flag (this isn't what this byte meant in the first place); * add call start marker to main application log; * remove SIP classes (this will be done by a different team, and done differently); begin refactoring Log and ActivityLog implementations into C++-type functions to do away with the C-style va_args functions for log message handling; correct -Wstringop-trunction warnings from BaseNetwork.cpp (we hide the warning for these because we are intentionally copying these strings without the nul terminator); * whoops accidentally blew away activity log transmission to the FNE, fix that...; * add better concurrency protection to AffiliationLookup; fix issues when getting the granted source ID from a destination ID by properly ensuring the mapping table has an entry first; add srcId to the release grant callback (callback should never call AffiliationLookup gets as it can deadlock, so adding this parameter gives the source ID to the callback so that it doesn't have to do the lookup); * remove __spinlock() from touchGrant() and isGranted(); * correct bad ordering of log message for call source switching; * remove blockTrafficTo; implement promiscuous hub mode for FNE (this mode allows the FNE to pass any and all traffic transparently); * fix typo; * for the purposes of my OCD fix incorrect one-liner Doxygen documentation (its //!< and not just //!); * better document peer ID and rid ACL list files; * add backward for stacktrace support on crash; * fix FNE compilation when SSL is not available; make Win32 builds work again; * remove double error message; * generate stacktrace file if main logger file is not initialized or unavailable; * reduce the use of unordered_map::at(); * begin relabeling peer-link to peer replication/peer replica; * implement identity with qualifier, this makes logs (and only logs) easier to trace by uniquely identifying certain peer types, a peer qualifier is simply a symbol appended to the beginning of a resolved peer identity in the FNE logs (@ = SysView, + = External/Linked FNE, % = Replica FNE); silence the Call Source Switched log messages, we will only actually print these if the call source ID changes; fix missed Peer-Link log branding/naming; * lock m_status and m_statusPVCall before trying to update data elements; * don't drop out-of-order packets (this was a bad idea, instead log an issue, the real fix for this will be some sort of RTP jitter buffer); if the current packet sequence reaches the maximum allowed, roll over to 0; * update order of operations for peer ident; * normalize log messages; * differentiate a call end collision from a call collision; * differentiate a call grant collision from a call collision; * fix missing code commenting; * initial implementation of naive round-robin HA mechanism. this mechanism allows the FNE master to communicate to a peer connected to it, to announce alternate IPs for the peer to connect to if the primary configured FNE master becomes inaccessible. the HA mechanism requires peer replication to create a loose cluster of FNEs, each FNE in the cluster is configured with the external WAN IP and port for connection to the FNE, and these IPs are then disseminated to all FNE replicas (and downstream connected peers) in the cluster automatically; * hide debug messages unless debugging is enabled; * remove old call in progress global; refactor call collisions, allow the call collision timeout be user definable (with 0 disabling call collisions, user beware); * simplify sendmmsg implementation; * BUGFIX: correct scenario where traffic from an upstream master to a downstream peer FNE would lose the RTP sequence numbering; * refactor how RTP multiplexing by stream is handled; * fix some odd behavior with very fast calls locking up grants on on DVRS channels; * refactor RTP sequence count handling; * whoops this stream ID check was intended for non-promiscuous operation only; * fix memory leak with PacketBuffer::decode(), dont use a direct heap allocated buffer, instead use a unique_ptr buffer; * simplify implementation; * rename backtrace namespace to log_stacktrace, when using simple mode the namespace conflicts with a global function backtrace(); add package element for libdw-dev:arm64 for cross compile instructions; * whoops forgot to update BridgeMain.cpp for log_stacktrace; * lock the peer list when writing traffic data to prevent peer removal during traffic operations; * utilize a shared_timed_mutex for peer list locking on the FNE, this better keeps the peer list locked during traffic operations using lock counting vs the original spinlock mechanism; * better handling locking peer connections during critical state changes; * whoops this lock should only take place for a connected peer; * reflect higher requirements for FNE; fix issue on host where sometimes a stuck network call would cause network traffic to stop incorrectly hanging on the previous TG; * change around some naming; * typo; * [EXPERIMENTAL] implement rudimentary spanning tree mechanism to prevent peer looping; refactor how FNENetwork handled peer disconnect cleanups and consolidate into a singular routine; * [EXPERIMENTAL] enhance detection for case where FNE A and FNE B are cross-peered to each other (dont do this); * add REST API endpoint to fetch the master tree; * make sure master peer ID 0 doesnt ever happen; * log condition where masterPeerId is 0 * SysView peers announce themselves as an external FNE, but we do not consider them FNE peer links; * SysView masquarades its masterPeerId as itself; * instead of killing a peer connection instantly on a duplicate conn drop, increase retry time to 30 minutes and allow up to 3 duplicate conn failures before killing; * better handle duplicate connection disconnect NAKs; add REST API on FNE to force reset a upstream peer connection; * fix issue with purely ACL virtual FNEs not being able to replicate configuration further down the master tree; * deprecate the "external FNE" terming for upstream FNE connections and instead call them "neighbor FNE"; * more code cleanup, simplify naming; * cleanup code; refactor log messages from the FNE to better categorize them; correct issue where a peer reconnecting may trip tree duplicate conn checking; * enhance STP peer reconnect logic to allow peers announcing the same peerId and masterId to reconnect between spanning tree updates; * update log colorizer to match new logging categories in the FNE; * update log colorizer to match new logging categories in the FNE (round 2); * update log colorizer to match new logging categories in the FNE (round 3); * update log colorizer to match new logging categories in the FNE (round 4); * bump major version numbering in a preliminary fashion, at least until group talks about it are done (so this could be permenant); * fix messaging for fast peer reconnect (it was misleading as a RPTC NAK which it isnt); * allow reparenting of a STP node if it moves from one tree node to another; * implement tree cleanups if the downstream announcement removes child leaves or reports no children at all; * relabel MasterTree to SpanningTree proper; * whoops errant i++; * fix up some concurrency problems when dealing with parrot transmissions, due to migration of parrot playback into its own thread; * make sure to share lock peers while processing in maintainence loop; * add mutex locking around spanning tree updates; * simplify log levels, deprecate LogMessage log level in favor of just using LogInfoEx (message and info logs are basically the same thing); * better classify log messages; * simplify FNE configuration for peers, make identity a global applying to all peer connections, remove bogus frequency data; * better report global identity; * allow overriding the global identity for upstream connections; implement use of identity for spanning tree; * update config examples to reflect new log levels; * add back peer "name" field, this is strictly informational to make the config file easier on the brain; * Win32: bump version number for file resource metadata; * add documentation for packet payloads for: writeLogin, writeAuthorisation, writeConfig and writePing; * add some more packet payload documentation; * continue packet payload documenting; * minor comment alteration; * correct DMR data handling; refactor FNE DMR data calls to be structured more akin to P25 data calls; * use WASAPI by default on Windows; * better handle out of order blocks for PDUs; reduce packet retry to 2; correct handling ack response packets; * refactor how buffered UDP datagram queuing is performed; * relabel static class variables to use s_ and globals to use g_ * enhance colorize-host.sh to terminate color properly; * enhance colorize-host.sh to terminate color properly; * RTS PTT will only assert when audio is present. Add holdoff timer before removing RTS. (#103) * add option to enable/disable upstream call start/end event logging; * more work towards a working DLD-type OTAR service for P25; * fix typos; * Add carrier operated relay support to dvmbridge. (#104) * refactor KMMFrame to properly support message number and add framework to support MAC; refactor all derived KMM classes to properly determine KMM frame length and body offsets; change collision in class naming for KeyItem in the CryptoContainer and KeyItem in the p25::kmm namespace; cleanup magic numbers; add initial code for transmitting a rekey command; add KEK crypto wrapping testcase; * begin work on generating KMM CMAC for message authentication; * document sections of doc where a test originates test data; * begin work on generating CBC-MAC for message authentication; * minor cleanups; * test should be using generated key; * CBC-MAC now works properly; CMAC MAC generation works (just gotta fix CMAC MAC key generation); * complete CBC-MAC implemenation, at least for the provided samples from TIA-102.AACA-C this is now passing for the rekey example provided in section 14.3.4; anything compiling against libcommon.a while OpenSSL is enabled will require OpenSSL -lssl; fix delete vs free in various tests; * typo * implement OFB data encryption per TIA-102.AAAD-B; test proper final encrypted output for CBC-MAC check; implement use of cryptAES_PDU() in P25OTARService; * add experimental DES crypto; * move Git hash global defines out of Defines.h and into GitHash.h; * fix copyrights; * cleanup file headers containing lingering old comments; update fw/modem submodule; update fw/hotspot submodule; * remove debug trace not needed anymore; * add support for PDU auxiliary ES headers; * complete refactor of how P25 PDUs are assembled from user data and disassembled to user data; various corrections for data path nullptr reference issues; implement several tests for testing the P25 PDU assembler; * remove left over debug code; fix AMBT CRC-32 calculation error, AMBTs calculate the CRC-32 for the PDU themselves the Assembler does not need to do it; correct default value of p25TxNAC; * add some better error handling for NetRPC; * validate LC_CALL_TERM peer ID before allowing them to repeat, this fixes an issue where an errant peer on the network could spam LC_CALL_TERM to cause trunked nodes to terminate/kill a call in progress; * fix issue with dvmpatch not properly evaluating the destination TEK; * add support to patch to *disable* enc processing and allow frames to pass transparently; implement DES for bridge and patch; * reorganize application files, I've wanted to do this for a while JSON isn't really a network service, and REST API while it is a network service, I want to be in a separate namespace; * add multi-block PDU for V.24; * add some guard rails on PDU reception so we dont overflow ourselves; * it seems as if PDU_(UN)CONF_END is variable length, it will always be at least 1 block containing the last PDU block, and PDU_(UN)CONF_BLOCK_X is always 4 blocks; * cleanup dataBlocks pointer array; * preliminary code for sending PDU frames >3 blocks over V.24; * use unsigned numbers for these loops the values should never be negative anyway; * properly encode sequence opcode; * whoops missing parens; * initialize these unordered_maps to allow the max connection cap count number of entries (before it was zero and could result in many reallocations of these maps); * well that was a little naive of me, I didnt multiply the count by the size of the stored elements...; * reverse course lets do this more intelligently and implement the passthru for the reserve() function on the concurrency classes; * add STP check to see if a downstream leaf is blown itself away on the tree; * implement DMR data PDU assembler based on the P25 PDU assembler; * expand on the files related to an FNE instance for clarity; * add preliminary support for enabling peers with call priority, this will give those peers the ability to override any current call in progress; * implement a more solidified peer call priority mechanism using ICC; * bump WebSocketPP version to conform to new CMake minimum version; (#108) * fix typo; * add some documentation around newer protocol additions; * whoops typo; * start adding foundational work for future P25 Phase 2; * decomplicate foundational changes to RS coders for Phase 2; * added new peer config options to FNE REST api * add some locks around pkt maps in DiagNetwork; * better document the master peerId importance; * ensure buffers are set to nullptr after deleting to prevent double frees; * skip trying to transmit any buffer that is null; * add thread safties to SpanningTree; * correct bad memory allocation; * revert previous change to add locking to SpanningTree (this is handled externally in FNENetwork and DiagNetwork); fix issue in FNENetwork which could cause a STP deadlock; fix issue incorrectly labeling a peer as allowing call priority in the log when infact the peer was not configured that way; * make sure during resetPeer() we lock the connection; * readd SpanningTree internal locking mechanisms; * make sure pointers are set to null after delete; * ensure when a FNE loses all its downstream leaves, that it will properly notify upstream FNEs; fix issue where dangling tree nodes were being incorrectly left in the flat peer node list for the spanning tree; * fix defaultNetIdleTalkgroup being treated as a hex value instead of dec; enhance P25 defaultNetIdleTalkgroup slightly to better pass traffic after RF traffic; enhance P25 defaultNetIdleTalkgroup to pass traffic if there are affiliations to the group; * how about we dont blatently leave debug messages enabled...; * BUGFIX: hopefully correct crash condition when trying to erase child nodes; * followup for last commit, simplify implementation; * this will be unpopular, but I am deprecating support for cross-compiling for armhf/legacy RPi, maintaining this is already causing problems with OpenSSL and will ultimately handcuff us in the future if we upgrade C++ versions because the legacy toolchain uses GCC 4.9; * remove deprecated patch; * update README.md; * correct some cross-compile shennigans for OpenSSL; * correct some cross-compile shennigans for aarch64; * BUGFIX: fix issue where the host would incorrectly reset the voice stream ID during a call; * match code change from previous bugfix to DMR and NXDN; * dont use the deprecated OpenSSL1.1 functions, use portable AESCrypto functions instead for low-level AES crypto; * disable STP reparenting when deserializing children of a tree; * BUGFIX: fix tged and peered in the case where an empty file or file with no entries is provided for editing; * BUGFIX: add some validation checks around deserialization reparenting; * implement P25P2 reed-solomon codes for future use; * BUGFIX: correct bad check for parrot frames end of call; --------- Co-authored-by: Lorenzo L. Romero <lorenzolrom@gmail.com> Co-authored-by: Natalie <jelimoore@gmail.com> Co-authored-by: W3AXL <29879554+W3AXL@users.noreply.github.com> |
2 months ago |
|
|
738ee918d1
|
R04H31 Merge to Master (#89)
* simplify and refactor peer-link packet handling; * bump version number to match dev branch; alter logging for peer-link data; * warn on packets generated over 4K; * don't clear map directly, use clear() helper; * use parens vs braces for initializers; correct case fall-thru on SysView; * for clarity relabel RPT_CLOSING and MST_CLOSING to RPT_DISC and MST_DISC; * discontinue support for TRANSFER command on the traffic port entirely; hide useAlternatePortForDiagnostics and allowActivityTransfer options in FNE configuration; add stern warnings and alerts if the FNE disabled either useAlternatePortForDiagnostics or allowActivityTransfer (these are really critical operations); alert in peer log if the master does not report support for the alternate port for diagnostics; * make oversized packet warning clearer (this warning is not a end-user warning, the user can't do antyhing about this this is a developer BUGBUG warning); * apply recv timeout on InfluxDB operations (this hopefully will prevent stuck queries if the InfluxDB server dies while query is in progress); * prevent InfluxDB query from becoming stuck in a tight infinite loop within select(); * don't bother handling responses from the influx query, remove fluxQL (we don't make queries with this library); * cleanup unused vars; * generate an error log if a fluxql worker fails to write data to influx; * implement support to save/retain configuration pushed from peer link connections; * fix memory leak caused by not deleting unused packetbuffer; * refactor ACL updates; * refactor log messages for channels to be <channel ID>-<channel No> in most cases where applicable; * add more <channel ID>-<channel No> changes; * whoops wrong variable type; * correct fatal bug where update lookup timer was never started; * check the RF state at the bottom of a talkgroup hang expiration timer for RF talkgroup activity, if the state is not listening, handle the end of call as if it was a frame loss; * fix potential memory leak in PacketBuffer fragmenter, the encoder was not deleting the storage buffer before end of scope; * ensure decompressed buffer is deleted; * ensure decompressed buffer is deleted in error conditions too; * add support to disable adjacent site broadcast; * lay the groundwork for explicit channel configuration; * [EXPERIMENTAL] implement experimental support for a CC to define explicit channel identity information for voice channels (NOTE: this does *NOT* implement support for hotspots to operate in explicit channel mode!); * don't use the concurrent::unordered_map for this (this gives me great pause for a problem...); * add some extra debug trace; * add some extra debug trace; * display MI data during calibration; update modem submodule; * this is ugly, and I hate it, but to fix very strange WIN32 deadlock situations, we'll selectively use our concurrent unordered_map on non-WIN32, and on WIN32 use the std unordered_map + a local mutex; * update modem submodule; change P25 Voice MI logging messages from DEBUG to MESSAGE; fix issue in HostSetup/HostCal where PDU header decoding was broken; * only dump MI data if the call is encrypted (don't bother displaying zeros for a clear call); * whoops check right variable; * cleanup and clarify MI logging; * cleanup and clarify MI logging (again LDU2 was out of log sequence); * hate me later, dont use a colon as the string separator for the MI bytes, use equals; * log DMR PI MI dta; * refactor debug messaging for HDU; * reorganize core meta-programming macros, move class property macros into ClassProperties.h, move bit manipulation into BitManipulation.h, move VLA into VariableLengthArray.h; rename meta-programming macros for clarity most of these macros declare some sort of variable and/or functions, as such I'm dropping the notation for __BLAHBLAH and using DECLARE_BLAHBLAH instead; better document class property meta-programming macros; refactor __GET/__SET_UINT16 into __GET/__SET_UINT24 these macros set 24-bit values from and to buffers, this will reduce programming confusion; * add property documentation for some KMM classes; * correct file copyright headers; * change commenting to reflect section more clearly; * use proper GPL license for file; * detect arch and properly update internal variable; * handle instance where the system does not return a valid processor type for arch detection; * display target arch along side host arch if we're cross compiling; * strip newlines; * fix missing parens around response encoding; |
9 months ago |
|
|
af2e7c9c8d
|
R04H30 Merge to Master (#88)
* implement support for LC_GROUP_UPDT (this includes the RPC between the CC and VC's to announce active TG lists); completely and entirely refactor how packet handling threads are done, use a new method introduced for this, thread pool resources. this will ultimately be more resource consuming depending on configuration as the worker threads for packet processing stay alive along side the main process. this should be more performant (because we're not constantly creating and destroying threads) and will prevent error conditions that can cause an extreme number of threads to spawn; * reduce influx and V.24 thread pool sizes; add calculation of how long between when a packet was Rx to when it began proper processing; * don't use void* for the task routines; * rename ThreadPoolCallback to ThreadPoolTask; add some checking around task validness; correct a valgrind issue with RawFrameQueue() write not deleting the buffer before return; * valgrind cleanups; * gate active TG from CC to VC updates at 5s (prevent API spam); * update package version; * don't attempt to send active TG updates to 0.0.0.0; * make notification of active TGs CC -> VC optional; * correct ThreadPool issue on Win32; split UDP PCM audio processing into its own thread; implement user control of inter-audio frame delay and jitter buffer (if using inter-audio frame delay); * lock queue; * add custom classes for STL containers that support mutex locking for thread safe operation; modify ChannelLookup and AffiliationLookup to use concurrent containers; modify FNE to use concurrent containers for internal lists; * remove mutex used for protecting udp packet deque; * more concurrency solidification; * further concurrency class usage; bump version number to R04H30; * add --boot commandline argument to reboot modem into bootloader without any interactive interface; * cleanup program -h usage display; * incorrect opcode define; * update README.md; * correct incorrect string format for non-useAlternatePortForDiagnostics; * update README.md; * simplify influxdb worker task function; * refactor PL_ACT_PEER_LIST opcode entirely, use zlib and compress list sent and properly block data sent; * don't waste cycles on building the peer list repeatedly, build it once for the cycle; * deduplicate compress/decompress code into a static C++ class; * stylecop file formatting; * add table locking and remove at find; * deduplicate implementation; * cleanup unused label; change FrameQueue's unordered_map to a concurrent one; fix incorrect setting of __lock() for concurrent containers; * add more timestream map locking; * fix incorrect behavior when deriving initial timestamp for a call stream; correct incorrect behavior inserting new stream in to timestamps table for frame queue; fix incorrect behavior deriving timestamp for bridge RTP; * fix issue with naive approach to handling PL_ACT_PEER_LIST data fragementation; * disable accidental debug code; * instead of asserting, throw a log error message and discard network packet; * lock the talkgroup tables when a find is in progress (this will prevent some weird concurrency behaviors because talkgroup rules does not use the concurrent vector); * if filter headers or terminators is enabled, and the target peer is in the exclusion list, do not send headers or terminators; * exclusion check should happen before the rewrite check; * implement dvmpatch, this is a new utility that allows simple TG to TG patching; * ensure FNE downstream peers that report as peer link have implicit always rules applied to them (i.e. they will *always* receive *all* traffic); correct order of operations when deleting a peer entry (delete connection *AFTER* removing from peers table); * document concern over possible null ref concurrency issue; * don't be overly aggressive with FNE process niceness, nice of -10 is more then sufficient; |
9 months ago |
|
|
b86a5ce939 |
add some mutex locking around modification of the channel lookup table;
|
11 months ago |
|
|
3da4eb2d40
|
REST -> RPC Migration (#84)
* migrate away from REST API for inter-dvmhost operations towards a custom UDP RPC framework; * replace config parameters for REST API in some places with properly named RPC; swap peer Network, FNE DiagNetwork and FNENetwork over from if-else-if ladders to switch statements (switch statements perform logically better after compilation because the compiler tends to optimize these into jump-tables which execute faster); * continued work on inter-dvmhost REST to RPC transition; * update build bumper for R04G20 to R04G21; * cleanup config file; * clean up doc/commenting; |
11 months ago |
|
|
cb335cffed |
add some exception checking around some cases where vector types are used;
|
11 months ago |
|
|
10e1e12be0 |
add doxygen configuration for dvmhost project; add doxygen output directory; convert common static library to use doxygen style commenting and documentation;
|
2 years ago |
|
|
e0b6da51fb |
make the network presence announcment (VC -> CC and CC -> FNE) timing configurable (this value is in seconds); refactor RF channel enumeration, RF channels are now enumerated in their own class ChannelLookup instead of being integrated into AffiliationLookup, this allows the flexibility to update and change channel information at runtime; add support for VC -> CC presence/registration to tell the CC what the REST information is for that VC, this makes the restAddress and restPort entries for the voiceChNo list in the config.yml optional, the only mandatory fields are channelId, channelNo and restPassword;
|
2 years ago |