Bryan Biedenkapp
7840f6ebe8
cleanup some log messaging for the peer lookup table handler;
2 years ago
Bryan Biedenkapp
f4c85e822e
minor fix up for PR#56 (nothing I wanted to prevent merging 56);
2 years ago
firealarmss
bd3e737adf
REST Additions and added NAK reasons ( #56 )
...
* Initial work for a peer whitelist/blacklist
* Remove forgotten debug log
* Remove extra line
* Use a dedicated file for white/blacklists
* Add support to REST for managing the peer white/blacklist
* Fix line spaces
* Move to one example file
* Add support for disconnecting a peer via the REST API; Add NAK reason for a peer ACL violation and for a peer reset; Add a REST endpoint for getting the current mode of peer ACL
2 years ago
Bryan Biedenkapp
12e07a2205
cleanup log output for uniformity; set peer ACL to disabled by default (it is up to the FNE administrator to properly configure and enable this, it should not be enabled by default);
2 years ago
firealarmss
cba48ae54a
Add support for peer blacklist and whitelist ( #55 )
...
* Initial work for a peer whitelist/blacklist
* Remove forgotten debug log
* Remove extra line
* Use a dedicated file for white/blacklists
* Add support to REST for managing the peer white/blacklist
* Fix line spaces
* Move to one example file
2 years ago
Bryan Biedenkapp
3335f7be39
add support to reload TG and RID lists via REST API for the FNE;
2 years ago
Bryan Biedenkapp
1de86458a6
fix DVRS unit deregistration issue (units weren't registered properly during GRP_AFF because DVRS doesn't do the typical U_REG); implement 12-hour timeout for unit registrations (this is only applied if the SU in question has *NOT* had *ANY* activity within 12 hours);
2 years ago
Bryan Biedenkapp
0251944438
fix ability to set MFID via REST before issuing P25 commands; implement MBT for GRP_AFF_Q_RSP;
2 years ago
Bryan Biedenkapp
01b92641fd
run the loop watchdog timer properly during CW;
2 years ago
Bryan Biedenkapp
f60ac33a34
add log messages for always being used;
2 years ago
Bryan Biedenkapp
c8eb52a57d
add try {} catch {} around some critical ASIO read calls to prevent application crash (this won't resolve the errors but should prevent application crash); implement support for peer ID list that *always* receives traffic for a TGID regardless of affiliation rules;
2 years ago
Bryan Biedenkapp
6425ec5cd7
add support to properly filter traffic headers and terminators; add support to selectivly block U2U (private) calls from peers;
2 years ago
Bryan Biedenkapp
70600d3fd7
remove deprecated options; ensure we check if a peer is enabled on the FNE before attempting to read/write to it; silence BUGBUG UDP write message;
2 years ago
Bryan Biedenkapp
ce9534b81f
correct a check that determines whether a CC stream should be generated; correct some misleading log messages;
2 years ago
Bryan Biedenkapp
9b6fcdbdf7
fix incorrect assembly of DENY TSDUs for certain services; replace QUEUE TSDUs for grant TSDUs with DENY TSDUs;
2 years ago
Bryan Biedenkapp
864044ff8b
replace sprintf with snprintf;
2 years ago
Bryan Biedenkapp
258feb0173
put the naughty message in the right spot;
2 years ago
Bryan Biedenkapp
942a53069b
add support to gate GRP_VCH_GRANT messages from going to peers with no affiliations for a TG (if the TG is configured for affiliated only);
2 years ago
Bryan Biedenkapp
afa47f4b58
fix bonehead mistake not cleaning up arrays before reallocating them;
2 years ago
Bryan Biedenkapp
a7f9cb93be
fix issue handling $F7E NAC; implement $F7F NAC support;
2 years ago
Bryan Biedenkapp
ae3a03b521
fix LC_GROUP_UPDT using duplicated data;
2 years ago
Bryan Biedenkapp
9b828fe7a4
ensure the lookup table thread is named; don't display the not transmitting CC messages unless the test timer is not paused; add aggressive watchdog logging for when timers exceed 1s intervals; split adj. site and affiliation updating into a separate thread (huge adj. site updates could be the cause of main loop processing delays); ensure threads are properly shutdown; increase P25 adj site update timer from 30 seconds to 60 seconds (5 minutes of no updates will now FAIL an adj. site);
2 years ago
Bryan Biedenkapp
36099367c8
fix condition where the Log and ActivityLog would overflow the character buffer by no properly calculating the length of the va_args string (this should resolve buffer overflow terminations on GCC 13+);
2 years ago
Bryan Biedenkapp
0ad47a1989
be a little less obtuse about the NAK reason in the FNE log;
2 years ago
Bryan Biedenkapp
cbb0af42ba
fix some minor DVRS/conventional weirdness;
2 years ago
Bryan Biedenkapp
a7e727a7ec
ensure we don't end up with badness;
2 years ago
Bryan Biedenkapp
01af69a954
make sure the data length for P25 is twice the PDU length; add support to log if a dedicated CC stops transmitting from the host perspective (the logic for this is: is host in appropriate digital mode for CC, is the modem reporting no Tx, has the modem reported its status initially, and is the CC in a running state);
2 years ago
Bryan Biedenkapp
a1a0065a74
when logging what the peer reports as identity use 8 character padding;
2 years ago
Bryan Biedenkapp
1cdd2aa56d
normalize log formatting better;
2 years ago
Bryan Biedenkapp
9cfde0e57e
report peer identity string in influx data; make sure non-alternate port reporting properly reports peer identity;
2 years ago
Bryan Biedenkapp
e57541c135
it would help if this was a string...;
2 years ago
Bryan Biedenkapp
b1e0058986
whoops handle boolean with yes/no output response instead of 0/1;
2 years ago
Bryan Biedenkapp
bcd2cf21e7
add support to report the textual identity in the logs for a peer along with its peer ID in most cases;
2 years ago
Bryan Biedenkapp
75dbc9e025
refactor parrot frame storage; add support to allow parrot responses to go only to the peer for which the parrot call originated;
2 years ago
Bryan Biedenkapp
e4aca9fc4f
don't register a CC with itself; be more clear in the config YAML that the controlChannel block should be left at defaults for dedicated control channels;
2 years ago
Bryan Biedenkapp
c249ee5803
fix offset issue for network generated TSDUs;
2 years ago
Bryan Biedenkapp
5650db1657
for LDU LC's pass thru any non-standard MFIDs without any further processing as-is;
2 years ago
Bryan Biedenkapp
c7b0fc3a9d
add support to encode a GRP_AFF_RSP as an AMBT (this is just the data serialization part and not the actual business logic in the host);
2 years ago
W3AXL
d980da74be
small fix to make preferred sites work via REST
2 years ago
Bryan Biedenkapp
41044d2271
fix a potential situation where we may get a length stuck on the queue (this shouldn't happen but, this is protection logic to ensure it never happens);
2 years ago
Bryan Biedenkapp
24082b9652
P25 data ( #52 )
...
NOTE: this does not indicate full P25 data support as working yet; this commit refactors a lot of the baseline PDU handling code, and better handles both confirmed and unconfirmed PDU data blocks, there is still some more work to do, I just didn't want p25_data to start getting overly out of sync with master.
* rework modem protocol to support variable length frames up to 64k; refactor P25 PDU handling to support TIA-102 minimum 512 byte frames;
* fix PDU length its 512 bytes not 500; ignore instead of report invalid modem frames; add double length checking to HostSetup;
* add support to send P25 long frames to the modem;
* adjust FIFO size to 522 (fits a single PDU frame); remove extra debug displays; match fixed FIFO sizes between modem and host;
* correct weird inverted CRC-9 that sometimes happen;
* ensure netPDU is reset at the beginning of a network data call; fix lengh used by data block dumping;
* fix some buffer lengths;
2 years ago
Bryan Biedenkapp
cf2469a2aa
revert previous change to ControlSignaling that pulled wrong commit from p25_data branch;
2 years ago
Bryan Biedenkapp
137dfbe918
use site data sysId for U_REG_RSP for a successful AUTH_RESP;
2 years ago
Bryan Biedenkapp
be7230d68d
used incorrect variables to set the WACN and system ID for the auth demand OSP (thanks max);
2 years ago
Bryan Biedenkapp
7e3e006fd1
fix comment typo;
2 years ago
Bryan Biedenkapp
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
Bryan Biedenkapp
f5a5d83f4b
fix potential issue with full group affiliation update;
2 years ago
Bryan Biedenkapp
0f7eabff82
implement support for peers that identify themselves as "conventional" to ignore affiliated talkgroup rules and be able to receive all traffic if the FNE is configured to allow promiscuous operation; implement extremely preliminary support to allow a CC to claim a VC peer, allowing for appropriate grouping of peers for trunked sites;
2 years ago
Bryan Biedenkapp
6d738432e2
fix missing break for AUTH_RESP case;
2 years ago
Bryan Biedenkapp
f8aa80a63f
continued work on P25 PDU handling (this has a long way to go...);
2 years ago
Bryan Biedenkapp
c99efa1f14
fix issue with bad offsets for AUTH_RESP data (this happened back in Decemeber when the payload array layout was altered);
2 years ago
Bryan Biedenkapp
424c7fa35a
fix missed nullptr checks for if networking is disabled;
2 years ago
Bryan Biedenkapp
7cc2b99000
pass VSELP1/2 frames (this is experimental, in my tests doesn't break anything else, but it could), this will also pass VSELP1/2 frames to the network core but the host doesn't currently carry code to retransmit network VSELP frames over the air [yet];
2 years ago
Bryan Biedenkapp
574ede103e
update hotspot and modem fw submodules;
2 years ago
Bryan Biedenkapp
17fae1d461
fix issue where the timeout timer wasn't running for the network which would never cause the connection to reset after a number of error attempts trying to login to the master;
2 years ago
Bryan Biedenkapp
d5ef9a0cb5
little bit of P25 data work (nothing amazing here yet);
2 years ago
Bryan Biedenkapp
9055e3aaa8
update copyrights;
2 years ago
Bryan Biedenkapp
4d776f6314
add support for DMR T3 adjacent site broadcast;
2 years ago
Bryan Biedenkapp
3d752bc363
add preferred peer ID lists to the REST API;
2 years ago
Bryan Biedenkapp
096efcef1a
ignore affiliation checks for ISSI-type peers, they are excluded from affiliation rule checking;
2 years ago
Bryan Biedenkapp
94da264f55
better handle checking if a peer affiliation table has become invalid (null); better handle cleanup and creation of peer affiliation tables;
2 years ago
Bryan Biedenkapp
690bac453d
remove clearBeforeWrite function argument for a lot of control singalling (and some data) cases, this was an old method of clearing the Tx packet queue before creating a frame to ensure it went out really fast, but shouldn't be done anymore, so I'm removing this so no one gets any bright ideas;
2 years ago
Bryan Biedenkapp
b19c1d5f6a
add support for processing CSBK on the FNE; add support to optionally log TSBK and CSBK network events to InfluxDB;
2 years ago
Bryan Biedenkapp
f603949879
make common strings #defines instead of copy and pasted static text;
2 years ago
Bryan Biedenkapp
1341690653
add call error (failed validation) events to InfluxDB logging;
2 years ago
Bryan Biedenkapp
96a9ba1c03
implement trunking site preference support for TGIDs, this implements a feature by which TGIDs can be gated to allow affiliation to preferred sites, all other non-preferred sites will DENY affiliation causing the radio to attempt to roam to another site (this is a trunking only feature and does not change conventional operation);
2 years ago
Bryan Biedenkapp
7d1af0235b
implement support for reporting activity, diagnostic and call events to an InfluxDB instance;
2 years ago
Bryan Biedenkapp
a8adeeaad7
implement missing parrot delay timer; fix bad implementation where parrot frames were only played if network packets were received (this logic changed when threaded network Rx was implemented);
2 years ago
Bryan Biedenkapp
1ef806fef1
handle edge-case scenario of RTP packet sequence overrun;
2 years ago
Bryan Biedenkapp
856fa98357
make the REST response wait time variable; use a quick response time of 150ms when using REST API during real-time OTA packet processing; add extra logging messages for UDP;
2 years ago
Bryan Biedenkapp
1632019650
port and implement /dmr/rid and /p25/rid REST APIs on the CFNE;
2 years ago
W3AXL
9675f42db5
added ability to save RID/TGID lookups from the FNE to local files
2 years ago
W3AXL
b75389cd47
simple fix for RID list updates, verified on list sizes of 49, 50, 51, 99, 100, and 101
2 years ago
W3AXL
01bd534c8f
fixed RID alias updates not working via REST
2 years ago
Bryan Biedenkapp
5571a71e4e
replace manual lock/unlock with lock_guard to ensure a lock is held in a scope, and released when a scope is closed;
2 years ago
Bryan Biedenkapp
b7c6282767
fix for possible race condition (that shouldn't have happened in the first place), if writeMaster is being used in queueOnly = false, do an immediate network socket write without attempting to enqueue a message;
2 years ago
Bryan Biedenkapp
86d736b0bb
revert change from 0ea6ee0 that changed the RingBuffer const char* to std::string to correct issue where the RingBuffer name is being copied incorrectly; change method for copying name std::string passed to AffiliationLookup; remove accidentally committed debug code;
2 years ago
Bryan Biedenkapp
f000639c7f
ensure m_forceHotspot is initialized to a sane default;
2 years ago
Bryan Biedenkapp
e2514c1f8f
mild include reorg;
2 years ago
Bryan Biedenkapp
31ca17449d
*BEWARE* this commit alters the RPI_ARM cross-compiler and may break things *BEWARE*; implement support for HTTPS SSL REST API configuration; add contrib binary overlay for the RPI_ARM compiler (to add libssl-dev dependences);
2 years ago
Bryan Biedenkapp
cda6b5965f
add support for optional TCP SSL/TLS sockets;
2 years ago
Bryan Biedenkapp
b4f9b2d201
fix some issues with the "unsupported no no mode" that people continue to abuse; correct issue with calculating list offsets when announcing RID lists to the host;
2 years ago
Bryan Biedenkapp
17d69cb950
add support to disable *ALL* passing of P25 ADJ_STS_BCAST from a CFNE instance; properly implement processing of TSDU messages from any peer; implement login flag from CFNEs to identify themselves as external when they are peering;
2 years ago
Bryan Biedenkapp
ecdce85e8a
clean up file;
2 years ago
Bryan Biedenkapp
9dadc06130
I was asked for ASCII art, and I deliver, thus, ASCII art;
2 years ago
Bryan Biedenkapp
c3f9b69454
catch and log certain situations where a buffer in a buffer vector may be released (this is likely due to a non-tread safe network flush); expose size of inclusion, exclusion and rewrite lists so we don't need to copy them to know the size;
2 years ago
Bryan Biedenkapp
ba785f3d91
hide debug here (m_debug/m_verbose should be adhered to in classes as they *optionally* enable debug trace for modules, allowing the LogLevel to be set to 1 and not spam the log/console with unintended debug statements); alter bad handling of a compiler constant string for the Server/User-Agent strings;
2 years ago
Bryan Biedenkapp
1e8a842a30
document functions in the Thread class; add a helper detach() method for future use;
2 years ago
Bryan Biedenkapp
4acb60aeff
add more plumbing to the CFNE for future use;
2 years ago
Bryan Biedenkapp
e7ce1d1f20
report errno errors from pthread_create;
2 years ago
Bryan Biedenkapp
92a5bbd580
treat threadedNetworkRx and threadedACLUpdate with pthread_detach and ensure they will not retain resources waiting for a pthread_join that'll never happen;
2 years ago
Bryan Biedenkapp
d38e8d00da
remove accidental debug code left in last commit;
2 years ago
Bryan Biedenkapp
c4ca72581f
for performance reasons on very noisy/busy setups that may have *lots* of peers, use of an alternate port to service diagnostic and activity log transfers helps ensure the traffic port doesn't become overloaded with data;
2 years ago
Bryan Biedenkapp
8ca4ed5a40
implement a few more CFNE NAK types to notify the peer of invalid conditions; take first steps towards FNE-side authoritative grants by implementing some logic plumbing;
2 years ago
Bryan Biedenkapp
b7ebfa43e4
reorganize source code slightly, we shouldn't define logic in the CPP files for the talkgroup rules data classes, and instead we should define the logic in the header (since logic for these data classes shouldn't be anything complicated anyway);
2 years ago
Patrick W3AXL
d8eff1f1f4
got tgid editing via REST mostly working ( #49 )
2 years ago
Bryan Biedenkapp
5d6c99da43
add missing mutex unlocks for the lookup tables (I'm not sure how this hasn't caused a problem); reorganize the code in FNENetwork and make threadedNetworkRx private; add some counting logic to ensure the voice tag classes flush voice frames every 5 peers to ensure timely delivery of packets;
2 years ago
Bryan Biedenkapp
e348b15d7f
for the purpose of performance handle incoming packets in their own threads (NOTE: this commit is *experimental* and may burn your house down and kick your dog, and it most certainly has a memory leak I'm working on somewhere);
2 years ago
Bryan Biedenkapp
c6c1c72f79
institute a hard 250 peer cap on the CFNE for performance, stability and call quality reasons; implement support for the user to configure the connection limit on a CFNE; implement support to resolve a master NAK to a reason on the host;
2 years ago
Bryan Biedenkapp
b28c685ee3
add missing documentation; properly annotate time value; add missing thread join wait;
2 years ago