1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-09-29 07:24:04 +00:00

Compare commits

..

14 Commits

Author SHA1 Message Date
Alexander Barton
4bcf4613f9 ngIRCd Release 26~rc2 2020-06-11 17:22:08 +02:00
Alexander Barton
c55a832806 Update NEWS, ChangeLog and doc/Platforms.txt files 2020-06-11 17:13:06 +02:00
Alexander Barton
3dedd57f7f Add AppStream metadata file: contrib/de.barton.ngircd.metainfo.xml 2020-06-11 17:11:15 +02:00
Alexander Barton
07cb8ed9ae Don't send invalid CHANINFO commands when no key is set
It can happen that a channel is +k, but no key is set: for example by
misconfiguring a pre-defined channel. In this case, ngIRCd sent an
invalud CHANINFO command ("CHANINFO #test +Pk  0 :'", note the unset
key represented by the two spaces) to its peers.

Fix this and enhance the CHANINFO documentation.
2020-06-11 16:45:30 +02:00
Alexander Barton
b003d469f1 Update NEWS and ChangeLog files 2020-05-31 19:38:59 +02:00
Alexander Barton
15c7444283 Update description text in manual page, too! 2020-05-26 23:00:25 +02:00
Alexander Barton
eb46f3d96d ngircd.spec: Fix name of README.md and INSTALL.md 2020-05-26 19:55:01 +02:00
Alexander Barton
a84cba8f78 Update description texts
Bring them in line with the updated texts on the homepage.
2020-05-26 19:43:14 +02:00
Alexander Barton
d697de3186 IRC_SQUIT(): Fix use-after-free when unregistering the sending client 2020-05-26 00:05:22 +02:00
Alexander Barton
02cf31c0e2 IRC_SERVER: Make sure that the client sent a prefix
The SERVER command is only valid with a prefix when received from other
servers, so make sure that there is one and disconnect the peer if not
(instead of crashing ...).

This obsoletes PR #275.

Thanks Hilko Bengen (hillu) for finding & reporting this as well for the
patch & pull request! But I think this is the "more correct" fix.
2020-05-25 23:51:00 +02:00
Alexander Barton
430bb22376 Enhance debug logging for PONG commands
Distinguish between expected and unexpected PONG commands.
2020-05-25 23:30:07 +02:00
Alexander Barton
dc6807338e Fix PING-PONG handling when processing backlog in read buffers
Prior to this commit, the PONG wasn't registered correctly, becauuse the
"last ping" time was set to time(NULL), which could be bigger than the
"last data" time stamp, for example when handling the read buffer took
more than 1 second -- and this resulted in the PONG time out kicking in
effectively disconnecting a newly linked server for example, because
ngIRCd thought it was still waiting for a PONG: last data < last ping.

Now the "last ping" value has three possible values:

    0: new connection, no PING, no PONG so far.
    1: got a PONG, no longer waiting for a PONG.
  <t>: time stamp of last sent out PING command.
2020-05-25 22:59:58 +02:00
Alexander Barton
0d503945cb Revert "Set the "last data" time to "last ping" time when updating the latter"
This patch completely broke the PING-PONG logic: now ngIRCd never
disconnects any stale peers but keeps sending out PINGs over and over
again ...

The real issue (server disconnects right after connect) will be fixed in
the next commit, but let's revert to the somewhat "half-broken but
'known' state" first ...

This reverts commit 79a917f954.
2020-05-25 22:59:00 +02:00
Hilko Bengen
bae68eb612 testsuite: Add missing files to EXTRA_DIST
26~rc1 as extracted from tarball cannot be built/tested with SSL
support because of a missing script and certificates.
2020-05-22 17:23:42 +02:00
20 changed files with 282 additions and 68 deletions

View File

@@ -10,6 +10,31 @@
ngIRCd 26
ngIRCd 26~rc2 (2020-06-11)
- Add AppStream metadata file (contrib/de.barton.ngircd.metainfo.xml).
- Don't send invalid CHANINFO commands when a channel has mode +k set but no
key is known to the server. This can happen with a misconfigured predefined
channel, for example, and looked like this: "CHANINFO #test +Pk 0 :" --
note the unset key represented by the two spaces. Fix this by sending a
"*" in this case and update the CHANINFO documentation, too.
- ngircd.spec: Fix names of README.md and INSTALL.md, add ".md" extension.
- Update description texts in the README.md file, the RPM and Debian package
files and the manual page: bring them in line with the updated homepage.
- Server-Server protocol: Fix use-after-free when unregistering a directly
connected server sending a SQUIT for itself.
- Server-Server protocol: Detect bogus SERVER commands lacking a prefix.
Thanks Hilko Bengen (hillu) for finding & reporting this as well for the
patch & pull request (even if fixed differently).
Closes #275.
- Fix the PING-PONG logic: In ngIRCd 26~rc1 this was completely broken (while
trying to fix timeouts during server handshakes in bigger networks): the
daemon never disconnected any stale peers but kept sending out PINGs over
and over again ...
- Test suite: Add missing files needed to test SSL support to "EXTRA_DIST",
so that they are included in distribution archives: in rc1, "make check"
fails when using sources from an archive and enabling SSL support.
Thanks to Hilko Bengen <bengen@hilluzination.de> for the patch!
ngIRCd 26~rc1 (2020-05-10)
- Tweak & update doc/HowToRelease.txt, .mailmap and AUTHORS files.
- Allow up to 512 characters per line in MOTD and help text files (but keep
@@ -25,9 +50,9 @@ ngIRCd 26
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).
- Update Travis-CI configuration, "sudo" is depreacted.
- Update Travis-CI configuration, "sudo" is deprecated.
- Log G-/K-Line changes only when not initiated by a server: this prevents
the log from becomming spammed during "net bursts".
the log from becoming spammed during "net bursts".
- Update test suite to include SSL tests, including checking for reloading
certificates during runtime.
- Makefile.am: Replace "make" with "${MAKE}". This fixes warnings like this:

8
NEWS
View File

@@ -10,6 +10,10 @@
ngIRCd 26
ngIRCd 26~rc2 (2020-06-11)
- Add AppStream metadata file (contrib/de.barton.ngircd.metainfo.xml).
- Various bug fixes, see the ChangeLog. No new or changed functionality.
ngIRCd 26~rc1 (2020-05-10)
- 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
@@ -25,7 +29,7 @@ ngIRCd 26
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 becomming spammed during "net bursts".
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
@@ -90,7 +94,7 @@ ngIRCd 25 (2019-01-23)
ngIRCd 25~rc1 (2018-08-11)
- Only send TOPIC updates to a channel when the topic actually changed:
This prevents the channel from becoming flooded by unecessary TOPIC update
This prevents the channel from becoming flooded by unnecessary TOPIC update
messages, that can happen when IRC services try to enforce a certain topic
but which is already set (at least on the local server), for example.
Therefore still forward it to all servers, but don't inform local clients

View File

@@ -7,11 +7,13 @@ server for small or private networks, developed under the terms of the GNU
General Public License ([GPL]); please see the file `COPYING` for licensing
information.
The server is simple to configure, can cope with dynamic IP addresses, and
supports IPv6 as well as SSL. It is written from scratch and not based on the
original IRCd.
The server is quite easy to configure, can handle dynamic IP addresses, and
optionally supports IDENT, IPv6 connections, SSL-protected links, and PAM for
user authentication as well as character set conversion for legacy clients. The
server has been written from scratch and is not based on the "forefather", the
daemon of the IRCNet.
The name ngIRCd means *next generation IRC daemon*, which is a little bit
The name ngIRCd means *next-generation IRC daemon*, which is a little bit
exaggerated: *lightweight Internet Relay Chat server* most probably would have
been a better name :-)
@@ -20,8 +22,8 @@ online available here: <https://ngircd.barton.de/doc/INSTALL.md>!
## Status
ngIRCd should be quite feature complete and stable to be used as daemon in
real world IRC networks.
ngIRCd should be quite feature-complete and stable to be used as a daemon in
real-world IRC networks.
It is not the goal of ngIRCd to implement all the nasty behaviors of the
original ircd, but to implement most of the useful commands and semantics

View File

@@ -1,3 +1,9 @@
ngircd (26~rc2-0ab1) unstable; urgency=low
* New "upstream" release candidate 2 for ngIRCd Release 26.
-- Alexander Barton <alex@barton.de> Thu, 11 Jun 2020 17:21:17 +0200
ngircd (26~rc1-0ab1) unstable; urgency=low
* New "upstream" release candidate 1 for ngIRCd Release 26.

View File

@@ -19,16 +19,21 @@ Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: ircd
Description: lightweight Internet Relay Chat server
This package provides ngIRCd, a portable and lightweight Internet Relay
Chat server for small or private networks, developed under the GNU
General Public License (GPL). It is simple to configure, can cope with
dynamic IP addresses, and supports IPv6 as well as SSL. It is written
from scratch and not based on the original IRCd.
ngIRCd is a free, portable and lightweight Internet Relay Chat server
for small or private networks, developed under the GNU General Public
License (GPL).
.
The server is quite easy to configure, can handle dynamic IP addresses, and
optionally supports IDENT, IPv6 connections, SSL-protected links, and PAM for
user authentication as well as character set conversion for legacy clients. The
server has been written from scratch and is not based on the "forefather", the
daemon of IRCNet.
.
This package contains the "standard distribution", including support for
syslog logging and compressed server-links using zlib. Please have a look
at the "ngircd-full" package if you need advanced functionality like support
for IPv6 or SSL.
at the "ngircd-full" package if you need "more advanced" functionality like
support for TCP wrappers, IDENT requests, the IPv6 protocol, PAM and
SSL encrypted client and server links.
Package: ngircd-full
Architecture: any
@@ -36,14 +41,18 @@ Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: ircd
Conflicts: ngircd, ngircd-dbg
Description: lightweight Internet Relay Chat server
This package provides ngIRCd, a portable and lightweight Internet Relay
Chat server for small or private networks, developed under the GNU
General Public License (GPL). It is simple to configure, can cope with
dynamic IP addresses, and supports IPv6 as well as SSL. It is written
from scratch and not based on the original IRCd.
ngIRCd is a free, portable and lightweight Internet Relay Chat server
for small or private networks, developed under the GNU General Public
License (GPL).
.
The server is quite easy to configure, can handle dynamic IP addresses, and
optionally supports IDENT, IPv6 connections, SSL-protected links, and PAM for
user authentication as well as character set conversion for legacy clients. The
server has been written from scratch and is not based on the "forefather", the
daemon of IRCNet.
.
In addition to the features of the "standard package", this package
includes support for TCP wrappers, IDENT requests, the IPv6 protocol and
includes support for TCP wrappers, IDENT requests, the IPv6 protocol, PAM and
SSL encrypted client and server links.
Package: ngircd-full-dbg
@@ -52,14 +61,18 @@ Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: ircd
Conflicts: ngircd, ngircd-full
Description: lightweight Internet Relay Chat server
This package provides ngIRCd, a portable and lightweight Internet Relay
Chat server for small or private networks, developed under the GNU
General Public License (GPL). It is simple to configure, can cope with
dynamic IP addresses, and supports IPv6 as well as SSL. It is written
from scratch and not based on the original IRCd.
ngIRCd is a free, portable and lightweight Internet Relay Chat server
for small or private networks, developed under the GNU General Public
License (GPL).
.
The server is quite easy to configure, can handle dynamic IP addresses, and
optionally supports IDENT, IPv6 connections, SSL-protected links, and PAM for
user authentication as well as character set conversion for legacy clients. The
server has been written from scratch and is not based on the "forefather", the
daemon of IRCNet.
.
In addition to the features of the "standard package", this package
includes support for TCP wrappers, IDENT requests, the IPv6 protocol and
includes support for TCP wrappers, IDENT requests, the IPv6 protocol, PAM and
SSL encrypted client and server links.
.
And in addition to the "full" variant, the binaries contained in this

View File

@@ -12,6 +12,7 @@
SUBDIRS = Debian MacOSX
EXTRA_DIST = README \
de.barton.ngircd.metainfo.xml \
ngindent.sh \
ngircd-bsd.sh \
ngIRCd-Logo.gif \

View File

@@ -18,6 +18,9 @@ MacOSX/
- Project files for XCode, the "project builder" of Apple Mac OS X.
- de.barton.ngircd.plist[.tmpl]: launchd(8) property list.
de.barton.ngircd.metainfo.xml
- AppStream metadata file.
ngindent.sh
- Script to indent the code of ngIRCd in the "standard way".

View File

@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="service">
<id>de.barton.ngircd</id>
<name>ngIRCd</name>
<summary>Lightweight Internet Relay Chat server</summary>
<metadata_license>MIT</metadata_license>
<project_license>GPL-2.0-or-later</project_license>
<developer_name>Alexander Barton and Contributors</developer_name>
<update_contact>alex@barton.de</update_contact>
<description>
<p>ngIRCd is a free, portable and lightweight Internet Relay Chat server for small or private networks, developed under the GNU General Public License (GPL).</p>
<p>The server is quite easy to configure, can handle dynamic IP addresses, and optionally supports IDENT, IPv6 connections, SSL-protected links, and PAM for user authentication as well as character set conversion for legacy clients. The server has been written from scratch and is not based on the "forefather", the daemon of the IRCNet.</p>
<p>The name ngIRCd means next-generation IRC daemon, which is a little bit exaggerated: lightweight Internet Relay Chat server most probably would have been a better name :-)</p>
</description>
<icon type="remote" width="300" height="300">https://ngircd.barton.de/common/ngircd-300x300.png</icon>
<categories>
<category>Network</category>
</categories>
<url type="homepage">https://ngircd.barton.de</url>
<url type="bugtracker">https://ngircd.barton.de/bugtracker</url>
<url type="help">https://ngircd.barton.de/support</url>
<provides>
<binary>ngircd</binary>
</provides>
<launchable type="service">ngircd</launchable>
<releases>
<release version="26~rc2" date="2020-06-11" type="development" />
<release version="26~rc1" date="2020-05-10" type="development" />
<release version="25" date="2019-01-23" />
<release version="25~rc1" date="2018-08-11" type="development" />
<release version="24" date="2017-01-20" />
<release version="24~rc1" date="2017-01-07" type="development" />
<release version="23" date="2015-11-16" />
<release version="23~rc1" date="2015-09-06" type="development" />
<release version="22.1" date="2015-04-06" />
<release version="22" date="2014-10-11" />
<release version="22~rc1" date="2014-09-29" type="development" />
<release version="21.1" date="2014-03-25" />
<release version="21" date="2013-10-30" />
<release version="21~rc2" date="2013-10-20" type="development" />
<release version="21~rc1" date="2013-10-05" type="development" />
<release version="20.3" date="2013-08-23" />
<release version="20.2" date="2013-02-15" />
<release version="20.1" date="2013-01-02" />
<release version="20" date="2012-12-17" />
<release version="20~rc2" date="2012-12-02" type="development" />
<release version="20~rc1" date="2012-11-11" type="development" />
<release version="19.2" date="2012-06-19" />
<release version="19.2~rc1" date="2012-06-13" type="development" />
<release version="19.1" date="2012-03-19" />
<release version="19" date="2012-02-29" />
<release version="19~rc1" date="2012-02-12" type="development" />
<release version="18" date="2011-07-10" />
<release version="18~rc2" date="2011-06-29" type="development" />
<release version="18~rc1" date="2011-06-27" type="development" />
<release version="17.1" date="2010-12-19" />
<release version="17" date="2010-11-07" />
<release version="17~rc3" date="2010-10-27" type="development" />
<release version="17~rc2" date="2010-10-25" type="development" />
<release version="17~rc1" date="2010-10-11" type="development" />
<release version="16" date="2010-05-02" />
<release version="16~rc2" date="2010-04-25" type="development" />
<release version="16~rc1" date="2010-03-25" type="development" />
<release version="15" date="2009-11-07" />
<release version="15~rc1" date="2009-10-15" type="development" />
<release version="14.1" date="2009-05-05" />
<release version="14" date="2009-04-20" />
<release version="14~rc1" date="2009-03-29" type="development" />
<release version="13" date="2008-12-25" />
<release version="0.12.1" date="2008-07-09" />
<release version="0.12.0" date="2008-05-13" />
<release version="0.12.0-pre2" date="2008-04-29" type="development" />
<release version="0.12.0-pre1" date="2008-04-20" type="development" />
<release version="0.11.1" date="2008-02-26" />
<release version="0.11.0" date="2008-01-15" />
<release version="0.11.0-pre2" date="2008-01-07" type="development" />
<release version="0.11.0-pre1" date="2008-01-02" type="development" />
<release version="0.10.4" date="2008-01-07" />
<release version="0.10.3" date="2007-08-01" />
<release version="0.10.2" date="2007-06-08" />
<release version="0.10.2-pre2" date="2007-05-19" type="development" />
<release version="0.10.2-pre1" date="2007-05-05" type="development" />
<release version="0.10.1" date="2006-12-17" />
<release version="0.10.0" date="2006-10-01" />
<release version="0.10.0-pre2" date="2006-09-09" type="development" />
<release version="0.10.0-pre1" date="2006-08-02" type="development" />
<release version="0.9.2" date="2005-10-15" />
<release version="0.9.1" date="2005-08-03" />
<release version="0.9.0" date="2005-07-24" />
<release version="0.9.0-pre1" date="2005-07-09" type="development" />
<release version="0.8.3" date="2005-02-03" />
<release version="0.8.2" date="2005-01-26" />
<release version="0.8.1" date="2004-12-25" />
<release version="0.8.0" date="2004-06-26" />
<release version="0.8.0-pre1" date="2004-05-07" type="development" />
<release version="0.7.7" date="2004-02-05" />
<release version="0.7.6" date="2003-12-05" />
<release version="0.7.5" date="2003-11-07" />
<release version="0.7.1" date="2003-07-18" />
<release version="0.7.0" date="2003-05-01" />
<release version="0.7.0-pre2" date="2003-04-27" type="development" />
<release version="0.7.0-pre1" date="2003-04-22" type="development" />
<release version="0.6.0" date="2002-12-24" />
<release version="0.6.0-pre2" date="2002-12-23" type="development" />
<release version="0.6.0-pre1" date="2002-12-18" type="development" />
<release version="0.5.4" date="2002-11-24" />
<release version="0.5.3" date="2002-11-08" />
<release version="0.5.2" date="2002-10-04" />
<release version="0.5.1" date="2002-10-03" />
<release version="0.5.0" date="2002-09-20" />
<release version="0.5.0-pre2" date="2002-09-17" type="development" />
<release version="0.5.0-pre1" date="2002-09-16" type="development" />
<release version="0.4.3" date="2002-06-11" />
<release version="0.4.2" date="2002-04-29" />
<release version="0.4.1" date="2002-04-08" />
<release version="0.4.0" date="2002-04-01" />
<release version="0.3.0" date="2002-03-02" />
<release version="0.2.1" date="2002-02-17" />
<release version="0.2.0" date="2002-02-15" />
<release version="0.1.0" date="2002-01-29" />
<release version="0.0.3" date="2002-01-16" />
<release version="0.0.2" date="2002-01-06" />
<release version="0.0.1" date="2001-12-31" />
</releases>
</component>

View File

@@ -1,5 +1,5 @@
%define name ngircd
%define version 26~rc1
%define version 26~rc2
%define release 1
%define prefix %{_prefix}
@@ -15,19 +15,15 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: zlib-devel, openssl-devel
%description
This package provides ngIRCd, a portable and lightweight Internet Relay
Chat server for small or private networks, developed under the GNU
General Public License (GPL). It is simple to configure, can cope with
dynamic IP addresses, and supports IPv6 as well as SSL. It is written
from scratch and not based on the original IRCd.
ngIRCd is a free, portable and lightweight Internet Relay Chat server for small
or private networks, developed under the GNU General Public License (GPL).
The server is quite easy to configure, can handle dynamic IP addresses, and
optionally supports IDENT, IPv6 connections, SSL-protected links, and PAM for
user authentication as well as character set conversion for legacy clients. The
server has been written from scratch and is not based on the forefather, the
daemon of IRCNet.
Advantages:
- well arranged (lean) configuration file
- simple to build/install, configure and maintain
- supports IPv6 and SSL
- no problems with servers that have dynamic IP addresses
- freely available, modern, portable and tidy C-source
- ngIRCd is being actively developed since 2001
%prep
%setup -q
@@ -54,7 +50,7 @@ make %{?_smp_mflags}
%files
%defattr(755,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README doc/*
%doc AUTHORS COPYING ChangeLog INSTALL.md NEWS README.md doc/*
%config(noreplace) /etc
%{_prefix}/sbin
%{_mandir}/man5/ngircd.conf*

View File

@@ -874,6 +874,10 @@ Server Protocol Commands
CHANINFO is used by servers to inform each other about a channel:
its modes, channel key, user limits and its topic.
.
Note: even when <modes> don't include "k" (key) or "l" (limit), both
parameters must be given when used; use "*" for "no key" and 0 for
"no limit" for the unused parameter in this case.
.
The CHANINFO command is allowed on server-links only.
References:

View File

@@ -55,6 +55,7 @@ c) Update the files describing the new release:
- NEWS
d) Update the version numbers in the following files:
- contrib/de.barton.ngircd.metainfo.xml
- contrib/ngircd.spec
e) Generate a new Debian change log entry in the following file, e.g. using

View File

@@ -2,7 +2,7 @@
ngIRCd - Next Generation IRC Server
http://ngircd.barton.de/
(c)2001-2019 Alexander Barton and Contributors.
(c)2001-2020 Alexander Barton and Contributors.
ngIRCd is free software and published under the
terms of the GNU General Public License.
@@ -101,7 +101,7 @@ x86_64/apple/darwin15.6.0 A-clang 8.0 23~38-g455 16-11-04 alex Y Y Y Y 3
x86_64/apple/darwin16.5.0 A-clang 8.1 25~rc1-7-g 18-11-04 alex Y Y Y Y 3
x86_64/apple/darwin17.7.0 A-clang 10.0 25~rc1 18-11-04 alex Y Y Y Y 3
x86_64/apple/darwin18.2.0 A-clang 10.0 25~rc1-11 19-01-23 alex Y Y Y Y 3
x86_64/apple/darwin19.0.0 A-clang 11.0 25~19-g928 19-12-07 alex Y Y Y Y 3
x86_64/apple/darwin19.4.0 A-clang 11.0 26~rc1 20-05-10 alex Y Y Y Y 3
x86_64/unknown/dragonfly3.4 gcc 4.7.2 21 13-11-12 goetz Y Y N Y 3
x86_64/unkn./freebsd8.1-gnu gcc 4.4.5 19 12-02-26 alex Y Y Y Y 3
x86_64/unknown/freebsd8.4 gcc 4.2.1 24~rc1-7 17-01-20 alex Y Y Y Y 3
@@ -119,6 +119,7 @@ x86_64/unknown/linux-gnu gcc 5.3.0 23 15-12-14 goetz Y Y Y Y 1
x86_64/pc/linux-gnu [WSL] gcc 5.4.0 24 18-03-07 goetz Y Y y Y 7
x86_64/pc/linux-gnu gcc 6.2.1 24~rc1-7 17-01-20 alex Y Y Y Y 1
x86_64/pc/linux-gnu gcc 6.3.0 25~rc1-11 19-01-23 alex Y Y Y Y 1
x86_64/pc/linux-gnu gcc 8.3.0 26~rc1 20-05-10 alex Y Y Y Y 1
x86_64/unknown/linux-gnu icc 16 23 16-01-13 goetz Y Y Y Y 1
x86_64/unknown/linux-gnu nwcc 0.8.2 21 13-12-01 goetz Y Y Y Y 1
x86_64/unknown/linux-gnu Open64 21.1 14-03-27 goetz Y Y Y Y 1
@@ -135,8 +136,8 @@ x86_64/unknown/openbsd5.5 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y Y Y 3
(1) */*/linux-gnu (Linux platforms):
ngIRCd has been tested with various Linux distributions, such as ArchLinux,
Debian, Gentoo, Red Hat (Fedora) and SuSE using Linux kernels 2.2.x, 2.4.x,
2.6.x, 3.x, and 4.x, with various versions of the GNU C compiler (starting
with 2.95.x) and Clang. The eldest glibc used was glibc-2.0.7.
2.6.x, 3.x, 4.x and 5.x, with various versions of the GNU C compiler
(starting with 2.95.x) and Clang. The eldest glibc used was glibc-2.0.7.
ngIRCd compiled and ran on all of these systems successfully.
Current Linux kernels (starting with 2.6.x) and glibc's support the more
efficient epoll() IO interface, see (5) below.

View File

@@ -13,12 +13,15 @@ ngIRCd \- the "next generation" IRC daemon
.BR ngIRCd
is a free, portable and lightweight Internet Relay Chat server for small
or private networks, developed under the GNU General Public License (GPL).
It is easy to configure, can cope with dynamic IP addresses, and supports
IPv6, SSL-protected connections as well as PAM for authentication.
It is written from scratch and not based on the original IRCd.
.PP
The server is quite easy to configure, can handle dynamic IP addresses, and
optionally supports IDENT, IPv6 connections, SSL-protected links, and PAM for
user authentication as well as character set conversion for legacy clients. The
server has been written from scratch and is not based on the "forefather", the
daemon of the IRCNet.
.PP
The name ngIRCd means
.IR "next generation IRC daemon",
.IR "next-generation IRC daemon",
which is a little bit exaggerated:
.IR "lightweight Internet Relay Chat server"
most probably would have been a better name :-)

View File

@@ -45,13 +45,17 @@ Conn_UpdateIdle(CONN_ID Idx)
/**
* Update "ping timestamp", the time of the last outgoing PING request.
*
* the value 0 signals a newly connected client including servers during the
* initial "server burst"; and 1 means that no PONG is pending for a PING.
*
* @param Idx Connection index.
* @param TimeStamp 0, 1, or time stamp.
*/
GLOBAL void
Conn_UpdatePing(CONN_ID Idx)
Conn_UpdatePing(CONN_ID Idx, time_t TimeStamp)
{
assert(Idx > NONE);
My_Connections[Idx].lastping = My_Connections[Idx].lastdata = time(NULL);
My_Connections[Idx].lastping = TimeStamp;
}
/*

View File

@@ -30,7 +30,7 @@
GLOBAL void Conn_UpdateIdle PARAMS((CONN_ID Idx));
GLOBAL void Conn_UpdatePing PARAMS((CONN_ID Idx));
GLOBAL void Conn_UpdatePing PARAMS((CONN_ID Idx, time_t TimeStamp));
GLOBAL time_t Conn_GetSignon PARAMS((CONN_ID Idx));
GLOBAL time_t Conn_GetIdle PARAMS(( CONN_ID Idx ));

View File

@@ -1866,6 +1866,9 @@ Check_Connections(void)
CLIENT *c;
CONN_ID i;
char msg[64];
time_t time_now;
time_now = time(NULL);
for (i = 0; i < Pool_Size; i++) {
if (My_Connections[i].sock < 0)
@@ -1880,7 +1883,7 @@ Check_Connections(void)
My_Connections[i].lastdata) {
/* We already sent a ping */
if (My_Connections[i].lastping <
time(NULL) - Conf_PongTimeout) {
time_now - Conf_PongTimeout) {
/* Timeout */
snprintf(msg, sizeof(msg),
"Ping timeout: %d seconds",
@@ -1889,10 +1892,10 @@ Check_Connections(void)
Conn_Close(i, NULL, msg, true);
}
} else if (My_Connections[i].lastdata <
time(NULL) - Conf_PingTimeout) {
time_now - Conf_PingTimeout) {
/* We need to send a PING ... */
LogDebug("Connection %d: sending PING ...", i);
Conn_UpdatePing(i);
Conn_UpdatePing(i, time_now);
Conn_WriteStr(i, "PING :%s",
Client_ID(Client_ThisServer()));
}
@@ -1903,7 +1906,7 @@ Check_Connections(void)
* still not registered. */
if (My_Connections[i].lastdata <
time(NULL) - Conf_PongTimeout) {
time_now - Conf_PongTimeout) {
LogDebug
("Unregistered connection %d timed out ...",
i);

View File

@@ -877,11 +877,20 @@ IRC_PONG(CLIENT *Client, REQUEST *Req)
(long)(time(NULL) - Conn_GetSignon(conn)),
time(NULL) - Conn_GetSignon(conn) == 1 ? "" : "s",
Client_UserCount(), Channel_CountVisible(NULL));
Conn_UpdatePing(conn);
} else
LogDebug("Connection %d: received PONG. Lag: %ld seconds.",
conn, (long)(time(NULL) - Conn_LastPing(conn)));
}
#ifdef DEBUG
else {
if (Conn_LastPing(conn) > 1)
LogDebug("Connection %d: received PONG. Lag: %ld seconds.",
conn, (long)(time(NULL) - Conn_LastPing(conn)));
else
LogDebug("Got unexpected PONG on connection %d. Ignored.",
conn);
}
#endif
/* We got a PONG, so signal that none is pending on this connection. */
Conn_UpdatePing(conn, 1);
return CONNECTED;
} /* IRC_PONG */

View File

@@ -186,6 +186,15 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
if (!Client_CheckID(Client, Req->argv[0]))
return DISCONNECTED;
if (!Req->prefix) {
/* We definitely need a prefix here! */
Log(LOG_ALERT, "Got SERVER command without prefix! (on connection %d)",
Client_Conn(Client));
Conn_Close(Client_Conn(Client), NULL,
"SERVER command without prefix", true);
return DISCONNECTED;
}
from = Client_Search( Req->prefix );
if (! from) {
/* Uh, Server, that introduced the new server is unknown?! */
@@ -358,7 +367,7 @@ IRC_SQUIT(CLIENT * Client, REQUEST * Req)
{
char msg[COMMAND_LEN], logmsg[COMMAND_LEN];
CLIENT *from, *target;
CONN_ID con;
CONN_ID con, client_con;
int loglevel;
assert(Client != NULL);
@@ -398,6 +407,7 @@ IRC_SQUIT(CLIENT * Client, REQUEST * Req)
return CONNECTED;
}
client_con = Client_Conn(Client);
con = Client_Conn(target);
if (Req->argv[1][0])
@@ -419,7 +429,7 @@ IRC_SQUIT(CLIENT * Client, REQUEST * Req)
Req->argv[0], Client_ID(from),
Req->argv[1][0] ? Req->argv[1] : "-");
Conn_Close(con, NULL, msg, true);
if (con == Client_Conn(Client))
if (con == client_con)
return DISCONNECTED;
} else {
/* This server is not directly connected, so the SQUIT must

View File

@@ -214,7 +214,7 @@ Synchronize_Lists(CLIENT * Client)
static bool
Send_CHANINFO(CLIENT * Client, CHANNEL * Chan)
{
char *modes, *topic;
char *modes, *topic, *key;
bool has_k, has_l;
#ifdef DEBUG
@@ -243,9 +243,10 @@ Send_CHANINFO(CLIENT * Client, CHANNEL * Chan)
Channel_Name(Chan), modes, topic);
}
/* "CHANINFO <chan> +<modes> <key> <limit> :<topic>" */
key = Channel_Key(Chan);
return IRC_WriteStrClient(Client, "CHANINFO %s +%s %s %lu :%s",
Channel_Name(Chan), modes,
has_k ? Channel_Key(Chan) : "*",
has_k ? (key && *key ? key : "*") : "*",
has_l ? Channel_MaxUsers(Chan) : 0, topic);
} /* Send_CHANINFO */

View File

@@ -25,8 +25,11 @@ EXTRA_DIST = \
start-server1 stop-server1 ngircd-test1.conf \
start-server2 stop-server2 ngircd-test2.conf \
start-server3 stop-server3 ngircd-test3.conf \
reload-server3 reload-server.sh prep-server3 cleanup-server3\
connect-ssl-cert1-test.e connect-ssl-cert2-test.e
reload-server3 reload-server.sh prep-server3 cleanup-server3 switch-server3 \
connect-ssl-cert1-test.e connect-ssl-cert2-test.e \
ssl/cert-my-first-domain-tld.pem ssl/cert-my-second-domain-tld.pem \
ssl/dhparams-my-first-domain-tld.pem ssl/dhparams-my-second-domain-tld.pem \
ssl/key-my-first-domain-tld.pem ssl/key-my-second-domain-tld.pem
all: