Heikki Hannikainen
c11122c2b0
no_tx: Do not send packets to broken TX igates.
...
Blacklist an igate software implementation which does not use the 3rd party
packet format when forwarding packets from APRS-IS to RF. It causes loops
and confuses all other igates around to think that all those stations on
APRS-IS are reachable locally on RF.
2023-01-27 19:03:27 +02:00
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
Heikki Hannikainen
b10084b45d
tls: Rename ssl.c to tls.c
2022-10-25 02:03:24 +03:00
Heikki Hannikainen
8a6c464cc0
sctp: Switch to buffered writes faster
...
On a very fast feed, writes may otherwise fail before the
switch happens.
2022-10-24 00:59:01 +03:00
Heikki Hannikainen
0075014c40
sctp: Buffer outgoing data, similar to TCP
...
Instead of sending one APRS-IS line per SCTP message, combine multiple
messages in a single SCTP message. This reduces the amount of system
calls a lot and improves eventual DTLS performance.
2022-10-23 19:32:34 +03:00
Heikki Hannikainen
45ee7a6bf9
uplink: Prevent blocking of worker threads while establishing uplink connection
...
uplink_client_mutex was being held for a long while during connection
establishment attempts, and it would also be required by the worker thread
when handling a closing upstream connection.
Fixes #64 .
2022-10-23 02:39:24 +03:00
Heikki Hannikainen
12bebb1936
worker data input: refactor packet deframing (CRLF delimiter) to
...
a separate function
2022-02-09 23:19:15 +02:00
Heikki Hannikainen
e6507c7ec2
Rename errno.[ch] to errno_aprsc.[ch] to reduce confusion with system errno.h
2017-03-17 09:23:08 +02:00
Heikki Hannikainen
80a53ef3f9
Disable FIXED_IOBUFS, make iobuf size configurable (necessary for higher throughput on some networks)
2016-08-15 20:11:36 +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
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
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
6fed708894
Move client sockopt setting to worker.c, set the same TCP socket options for
...
Uplinks and clients.
2013-04-30 19:13:45 +03:00
Heikki Hannikainen
2102cff229
worker: use a c->write() method to simplify different write handlers
2013-04-13 17:58:02 +03:00
Heikki Hannikainen
024264e1bf
Added a handler_client_writable handler, reduced conditionals
2013-04-13 15:09:21 +03:00
Heikki Hannikainen
5305169649
Use handler pointer for client readable
2013-04-13 15:00:34 +03:00
Heikki Hannikainen
8da002be7f
Renamed c->handler to handler_line_in
2013-04-13 14:06:09 +03:00
Heikki Hannikainen
b5123d0282
Half-working support for SCTP listeners and clients
2013-04-09 08:20:25 +03:00
Heikki Hannikainen
6e8e5dcfc1
Adjust defines to get recursive mutexes back
2013-04-08 21:52:56 +03:00
Heikki Hannikainen
a799e6dae3
define _GNU_SOURCE to silence warning about missing strncasestr prototype
2013-04-08 16:57:03 +00:00
Heikki Hannikainen
ae355f125b
Store cert subject & issue in client struct and status.json.
...
Store distinction between weak and strong validation status.
Display cert validation status on web.
Disconnect SSL client when doing live upgrade - the SSL state is not
transferred over the upgrade anyway.
Do not accept logging in with my ServerID or to an uplink server
having my ServerID.
2013-03-14 23:47:08 +02: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
2bae92daae
Initial slightly working SSL support for clients.
2013-03-01 16:52:56 +02:00
Heikki Hannikainen
f05cc6c632
timekeeping: Use clock_gettime CLOCK_MONOTONIC when available
...
and separate wall clock and monotonic time from each other.
"tick" is monotonic, "now" is real time.
2013-02-19 18:09:15 +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
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
bc1fa91e30
coverity: Quiet a false alarm, removed unused client_udp_t->configured var
2013-02-04 08:55:38 +02:00
Heikki Hannikainen
4622369bb7
coverity: Fix a small logging bug (only log app name/ver if it's present)
...
Removed a lot of #ifdefs by using static username/version/addr vars always.
2013-02-03 19:06:43 +02:00
Heikki Hannikainen
ed37f32189
Classify clients only when they have logged in. Use classification
...
presence to determine if packets should be sent in outgoing.c, which
saves one more condition check for login status for every packet.
2013-02-01 07:33:04 +02:00
Heikki Hannikainen
033d40288f
worker: Only raise an alert about internal packet drops if more than
...
24 packets were dropped within 24 hours.
2013-01-16 14:20:45 +02:00
Heikki Hannikainen
809691aa3d
Slightly optimize the most frequently called function, heard_find()
...
Moved repeated key hash calculation out to the filter preprocess
phase. Moved heard list expiration to be done once per 2 minutes,
instead of every time. 32 hash buckets instead of 16. Less function
arguments.
2012-11-15 22:05:14 +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
7ed64ed294
Live upgrade: Put clients in correct state and attach to the right listener
2012-10-19 10:54:40 +03:00
Heikki Hannikainen
f45ab9194a
Initial set of changes to facilitate live upgrades
...
Save status to a JSON file, execute self without disconnecting
clients. Initialize in a slightly special way.
2012-10-19 01:08:08 +03:00
Heikki Hannikainen
c202e81508
Report more thruthful error message for client/uplink quits
2012-10-14 02:31:48 +03:00
Heikki Hannikainen
f5a4298292
outgoing/worker: Classify upstreams/peers in their own list
2012-10-12 02:49:52 +03:00
Heikki Hannikainen
9cb21af856
outgoing/worker: classify read-only clients to their own list
2012-10-12 02:33:46 +03:00
Heikki Hannikainen
18b7dc4320
worker/outgoing: Classify dupeclients in a separate list
...
so that we don't need to walk through all clients when looking
for dupeclients. Optimisation starting point: will classify
other types of clients in their own lists.
2012-10-12 02:22:07 +03:00
Heikki Hannikainen
905cdfff26
Implemented a global MaxClients setting (default 500).
...
Limits the total amount of logged-in clients, not counting
peers or uplinks, and UDP clients are only included once for the
TCP/SCTP control connection.
Added check for MaxClients being < FileLimit - 50, so that file
descriptors are reserved for Uplinks and file IO.
2012-10-10 10:10:56 +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
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
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
40e3233bce
Uplink: Fix bug where a new client connecting happening very, very quickly
...
after new uplink connection could cause the uplink socket to be lost and
uplink not being logged in & processed.
git-svn-id: http://repo.ham.fi/svn/aprsc/trunk@825 3ce903b1-3385-4e86-93cd-f9a4a239f7ac
2012-09-06 16:13:26 +00:00