Commit Graph

136 Commits

Author SHA1 Message Date
Heikki Hannikainen 46b6947f1e accounting: Optimize CPU use of tx/rx accounting counters
TX counters are updated much more often than RX counters. No need
to bump RX counters for every outgoing packet, and no need
to bump TX counters for every incoming packet. Split them out.
2022-10-31 19:04:01 +02:00
Frederick F. Kautz IV 04fd9e4d5d Remove unused variable in incoming.c 2017-02-27 20:48:55 -08:00
Heikki Hannikainen 601a9fae87 incoming: Add return value checks for pthread mutex locks 2016-08-15 20:06:23 +03:00
Heikki Hannikainen 9f71a9680e incoming/worker: New error code q_disallow_protocol for invalid Q protocol IDs 2016-07-26 15:36:23 +03:00
Heikki Hannikainen 116f75eb1b incoming: If running out of pbufs, drop incoming packets, don't abort(). 2016-06-01 23:56:59 +03:00
Heikki Hannikainen 8875cfb8fd New config option DisallowLoginCall to reject logins by glob match 2015-09-06 11:51:36 +03:00
Heikki Hannikainen 890b3c0497 New DisallowSourceCall config option to drop packets from additional source callsigns (glob match) 2015-09-06 10:44:59 +03:00
Heikki Hannikainen 95a7c57442 Drop packets from N0CALL* and NOCALL* with any suffix/SSID, not just without SSID 2015-09-06 08:39:06 +03:00
Heikki Hannikainen b32e3f990c Store client's coordinates from parsed client-originated packets in client_t, for m/ filters with unverified clients 2015-08-31 08:24:42 +03:00
Heikki Hannikainen a18e760201 Disallow a set of message destinations, old status messages sent by old aprsds.
Matches javaprssrvr functionality now.
"javaMSG", /* old aprsd */
"JAVATITLE", /* old aprsd */
"JAVATITL2", /* old aprsd */
"USERLIST", /* old aprsd */
"KIPSS", /* APRS+SA */
2013-12-20 08:36:35 +02:00
Heikki Hannikainen 4709b68cf4 Remove unused string arrays 2013-12-19 23:25:17 +02:00
Heikki Hannikainen f08cee43bc Drop DX packets (DX de ...) 2013-12-19 22:51:38 +02:00
Heikki Hannikainen cf6f6e2ed7 Drop packets having source callsign of N0CALL, NOCALL, or SERVER
* NOCALLs being a default on many TNCs and software
* potentially blocks a message loop between SERVERs
2013-12-19 08:32:15 +02:00
Heikki Hannikainen b62d29b908 incoming parsing: slight optimisation 2013-12-19 08:22:26 +02:00
Heikki Hannikainen 35daaf7df7 incoming parsing: Use memmem instead of our own memstr 2013-04-19 20:46:21 +03:00
Heikki Hannikainen ca13794f61 incoming srccall check: relax SSID length requirement a bit to match javap3 for now 2013-04-18 23:05:25 +03:00
Heikki Hannikainen 1c5106925b Allow -0 SSID in srccall (and dstcall), to match javaprssrvr 2013-04-10 08:13:24 +03:00
Heikki Hannikainen fca8f208e9 Drop incoming packets with -0 SSIDs in callsigns. Speedup in callsign
checking (array reference instead of pointer math and referencing) and
stricter callsign syntax checks.
2013-04-09 18:33:12 +03:00
Heikki Hannikainen 203925785f Improved quirks mode: Clean up spaces in end of path elements 2013-03-01 16:55:10 +02:00
Heikki Hannikainen 4c6dcd6f21 quirks mode: Trim spaces from the end of srccall 2013-02-26 17:36:09 +02:00
Heikki Hannikainen 5173a3fc06 Fix issue 20: Escape unprintable characters when logging packets 2013-02-19 18:02:49 +02:00
Heikki Hannikainen 824409c170 Fixed 3rd party TCPIP/TCPXX path packet drop to articulate
drop reasoning better (gated TCPIP>RF>TCPIP)
2013-02-07 11:16:16 +02:00
Heikki Hannikainen d6087a259e Really drop invalid 3rd-party packets (and test it right) 2013-02-05 22:46:16 +02:00
Heikki Hannikainen e1418c9d54 path parsing: less debug log 2013-02-05 13:38:19 +02:00
Heikki Hannikainen ef56b7431f Parse most data out of 3rd-party packets, add tests.
Validate calls in path after Q construct.
2013-02-05 13:28:22 +02:00
Heikki Hannikainen fa30dc6fb1 Messaging: Accept any packet as message routing hint for filtered ports,
not just position packets.
2012-11-20 22:08:09 +02:00
Heikki Hannikainen 9575119bc3 reduce debug logging 2012-11-20 08:35:10 +02:00
Heikki Hannikainen a454f2332f Use eventfd() on Linux to wake up dupecheck when packets are available 2012-11-16 18:23:42 +02:00
Heikki Hannikainen 2c07863b25 Account TCPXX unverified packets separately (disallow_unverified_path) 2012-11-12 22:57:13 +02:00
Heikki Hannikainen 45d807d20f Implemented "quirks mode" for buggy unmaintained blacklisted clients.
Initially contains only HR-IXPWIND / Haute Networks HauteWIND.
It transmits LF NUL for line termination instead of CR LF. Enabled
quirks mode for the client, and made it strip spaces and NULs
from beginning of packets.
2012-11-12 22:17:12 +02:00
Heikki Hannikainen 0e7ea413b3 Q construct drops: Account them separately for better drop reason reporting 2012-11-01 01:08:07 +02:00
Heikki Hannikainen 2e6fe52daf dupecheck/acconting/web: Count duplicate packets per client and listener 2012-10-29 20:34:25 +02:00
Heikki Hannikainen b554e09319 incoming: Only drop 3rd-party packets with TCPIP/TCPXX in second path 2012-10-21 14:56:52 +03:00
Heikki Hannikainen faea0af01b Disallow unverified packets with TCPXX in path or qAX q construct 2012-10-19 22:16:06 +03:00
Heikki Hannikainen e373494030 status/munin: rename 3rd_party to party_3rd to fix munin graphs
with new munin, it didn't appreciate RPN math with a label
starting with a number
2012-10-09 20:57:10 +03:00
Heikki Hannikainen 1968dc4b38 Improve validation for srccall/dstcall/path/q construct
* separate src/dstcall check function
* check lenghts of callsigns
* allow '*' after callsign only in digipeater elements
* allow hex IPv6 address after Q construct (only)
2012-10-08 23:01:23 +03:00
Heikki Hannikainen bf8371f97f check_invalid_path_callsign: use CALLSIGNLEN_MAX (9), not 12 2012-10-08 10:38:18 +03:00
Heikki Hannikainen eef48259ce incoming: validate all callsigns in digi path to not contain junk,
allow alphanumeric, '-', and '*' only in the end.
(test case updated, in 11misc-drops.t)
2012-10-08 10:11:49 +03:00
Heikki Hannikainen 32c3b4443e incoming: Validate source and destination callsigns better
by checking for invalid control characters, not just length
(using the common "valid Q construct entry" check)
2012-10-08 09:27:56 +03:00
Heikki Hannikainen 3d5e849b69 incoming #filter commands: make the filter keyword case insensitive
like it is in javaprssrvr. Test case update included.
2012-10-05 00:59:13 +03:00
Heikki Hannikainen b94077ccf3 Fix server to drop all packets from unverified clients.
Not just packets with srccall != login.
Also made disallow_unverified to not be configurable (it
defaulted to being enabled already, but there is no reason
to disable it on aprs-is any more). Very slight optimisation
aspect, too.
2012-10-05 00:25:58 +03:00
Heikki Hannikainen 3fc9f2f4cb incoming: fix packet buffer leak in case of some dropped packets 2012-10-01 19:03:37 +03:00
Heikki Hannikainen ca96f895e0 Drop general queries (?APRS?), since they cause reply floods.
Commit includes test case within the misc-drops test.
2012-10-01 00:12:28 +03:00
Heikki Hannikainen 8d57b7d901 Web: Implemented a popup to show RX packet error classifications
with nice description strings.
Added some comments in the C source code, too.
2012-09-30 13:57:23 +03:00
Heikki Hannikainen 1600362afc incoming: add some comments 2012-09-21 01:40:04 +03:00
Heikki Hannikainen 51e84d8f90 incoming: If a packet grows too big (> 512 bytes) after
inserting new Q construct, count it as too long packet, not
as out-of-memory.
2012-09-20 23:32:42 +03:00
Heikki Hannikainen f8b1164e39 Removed unused incoming_count counter, which was being incremented
unatomically from the worker threads.
2012-09-20 23:00:54 +03:00
Heikki Hannikainen db74c63c00 Added comments in incoming.c 2012-09-20 22:47:22 +03:00
Heikki Hannikainen 7893cdcfb1 Collect dropped input packet reason code counters for clients,
listeners and protocols, and put the counter arrays in the status
JSON.


git-svn-id: http://repo.ham.fi/svn/aprsc/trunk@858 3ce903b1-3385-4e86-93cd-f9a4a239f7ac
2012-09-15 07:56:29 +00:00
Heikki Hannikainen f193f284df incoming packet parser error processing: use defines for error codes
git-svn-id: http://repo.ham.fi/svn/aprsc/trunk@857 3ce903b1-3385-4e86-93cd-f9a4a239f7ac
2012-09-14 11:59:39 +00:00