config: Add DisallowIgateCall to drop packets by igate call or Q construct - #100
Merged
Conversation
…truct Add a DisallowIgateCall option (config.c/config.h), accepting a glob list like DisallowSourceCall and DisallowLoginCall. incoming.c checks every comma-delimited field from the Q construct (q_start) to path_end against disallow_igate_glob after q_process, so a configured glob can drop based on the igate/receiver callsigns or on the Q construct itself (e.g. qAY). Add drop tests in tests/t/11misc-drops.t with a DisallowIgateCall list in tests/cfg-aprsc/basic.
It's not there any more.
The configure test for the one-argument (macOS) pthread_setname_np signature included <pthread.h> without _GNU_SOURCE. On glibc the function is then not declared, so the single-argument call compiled as an implicit declaration (a warning, not an error, on older gcc) and HAVE_PTHREAD_SETNAME_NP_MACOS was wrongly defined. hlog.c, which does define _GNU_SOURCE, then compiled the one-argument branch against the real two-argument prototype and failed with "too few arguments to function pthread_setname_np". Define _GNU_SOURCE in the test (as hlog.c does) so glibc exposes the two-argument prototype and the single-argument call becomes a hard error, and compile the test with -Werror so an implicit declaration is fatal too. Now the macOS signature is detected only where it actually applies. Regenerate configure with autoreconf.
Commit fb006f9 rejects logins where the software name and version are not separated by a space (the filter/udp keyword or nothing ends up as the version number). Known-broken clients handled in quirks mode often send just an application name with no version, so this rejected them before quirks mode was ever established - breaking t/12quirks-mode.t, whose HR-IXPWINDi-123 client is on the quirks blacklist. Determine the app name (and thus quirks-mode status) before applying the check, and skip the rejection for quirks-mode clients. This also avoids a latent out-of-bounds read of argv[i+2] when the version was missing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a DisallowIgateCall option (config.c/config.h), accepting a glob list
like DisallowSourceCall and DisallowLoginCall. incoming.c checks every
comma-delimited field from the Q construct (q_start) to path_end against
disallow_igate_glob after q_process, so a configured glob can drop based on
the igate/receiver callsigns or on the Q construct itself (e.g. qAY).
Add drop tests in tests/t/11misc-d