1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-10-27 20:36:18 +00:00
Commit Graph

3487 Commits

Author SHA1 Message Date
Alexander Barton
05261c020e Update NEWS and ChangeLog files 2020-05-10 01:09:34 +02:00
Alexander Barton
e860807500 Add missing authors to AUTHORS, tweak ".mailmap" file 2020-05-10 00:16:11 +02:00
Alexander Barton
e889de9d92 Tweak & update doc/HowToRelease.txt a bit ... 2020-05-10 00:14:04 +02:00
Alexander Barton
fcf2874a9d Allow more characters per line in MOTD and help text files
Change the line buffer in the Read_TextFile() function from 127 to
COMMAND_LEN (=512) bytes. Lines can't even get that long, because they
have to be prefixed before being sent to the client, so this is a sane
maximum.

This allows for even more "fancy" and "wider" MOTDs :-)

Closes #271.
2020-05-07 18:10:41 +02:00
Alexander Barton
4b7e8db418 Show allowed channel types in ISUPPORT(005) numeric only
Don't show the static list of all possibly available channel types ...

Closes #273.
2020-05-07 18:03:06 +02:00
Alexander Barton
bc22f41c51 Platforms.txt: Add x86_64/apple/darwin19.0.0
- Add x86_64/apple/darwin19.0.0 (Apple clang 11.0)
2020-05-07 17:53:13 +02:00
Alexander Barton
d11f13f187 Update Platforms.txt
- Update powerpc/apple/darwin8.11.0 (gcc 4.0.1)
- Add mips/sgi/irix6.5 (SGI C compiler)
- Add mipsel/unknown/netbsd8.0 (gcc 5.5.0)

Thanks to Götz Hoffart <goetz@hoffart.de>!
2020-05-07 17:52:51 +02:00
Alexander Barton
21f33e5911 SSL test server: Use port 6790, like "test server #2"
Don't use the "standard" IRC SSL port 6697, as this easily collides with
real (ng)IRCd instances running on the same machine.

And by reusing port 6790, which is already used by the "test server #2",
we don't need any other port than the test suite already uses.
2020-05-07 00:02:00 +02:00
Alexander Barton
db88b92c8a Git: Ignore generated files of SSL tests 2020-05-06 23:47:28 +02:00
Alexander Barton
02850008f4
Merge pull request #269 from hillu/gnutls-reload-cert
Add support for GnuTLS certificate reload.

Thanks a lot, Hilko Bengen!
2020-05-06 23:36:19 +02:00
Alexander Barton
52d8fa2c09 Update Client_SetHostname() to not use strpbrk()
Not sure about the portability of strpbrk() in really ancient OS, and
this was the only place where it became used recently in ngIRCd ...
So let's play it safe! ;-)
2020-05-04 00:58:24 +02:00
michi
1f40776bc1 Allow hostmask cloaking when rDNS is disabled 2020-05-04 00:58:24 +02:00
Alexander Barton
387a29a7fd Don't wait for the network when read buffers possibly hold commands
There is no point in waiting up to one second for the network receiving
new data when there is still a read buffer holding at least one command;
we shouldn't waste time but handle it immediately!
2020-05-04 00:46:56 +02:00
Alexander Barton
54fac57603 Handle commands in the read buffer before reading more data
If there are more bytes in the read buffer already than a single valid
IRC command can get long (513 bytes, COMMAND_LEN), wait for this/those
command(s) to be handled first and don't try to read even more data from
the network (which most probably would overflow the read buffer of this
connection soon).
2020-05-04 00:46:56 +02:00
Alexander Barton
9f05f5ee61 Read_Request(): Clean up code and add some more comments
No functional changes.
2020-05-04 00:46:56 +02:00
Alexander Barton
629a45ee0f Revert "Increase read buffer size for server connections"
This reverts commit c6e3c13f27.

This sounded like the right approach at first, but I'm not that sure
that it really makes sense to have different sizes of read buffers: the
per-connection read buffer only needs to keep data that is needed to
parse one full command, be it plain text, encrypted and/or compressed.
Then ngIRCd should handle this one command, move leftover data to the
beginning of the buffer and read the next chunk from the network that is
missing to get the next complete command (512 bytes at max).

So I revert this for now and try to fix the logic in Read_Request(),
which is broken nevertheless, as it results in servers becoming
disconnected during "server burst" when "big" lists are transferred.
2020-05-04 00:46:56 +02:00
Alexander Barton
8d414b079c Correctly use Config_Error() instead of Log() in Read_Config()
The name of the Config_Error() function is misleading: it is not only
used to show configuraton errors, but all messages shown during normal
operation as well as for "config testing": it takes care of the correct
formatting of the messages (syslog, forground logging, config testing).

This fixes commit bb1d014aba.
2020-05-03 17:08:51 +02:00
Alexander Barton
8a37695bf3 contrib/nglog.sh: Looks like GNU awk (gawk) is needed ... 2020-05-03 17:07:51 +02:00
Alexander Barton
71e9bb1ca6 Update Travis-CI configuration, "sudo" is depreacted 2020-05-03 03:15:56 +02:00
Alexander Barton
0dc692b1f7 Log G-/K-Line changes only when not initiated by a server
This prevents the log from becomming spammed during "net bursts".
2020-05-03 03:15:49 +02:00
Alexander Barton
79a917f954 Set the "last data" time to "last ping" time when updating the latter
This is required because the PING can be received quite a bit earlier
than it is actually handled, for example during "server burst" or other
heavy operations:
So the times won't match and PING-PONG logic would become garbled,
because we test for "last ping > last data" to determine if a PING
already was sent or not.
2020-05-03 03:15:38 +02:00
Johann Hartwig Hauschild
11ea6a5070 updating testsuite to support ssl-tests 2020-04-25 00:04:38 +02:00
Alexander Barton
42e8654d7b INSTALL.md: Add not about removed legacy options 2020-04-20 19:31:57 +02:00
sam_c
1fc54ebef1
Makefile.am: Replace make with ${MAKE} (#270)
Fixes warnings such as:
"warning: jobserver unavailable: using -j1. Add `+' to parent make rule."

Signed-off-by: Sam James (sam_c) <sam@cmpct.info>
2020-04-20 19:29:16 +02:00
Alexander Barton
c2c84a1d26 Update AUTHORS file 2020-04-20 19:25:28 +02:00
Alexander Barton
05324b232f ChangeLog: Add missing patch attribution 2020-04-20 19:25:02 +02:00
Alexander Barton
ea1207238f Update NEWS and ChangeLog files 2020-04-20 19:14:54 +02:00
Alexander Barton
830f00e953 contrib/nglog.sh: Use bash(1) as interpreter
bash(1) is required to handle the forking and output redirection
connectly, sh(1) -- at least dash(1) on Debian -- fails ...

This fixes the last commit, 14777c18c.
2020-04-20 10:01:09 +02:00
Alexander Barton
14777c18cf contrib/nglog.sh: Fork awk(1), deal better with signals (CTRL-C) 2020-04-20 00:55:24 +02:00
Alexander Barton
e4a6bd5099 Update Xcode project for latest Xcode version (11.4.1) 2020-04-20 00:54:06 +02:00
michi
ab62dd27dc Remove legacy configuration options
Remove legacy configuration options and related functions that have
been marked for removal for some time:

- PredefChannelsOnly (v22)
- NoticeAuth (v24)
- NoXXX (v19)
- Old '[GLOBAL]' section handling (v19)
2020-04-20 00:20:50 +02:00
michi
c6e3c13f27 Increase read buffer size for server connections
This applies the same logic we have for write buffers to distinguish
between server and client connections and sets the maximum buffer size
accordingly. As a result peering with servers with many GLINE/KLINEs
does not kill the connecting server connection anymore.
2020-04-20 00:20:46 +02:00
michi
04de1423eb Fix recursion bug on write error
Depending on the stack size, too many clients on the same channel
quitting at the same time would trigger a crash due to too many
recursive calls to Conn_Close().
2020-04-20 00:20:46 +02:00
michi
13b8324c4a Fix hostmask cloaking bug for IPv6 too 2020-04-20 00:20:46 +02:00
michi
f27827d793 Unbreak GCC 10 (-fno-common) build 2020-04-20 00:20:46 +02:00
Hilko Bengen
86f3c563d6 GnuTLS: Eliminate memory leaks for DH parameters, priorities cache
The DH parameters reference has to be stored next to the x509_cred
which holds a reference to it.
2020-04-19 21:20:43 +02:00
Hilko Bengen
eead4a631f Add support for GnuTLS certificate reload
This requires keeping track of currently active certificates, so those
are stored separately, along with a reference counter, and discarded
when they are no longer in use.
2020-04-17 17:34:12 +02:00
Alexander Barton
9c5e42458e Update documentation to reflect "[Channel]->Modes" changes
No longer mention "[Channel]->Key" and "[Channel]->MaxUsers".
2020-03-29 23:17:21 +02:00
Alexander Barton
61ac8be2fd Convert INSTALL and README files to Markdown
This requires some changes to the build system, for example to comply
with the expectations of the GNU autoconf/automake tools ...
2020-03-29 22:33:51 +02:00
Alexander Barton
3aa1d880fe Add deprecation warnings for "Key" and "MaxUsers" in [Channel] 2020-03-29 22:31:18 +02:00
Alexander Barton
ba3b22b851 Test suite: Test multiple "Modes" lines in [Channel] sections 2020-03-29 01:16:37 +01:00
Alexander Barton
4d519cfdbf Predefined channles: Fix handling of legacy configuration options
Fix the handling of legacy "Key" and "MaxUsers" [Channel] settings:

- Activate them before evaluating the "Modes" parameter, to allow the
  latter to override those legacy options.
- Enforce setting the respective +k/+l mode(s) to support the legacy
  "Mode = kl" notation, which was valid but is an invalid MODE string:
  key and limit are missing! So set them manually when "k" or "l" are
  detected in the first MODE parameter.
- Sort modes +kl alphabetically, adjust test suite accordingly.
2020-03-29 00:45:59 +01:00
Alexander Barton
fed22184c5 Enhance logging while setting up predefined channels 2020-03-29 00:30:36 +01:00
michi
a3072ce698 Allow multiple "Modes =" lines per [Channel] section 2020-03-29 00:29:50 +01:00
michi
decf98d5ef Evaluate initial channel modes
Allow setting arbitrary channel modes in the config file.

Closes #55.
2020-03-28 23:47:21 +01:00
Alexander Barton
a77353361b Xcode: add missing files in src/testsuite, and sort them 2020-03-28 23:46:16 +01:00
Alexander Barton
3f7caff630 Add "FNC" (forced nick changes) to ISUPPORT(005) numeric
Most probably this doesn't make any difference to any client, but it
seems correct. See <http://www.irc.org/tech_docs/005.html> for details.
2020-03-22 14:07:32 +01:00
Alexander Barton
8d173a3328 Fix memory leak in portabtest Check_strtok_r()
Fix the following Clang "LeakSanitizer" error (which isn't quite
relevant in this test program, but anyway):

  ERROR: LeakSanitizer: detected memory leaks

  Direct leak of 7 byte(s) in 1 object(s) allocated from:
      #0 0x7f8c4d022810 in strdup (/lib/x86_64-linux-gnu/libasan.so.5+0x3a810)
      #1 0x5601a801491a in Check_strtok_r (/net/arthur/home/alex/Develop/ngIRCd/ngIRCd.git/src/portab/portabtest+0x291a)
      #2 0x5601a8014d77 in main (/net/arthur/home/alex/Develop/ngIRCd/ngIRCd.git/src/portab/portabtest+0x2d77)
      #3 0x7f8c4c69009a in __libc_start_main ../csu/libc-start.c:308

  SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s).
  FAIL: portabtest
2020-02-15 14:56:07 +01:00
michi
e7cb9b1a00 Reuse old SSL key if loading a new one failed 2020-02-15 14:47:20 +01:00
Alexander Barton
c411643d45 Update Xcode project for latest Xcode version (11.3.1) 2020-02-11 20:33:44 +01:00