summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
Switch password hashing from DES crypt to SHA-256
DES crypt is trivially crackable. Passwords starting with $ are now
auto-detected as crypt hashes (supports $5$ SHA-256, $6$ SHA-512, etc).
Plaintext passwords still work for backwards compatibility.
Remove crypt_oper_password and crypt_iline_password config options —
detection is now automatic based on the $ prefix in stored passwords.
Update mkpasswd to generate SHA-256 ($5$) hashes with random salts.
Stop logging passwords (plaintext or hashed) in oper logs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
Rewrite host masking with IPv6 support and hex hashes
Replaces the old decimal-digit masking with a cleaner hex-based hash
that handles IPv6, IPv4, and hostnames consistently:
- IPv6: SereneAB12CD.2601:540:ce00 (preserves /48 prefix)
- IPv4: SereneAB12CD.192.168.1 (preserves /24 prefix)
- Hostname: SereneAB12CD.example.com (preserves domain)
The mask prefix is configurable via mask_prefix in the network{} block.
Also adds mask_suffix config key (reserved for future use).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
Reduce DNS lookup timeout from 28s to 8s
The resolver used 3 retries starting at 4s with exponential backoff
(4+8+16 = 28 seconds), which made connecting painfully slow when
reverse DNS fails (common for residential IPv6). Reduce to 1 retry:
first attempt at 3s, retry at 5s (8 seconds total).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
Increase default MAXIMUM_LINKS from 1 to 100
The default class 0 had maxLinks=1, meaning only a single client could
connect when running without a config file (no Y-line/class{} blocks).
Bump to 100 so the ircd is actually usable out of the box.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
IPv6 Phase 3: DNS resolver with AAAA and ip6.arpa support
Update the custom DNS resolver to handle IPv6 addresses:
- Change struct hent.h_addr_list from struct in_addr[] to struct irc_addr[]
- Change ResRQ.addr from struct in_addr to struct irc_addr
- Add T_AAAA record handling in proc_answer()
- Support ip6.arpa nibble-format reverse queries for IPv6 PTR lookups
- Update gethost_byaddr() to take struct irc_addr* instead of char*
- Update cache code (find_cache_number, make_cache, update_list) to use
h_length for address size instead of hardcoded sizeof(struct in_addr)
- Add irc_addr_from_v6(), irc_addr_from_hostent(), irc_addr_raw() helpers
- Replace inetntoa_v4 bridge with cache_addr_str for cached hostent display
- Update all DNS callback sites to use irc_addr_from_hostent()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
IPv6 Phase 2: Dual-stack socket layer
Update inetport() to create AF_INET6 dual-stack listeners (IPV6_V6ONLY=0)
for wildcard and IPv6 bind addresses, accepting both v4 and v6 clients on
a single socket. IPv4-specific bind addresses still use AF_INET.
Switch check_init() and add_connection() from sockaddr_in to
sockaddr_storage so getpeername() works for both address families.
Rewrite connect_inet() to open AF_INET or AF_INET6 sockets based on the
target address family from aconf->ipnum.
Fix gethost_byaddr() call to pass &ip.addr.v4 (not &ip) since the
resolver is still IPv4-only (Phase 3). Remove unused static mysk.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
IPv6 Phase 1: Replace struct in_addr with dual-stack irc_addr abstraction
Introduce struct irc_addr (include/irc_addr.h) that holds either an IPv4
or IPv6 address. Convert Client.ip, ConfItem.ipnum, and aThrottle.ip from
struct in_addr to struct irc_addr throughout the codebase.
Rewrite inetntoa() to use inet_ntop() via irc_addr. Update all call sites
in s_bsd.c, s_conf.c, s_ping.c, s_user.c, s_misc.c, whowas.c, and list.c.
The DNS resolver (res.c) stays IPv4-only internally with an inetntoa_v4()
bridge function for the transition.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
Default compiler optimization to -O2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
Bump version to Serene5.50
Reflects the major modernization work: block-based config format,
compile-time settings migrated to runtime, and zero-config startup.
Also cleans up stale defines from setup.h that are now runtime settings
and fixes broken comment syntax in config.h DPATH/SPATH fallbacks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
Allow ircd to run without ircd.conf using sensible defaults
- Missing config file prints a warning and continues instead of exiting
- Default listen port is 6667 when no me{} block exists
- Auto-inject allow-all block when no allow{} blocks are configured
- Run from current directory instead of requiring DPATH to exist
- Always allow -f flag for specifying config file path
- Make RPL_POLICY (AUP notice) fully runtime-configurable; skip if empty
- Update convert-conf.py to emit network{}, limits{}, and general{}
blocks with Serenity-IRC defaults, and fix F-line to use limits{}
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
Migrate compile-time settings to runtime configuration via ircd.conf
Move network identity, service names, masking hostnames, tuning limits,
and feature toggles from #defines in config.h to runtime globals in
settings.h/settings.c, parsed from network{}, limits{}, and general{}
blocks in ircd.conf. A single binary can now serve different networks
without recompilation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
Switch ircd.conf to block-based configuration format
Replace the legacy colon-delimited config format with a block-based
format using curly braces and key-value pairs. This eliminates the
colon separator conflict with IPv6 addresses and supports multi-value
fields (e.g. multiple hosts in a single kline block).
The connect{} block merges the old C/N/H line triplet into a single
block. The allow{} block replaces I-lines with separate ip and host
keys. All other block types map directly to their legacy equivalents.
Includes a one-time converter script (tools/convert-conf.py) to
migrate existing configs, and a rewritten chkconf validator.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
CLEANUP: Fix wrong, outdated, and irrelevant comments
- Remove leftover debug printf() calls in masking.c (one with
typo /n instead of \n)
- Remove commented-out code: FLAGS_SJOIN, FLAGS_SNICK, UMODE_WEBTV,
hidden[] struct fields, aJinxItem, old initconf(), pv[4] declarations,
debuglevel block in ircd.c, fixme/commented code in s_serv.c
- Remove unused #define debug 1 in s_conf.c
- Fix outdated comments: TSpre7 reference in s_numeric.c, DreamForge
reference in s_ping.c, "KLUDGE to get it work" in s_bsd.c,
"This used to be the case. Now it no longer is." in s_bsd.c,
"Impact? Let's see..." in list.c, "Yuck. Stuck." in packet.c
- Replace misleading comments with accurate descriptions
- Add clarifying comments: hash table compare macro, IRC numeric
parsing, fd remapping on close, server DNS verification
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
CLEANUP: Remove DOMAINNAME-based local client tracking
The ircd tracked "local clients" by matching connected users'
sockhost against *DOMAINNAME, a relic from when IRC servers ran
at universities and tracking same-host users was meaningful.
This is no longer a relevant metric.
Removes:
- lu_lulocal variable and all DOMAINNAME mask matching in
check_lusers(), m_lusers(), and exit_one_client()
- local_count field from current_load_struct and load_entry
- DOMAINNAME define from config.h and setup.h
- The "DOMAINNAME clients" row from userload stats output
Keeps:
- lu_lu / m_client (MyConnect clients = clients connected to this
server) which is the standard IRC "local users" for LUSERS
- All global user counters and max tracking
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
CLEANUP: Convert HUB from compile-time define to runtime config
Hub mode is now configured via ircd.conf using the G: (general
config) line:
G:hub
Default is leaf mode (non-hub) if not set. The setting is
re-evaluated on /rehash, so hub mode can be toggled without
recompiling or restarting the server.
Removes #ifdef HUB / #ifndef HUB from ircd.c, s_serv.c, s_debug.c,
config.h, and setup.h. Adds runtime is_hub global checked in:
- try_connections(): leaf prevents auto-connecting when already linked
- m_server(): leaf rejects incoming server links if already have one
- m_server(): hub sends GLOBOPS on new server link establishment
- m_version(): 'H' serveropts flag shown dynamically based on is_hub
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
CLEANUP: Modernize C from 90s style to current C
- Convert all K&R function definitions to ANSI C prototypes
- Remove register keyword throughout
- Replace bzero/bcopy/bcmp with memset/memcpy/memcmp
- Replace index/rindex with strchr/strrchr
- Remove extern int errno declarations
- Remove PROTO() macro (K&R/ANSI compatibility shim)
- Convert all fake-variadic functions (p1..p8 pattern) to proper
stdarg.h variadics: sendto_one, sendto_prefix_one, sendto_serv_butone,
sendto_channel_butone, sendto_channelops_butone,
sendto_channelvoice_butone, sendto_match_butone, sendto_all_butone,
sendto_common_channels, sendto_channel_butserv, sendto_match_servs,
sendto_ops, sendto_failops, sendto_umode, sendto_failops_whoare_opers,
sendto_locfailops, sendto_opers, sendto_ops_butone, sendto_opers_butone,
sendto_ops_butme, sendto_realops, sendto_SNICK_butone,
sendto_serv_butone_quit, sendto_one_notice, debug, dumpcore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
CLEANUP: Modernize C idioms (register, bzero/bcopy/bcmp, index/rindex, errno)
- Remove 'register' keyword (33 occurrences) — modern compilers ignore it
- Replace bzero/bcopy/bcmp with memset/memcpy/memcmp (110 occurrences)
- Replace index/rindex with strchr/strrchr (85 occurrences)
- Remove 'extern int errno' declarations (3 files) — provided by errno.h
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
CLEANUP: Replace weak RNGs with arc4random, make NOSPOOF unconditional
Replace srand/rand (NOSPOOF seeds) and srand48/lrand48 (DNS query IDs)
with arc4random(), which is cryptographically strong and needs no seeding.
Simplify NOSPOOF anti-spoof challenge: replace the MD5-based construction
(which depended on predictable seeds) with a direct arc4random() call.
Remove NOSPOOF_SEED01/NOSPOOF_SEED02 globals and MD5 dependency.
Make NOSPOOF unconditional — every modern IRC client handles PING-on-connect.
Remove all #ifdef NOSPOOF conditionals across the codebase.
Fix operator precedence bug in res.c where & 0xffff only applied to the
lrand48() result instead of the whole expression.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)]
CLEANUP: Remove obsolete OS/arch code, assume modern POSIX, fix linker errors
Remove support for dead platforms (Apollo, ISC202, OSF/1, PCS/MUNIX,
Windows NT/95, DEC Alpha) and obsolete compatibility shims (K&R prototypes,
VOIDSIG, OPT_TYPE, valloc, sys_errlist, custom strtok/strerror/inet_netof).
Assume POSIX throughout: signals via sigaction, non-blocking via O_NONBLOCK,
standard headers (errno.h, unistd.h, stdlib.h, string.h, stdarg.h),
getrusage for resource stats, lrand48 for random numbers.
Fix pre-existing multiple-definition linker errors by changing bare global
declarations in headers (h.h, common.h) to extern and placing the actual
definitions in ircd.c.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remco Rijnders [Mon, 26 Jan 2026 22:15:56 +0000 (22:15 +0000)]
CLEANUP: Unused UTMP and COMMA defines
Remco Rijnders [Mon, 26 Jan 2026 22:11:02 +0000 (22:11 +0000)]
CLEANUP: remove pyr conditional
Remco Rijnders [Mon, 26 Jan 2026 21:58:07 +0000 (21:58 +0000)]
CLEANUP: Typo fix, very usful
Remco Rijnders [Mon, 26 Jan 2026 21:51:10 +0000 (21:51 +0000)]
CLEANUP: Standardize on uint32_t instead of u_int32_t
Remco Rijnders [Mon, 26 Jan 2026 21:29:27 +0000 (21:29 +0000)]
CLEANUP: Assume syslog.h is in a standard place
Remco Rijnders [Mon, 26 Jan 2026 21:22:24 +0000 (21:22 +0000)]
CLEANUP: Assume stddef.h is always present
Remco Rijnders [Mon, 26 Jan 2026 21:15:37 +0000 (21:15 +0000)]
CLEANUP: PCS, SVR3, DYNIXPTX, sgi, _SEQUENT_ conditionals
Remco Rijnders [Mon, 26 Jan 2026 21:00:57 +0000 (21:00 +0000)]
Update main() declarations and replace exit() calls with return in Config .c files
Remco Rijnders [Mon, 26 Jan 2026 13:47:38 +0000 (13:47 +0000)]
Fix typo in Config script
Remco Rijnders [Thu, 15 Jun 2017 07:37:26 +0000 (09:37 +0200)]
chkconf will now recognise E-lines (CONF_DCCBLOCK) and no longer report an error on them.
Remco Rijnders [Thu, 15 Jun 2017 07:36:46 +0000 (09:36 +0200)]
Remove support for WebTV
Remco Rijnders [Thu, 15 Jun 2017 07:36:23 +0000 (09:36 +0200)]
CLEANUP of struct.h
Remco Rijnders [Wed, 16 Sep 2015 09:49:53 +0000 (11:49 +0200)]
Clean up md5.c function declarations
Remco Rijnders [Wed, 9 Sep 2015 06:41:49 +0000 (08:41 +0200)]
Include git ID in version number, removed patchlevel support
Remco Rijnders [Wed, 9 Sep 2015 05:43:51 +0000 (07:43 +0200)]
Remove VERSION_STAR5II protocol indicator
Remco Rijnders [Tue, 8 Sep 2015 14:08:32 +0000 (16:08 +0200)]
CLEANUP: Rename install script to install.sh
Remco Rijnders [Tue, 8 Sep 2015 14:03:26 +0000 (16:03 +0200)]
CLEANUP: Remove obsolote support for Ultrix, Dynix, and some AIX. Minor cleanups
Remco Rijnders [Tue, 8 Sep 2015 13:55:13 +0000 (15:55 +0200)]
CLEANUP: Remove obsolete Solaris support
Remco Rijnders [Tue, 8 Sep 2015 13:20:17 +0000 (15:20 +0200)]
CLEANUP: Remove obsolete HPUX support
Remco Rijnders [Tue, 8 Sep 2015 13:08:02 +0000 (15:08 +0200)]
CLEANUP: Remove pyr #ifdefs
Remco Rijnders [Tue, 8 Sep 2015 13:04:36 +0000 (15:04 +0200)]
CLEANUP: I don't know what __struct_include__ is, but it's not being used anywhere
Remco Rijnders [Tue, 8 Sep 2015 12:56:19 +0000 (14:56 +0200)]
CLEANUP: I don't know what VMSP is, but it's not being used anywhere
Remco Rijnders [Sat, 7 Dec 2013 11:57:41 +0000 (12:57 +0100)]
Add simple script to check for running ircd in cron
Remco Rijnders [Wed, 20 Nov 2013 10:28:15 +0000 (11:28 +0100)]
Patch so the ircd compiles, even when 'U_TYPES' are not defined
Remco Rijnders [Fri, 7 Jun 2013 16:19:45 +0000 (18:19 +0200)]
When Q-lining a nick, show the pattern it matched to IRC ops online
Remco Rijnders [Sat, 20 Apr 2013 10:08:13 +0000 (12:08 +0200)]
Remove obsoleted doc/INSTALL and doc/conf.doc files, instructions are in
INSTALL now and the example ircd.conf shipped with this project
Remco Rijnders [Sat, 20 Apr 2013 10:02:20 +0000 (12:02 +0200)]
Removal of m4 code, cleanup of obsolete comments
Remco Rijnders [Wed, 14 Nov 2012 05:45:44 +0000 (06:45 +0100)]
Remove seperate handling of o and O lines
Remco Rijnders [Wed, 14 Nov 2012 05:44:03 +0000 (06:44 +0100)]
Clean up old-style parameter declarations for parse.c functions
Remove code which was commented out
Remco Rijnders [Mon, 12 Nov 2012 03:38:18 +0000 (04:38 +0100)]
s/it's/its/ in example.conf documentation
Remco Rijnders [Mon, 12 Nov 2012 03:36:01 +0000 (04:36 +0100)]
s/then/than/ in example.conf documentation
Remco Rijnders [Mon, 12 Nov 2012 03:13:17 +0000 (04:13 +0100)]
Update example.conf to Serene 5.28
Remco Rijnders [Wed, 17 Oct 2012 06:14:03 +0000 (08:14 +0200)]
INSTALL text was several years out of date
Brought it into 2012 :-)
Remco Rijnders [Thu, 23 Aug 2012 05:50:21 +0000 (07:50 +0200)]
Config script would no longer source Options file
Is this due to a change in bash perhaps? By preceeding the file being
sourced with ./ it works again.
Remco Rijnders [Wed, 22 Aug 2012 17:41:43 +0000 (19:41 +0200)]
Clean up old-style parameter declarations for res.c functions
Remco Rijnders [Wed, 22 Aug 2012 16:59:24 +0000 (18:59 +0200)]
Remove list2.c, not sure how it even ended up here
Remco Rijnders [Wed, 22 Aug 2012 16:56:40 +0000 (18:56 +0200)]
Cleaned up some compile time warnings (on casting)
Remco Rijnders [Wed, 22 Aug 2012 16:23:58 +0000 (18:23 +0200)]
inet.h clean up, take two
Remco Rijnders [Wed, 22 Aug 2012 16:17:38 +0000 (18:17 +0200)]
Remove shipped inet.h file and use system version instead
Remco Rijnders [Wed, 22 Aug 2012 15:50:03 +0000 (17:50 +0200)]
I accidentally added the Makefile, boo me.
Remco Rijnders [Wed, 22 Aug 2012 15:42:13 +0000 (17:42 +0200)]
Remove broken legacy resolv code
The IRCD shipped with two versions of its own resolv header files,
as well as a variety of res_*.c helper files. These are all no
longer needed on Linux and have been removed.
A lot of thanks to an anonymous contributor for helping to solve this
long standing issue!
Remco Rijnders [Wed, 15 Feb 2012 19:35:35 +0000 (20:35 +0100)]
Remove unneeded sanity check (according to the compiler)
Remco Rijnders [Wed, 15 Feb 2012 19:29:37 +0000 (20:29 +0100)]
Added function prototype for function sendto_channel_butone
Remco Rijnders [Wed, 15 Feb 2012 19:24:15 +0000 (20:24 +0100)]
Remove unused cconf item
Remco Rijnders [Wed, 15 Feb 2012 18:06:46 +0000 (19:06 +0100)]
Remove support for unsupported OS'es
Remco Rijnders [Wed, 15 Feb 2012 17:55:32 +0000 (18:55 +0100)]
Add function prototype for 'collapse' function in match.c
Remco Rijnders [Wed, 15 Feb 2012 17:46:11 +0000 (18:46 +0100)]
Remove SCO Unix *spits* workarounds
Remco Rijnders [Wed, 15 Feb 2012 17:22:21 +0000 (18:22 +0100)]
- Remove support for unsupported OS'es
- Remove unused cconf items
Remco Rijnders [Wed, 15 Feb 2012 17:19:14 +0000 (18:19 +0100)]
Remove support for unsupported OS'es
Remco Rijnders [Wed, 15 Feb 2012 17:11:10 +0000 (18:11 +0100)]
Remove unused character string
Remco Rijnders [Wed, 15 Feb 2012 11:09:25 +0000 (12:09 +0100)]
Remove support from Makefile for obsolete / no longer supported OS'es
Daniel Drake [Sat, 1 May 2010 08:17:09 +0000 (10:17 +0200)]
Fix compilation on modern Linux platforms.
Other operating systems should function as before, but Linux platforms
running glibc-2.1 or older will probably fail.
(we're talking glibc releases more than 10 years old)
Also fix a 64 bit typing error in the DNS resolution code.
Remco Rijnders [Sun, 5 Jul 2009 06:01:37 +0000 (08:01 +0200)]
Fixed compile time error.
Remco Rijnders [Sun, 5 Jul 2009 05:02:48 +0000 (07:02 +0200)]
Initial import of 'Serene5.28' into git repository.