Hello all!
After two release candidates, here it is, the next major release of ngIRCd, the free, portable and lightweight Internet Relay Chat server for small or private networks: Release 26!
This release contains all fixes and enhancements since ngIRCd 25, please see the ChangeLog file for a detailed list of all changes. You can find it online here: https://github.com/ngircd/ngircd/blob/rel-26/ChangeLog
The NEWS file (https://github.com/ngircd/ngircd/blob/rel-26/NEWS) lists the following new features since ngIRCd 25:
• Add AppStream metadata file (contrib/de.barton.ngircd.metainfo.xml).
• Various bug fixes, see the ChangeLog. No new or changed functionality.
• Allow up to 512 characters per line in MOTD and help text files (but keep in mind that lines can't get that long, because they have to be prefixed before being sent to the client). But this allows for more fancy MOTDs :-) Closes #271.
• Show the actually allowed channel types in the ISUPPORT(005) numeric which are configured by the "AllowedChannelTypes" configuration variable. Closes #273.
• Handle commands in the read buffer before reading more data and don't wait for the network in this case: If there are more bytes in the read buffer already than a single valid IRC command can get long (513 bytes), 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).
• Log G-/K-Line changes only when not initiated by a server: this prevents the log from becoming spammed during "net bursts".
• Update test suite to include SSL tests, including checking for reloading certificates during runtime.
• Add support for GnuTLS certificate reload, which is quite handy when using Let's Encrypt, for example. Until now this was only supported when linked with OpenSSL. Thanks a lot, Hilko Bengen bengen@hilluzination.de!
• Allow setting arbitrary channel modes in the configuration file by handling them like in MODE commands, and allow multiple "Modes =" lines per [Channel] section. Thanks to Michi michi+ngircd@dataswamp.org! Closes #55.
• 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.
• Enhance handling of command line errors, and return with exit code 0 ("no error") when "--help" or "--version" is used (which resulted in exit code 1, "error" before). Exit with code 2 ("command line error") for all other invalid command line options, and show the error message itself on stderr (instead of stdout and exit code 1, "generic error", as before). This new behavior is more in line with the GNU "coding standards", see https://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html.
• Add ./contrib/nglog.sh: This script parses the log output of ngircd(8), and colorizes the messages according to their log level. Example usage: ngircd -f $PWD/doc/sample-ngircd.conf -np | ./contrib/nglog.sh
• Enlarge buffers of info texts to 128 bytes. This includes: • "Real name" of a client (4th filed of the USER command). • Server info text ("Info" configuration option). • Admin info texts and email address ("AdminInfo1", "AdminInfo2" and "AdminEmail" configuration options). • Network name ("Network" configuration option). The limit was 64 bytes before ... Closes #258.
You can download ngIRCd 26~rc1 from the download section on our homepage at https://ngircd.barton.de (mirror: https://ngircd.sourceforge.io). The primary download locations are:
• https://github.com/ngircd/ngircd/releases • https://ngircd.barton.de/pub/ngircd/ • https://ngircd.sourceforge.io/pub/ngircd/
Thanks a lot to all contributors & testers!
Stay safe and have fun! Alex
Alexander Barton wrote...
After two release candidates, here it is, the next major release of ngIRCd, the free, portable and lightweight Internet Relay Chat server for small or private networks: Release 26!
Yay!
• Update test suite to include SSL tests, including checking for reloading certificates during runtime.
Unfortunately this causes a failure here on a somewhat older machine[1] - although they pass on another one with an even slower CPU.
Observation:
| PASS: reload-server3 | running connect-ssl-cert2-test ...send: spawn id exp4 not open | while executing | "send "oper\r"" | (file "./connect-ssl-cert2-test.e" line 11) | | failure! | FAIL: connect-ssl-cert2-test
Some strace reveals:
This is the "openssl s_client" command from connect-ssl-cert2-test.e: | 34466 21:39:36.049056 connect(3, {sa_family=AF_INET, sin_port=htons(6790), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection refused) This is the daemon process: | 34426 21:39:36.085706 bind(7, {sa_family=AF_INET, sin_port=htons(6790), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
So a race condition. Possibly related, why does the daemon process:
| 34426 21:39:35.676268 openat(AT_FDCWD, "ssl/cert.pem", O_RDONLY|O_LARGEFILE|O_CLOEXEC <unfinished ...> | 34426 21:39:35.676830 <... openat resumed>) = 6 | 34426 21:39:35.677055 fstat64(6, <unfinished ...> | 34426 21:39:35.677179 <... fstat64 resumed>{st_mode=S_IFREG|0644, st_size=1468, ...}) = 0 | 34426 21:39:35.677307 _llseek(6, 0, <unfinished ...> | 34426 21:39:35.677411 <... _llseek resumed>[0], SEEK_CUR) = 0 | 34426 21:39:35.677535 fstat64(6, <unfinished ...> | 34426 21:39:35.677622 <... fstat64 resumed>{st_mode=S_IFREG|0644, st_size=1468, ...}) = 0 | 34426 21:39:35.677736 read(6, <unfinished ...> | 34426 21:39:35.677832 <... read resumed>"-----BEGIN CERTIFICATE-----\nMIIEDjCCAnagAwIBAgIBATANBgkqhkiG9w0BAQsFADAfMR0wGwYDVQQDExRteS5z\nZWNvbmQuZG9tYWluLnRsZDA | 34426 21:39:35.678022 read(6, <unfinished ...> | 34426 21:39:35.678177 <... read resumed>"", 4096) = 0 | 34426 21:39:35.678301 close(6 <unfinished ...> | 34426 21:39:35.678411 <... close resumed>) = 0 here: + 34426 21:39:36.083475 getpid() = 34426 | 34426 21:39:36.083612 write(1, "[34426:6 6] Discarding X509 certificate credentials from slot 0.\n", 68) = 68 | 34426 21:39:36.083818 getpid() = 34426 | 34426 21:39:36.083905 write(1, "[34426:6 6] Storing new X509 certificate credentials in slot 0.\n", 67) = 67 | 34426 21:39:36.084136 getpid() = 34426 | 34426 21:39:36.084226 write(1, "[34426:6 6] GnuTLS 3.6.14 initialized.\n", 42) = 42
lose some 300 milliseconds here? Without that, the race would not happen.
Workaround:
--- a/src/testsuite/connect-ssl-cert2-test.e +++ b/src/testsuite/connect-ssl-cert2-test.e @@ -1,6 +1,7 @@ # ngIRCd test suite # Server connect test
+sleep 1 spawn openssl s_client -quiet -connect 127.0.0.1:6790 expect { timeout { exit 1 }
Christoph
[1] | processor : 0 | cpu : 7447A, altivec supported | clock : 1249.999995MHz | revision : 1.2 (pvr 8003 0102) | bogomips : 83.24 | | timebase : 41620907 | platform : PowerMac | model : PowerMac10,1
Am 21.06.2020 um 22:06 schrieb Christoph Biedl ngircd.anoy@manchmal.in-ulm.de:
Alexander Barton wrote...
• Update test suite to include SSL tests, including checking for reloading certificates during runtime.
Unfortunately this causes a failure here on a somewhat older machine[1] - although they pass on another one with an even slower CPU.
[…]
So a race condition. Possibly related, why does the daemon process:
| 34426 21:39:35.676268 openat(AT_FDCWD, "ssl/cert.pem", O_RDONLY|O_LARGEFILE|O_CLOEXEC <unfinished ...> | 34426 21:39:35.676830 <... openat resumed>) = 6 | 34426 21:39:35.677055 fstat64(6, <unfinished ...> | 34426 21:39:35.677179 <... fstat64 resumed>{st_mode=S_IFREG|0644, st_size=1468, ...}) = 0 | 34426 21:39:35.677307 _llseek(6, 0, <unfinished ...> | 34426 21:39:35.677411 <... _llseek resumed>[0], SEEK_CUR) = 0 | 34426 21:39:35.677535 fstat64(6, <unfinished ...> | 34426 21:39:35.677622 <... fstat64 resumed>{st_mode=S_IFREG|0644, st_size=1468, ...}) = 0 | 34426 21:39:35.677736 read(6, <unfinished ...> | 34426 21:39:35.677832 <... read resumed>"-----BEGIN CERTIFICATE-----\nMIIEDjCCAnagAwIBAgIBATANBgkqhkiG9w0BAQsFADAfMR0wGwYDVQQDExRteS5z\nZWNvbmQuZG9tYWluLnRsZDA | 34426 21:39:35.678022 read(6, <unfinished ...> | 34426 21:39:35.678177 <... read resumed>"", 4096) = 0 | 34426 21:39:35.678301 close(6 <unfinished ...> | 34426 21:39:35.678411 <... close resumed>) = 0 here:
- 34426 21:39:36.083475 getpid() = 34426
| 34426 21:39:36.083612 write(1, "[34426:6 6] Discarding X509 certificate credentials from slot 0.\n", 68) = 68 | 34426 21:39:36.083818 getpid() = 34426 | 34426 21:39:36.083905 write(1, "[34426:6 6] Storing new X509 certificate credentials in slot 0.\n", 67) = 67 | 34426 21:39:36.084136 getpid() = 34426 | 34426 21:39:36.084226 write(1, "[34426:6 6] GnuTLS 3.6.14 initialized.\n", 42) = 42
lose some 300 milliseconds here? Without that, the race would not happen.
Wild guess: Probably because it needs and is waiting for some random numbers?
Workaround:
--- a/src/testsuite/connect-ssl-cert2-test.e +++ b/src/testsuite/connect-ssl-cert2-test.e @@ -1,6 +1,7 @@ # ngIRCd test suite # Server connect test
+sleep 1 spawn openssl s_client -quiet -connect 127.0.0.1:6790 expect { timeout { exit 1 }
Probably we should add this to the server starting logic, or even add a real test if the SSL-enabled port is ready & accepting connections there?
But good catch!
Thanks! Alex