Convert irc_in_addr_* to macros. Add test program for that code. Fix
[ircu2.10.12-pk.git] / ChangeLog
index 4c477827d43cef10a1600e4a00ea7c48bd9e8efe..c5053faa129a1eb8a587e00d4bb05fd557528b4e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,292 @@
+2004-12-28  Michael Poole <mdpoole@troilus.org>
+
+       * include/res.h: Implement irc_in_addr_* as macros.
+
+       * ircd/ircd_res.c: Remove the function bodies.
+
+       * ircd/ircd_string.c (irc_in_addr_is_ipv4): Remove body.
+       (ircd_ntoa_r): Do not append extra ':' when unparsing 0::.
+       (ircd_aton): Accept IPv6 addresses with all eight segments
+       specified (e.g. 0:0:0:0:0:0:0:0).  Correctly parse addresses
+       with IPv4 bits at the end (e.g. ::FFFF:127.0.0.1).
+
+       * ircd/test/ircd_in_addr_t.c, ircd/test/test_stub.c: New files.
+
+       * ircd/test/Makefile: Convert to Makefile.in for proper VPATH
+       support.  Add test_stub.c and ircd_in_addr_t.c references.
+
+       * configure.in: Generate ircd/test/Makefile as an output file.
+
+       * configure: Update.
+
+2004-12-18  Michael Poole <mdpoole@troilus.org>
+
+       * include/client.h: Move unreg, privs, capab and active fields
+       from struct Client to struct Connection since that is how they
+       are really associated.  Adjust macros to match.
+       (SetPriv, ClrPriv): New macros.
+
+       * ircd/client.c (client_set_privs): Exit earlier for remote
+       clients.  Adjust macro use to correspond.
+
+       * ircd/m_server.c (mr_server): Grant all privileges except
+       PRIV_SET to peer servers.
+
+2004-12-18  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/s_user.c (hide_hostmask): Add a missing "break;" to fix bug
+       #1087461.
+
+2004-12-18  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/engine_kqueue.c (engine_loop): Remove an assertion that the
+       socket's FD is the same after processing as it was before; local
+       clients apparently have s_fd() == -1 after close.
+
+2004-12-18  Kevin L Mitchell  <klmitch@mit.edu>
+
+       * ircd/s_user.c: make absolutely certain register_user() is never
+       called with cli_unreg non-zero; transition set_nick_name() over to
+       the new way of determining whether client is ready for
+       register_user()
+
+       * ircd/s_err.c: add ERR_UNKNOWNCAPCMD for reporting failure to
+       understand a given CAP subcommand
+
+       * ircd/parse.c: add "CAP" command
+
+       * ircd/m_user.c (m_user): transition over to new way of
+       determining whether client is ready for register_user()
+
+       * ircd/m_pong.c (mr_pong): transition over to new way of
+       determining whether client is ready for register_user()
+
+       * ircd/m_cap.c: implementation of the IRC capabilities draft
+
+       * ircd/list.c (make_client): initialize cli_unreg element of
+       client structure
+
+       * ircd/ircd_string.c: correct old bugs in ircd_strn?cmp()
+       functions that were never found because cross-case ordering has
+       not been needed until now
+
+       * ircd/Makefile.in: add m_cap.c to list of .c files
+
+       * include/numeric.h (ERR_UNKNOWNCAPCMD): define new error reply to
+       indicate an unknown CAP subcommand
+
+       * include/msg.h: add "CAP" command
+
+       * include/handlers.h: add m_cap() to list of handlers
+
+       * include/client.h: add support for client capabilities; rototill
+       the registration mechanism to dovetail well with the capability
+       system--i.e., allow the capability system to suspend registration
+       if the user issues one of the CAP commands
+
+       * include/capab.h: header file to define client capabilities
+
+2004-12-17  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/channel.h (apply_ban): Add new flag to indicate whether
+       newban should be free()'d after it is used.
+
+       * ircd/channel.c (apply_ban): Likewise.  Also set BAN_DEL flag
+       when setting BAN_OVERLAPPED, and free newban when BAN_DEL.
+       (mode_parse_ban): Delete buggy shortcut when channel banlist is
+       empty.
+       (mode_process_bans): Always give ownership of ban->banstr to the
+       mode buffer, avoiding a memory leak.
+
+       * ircd/m_silence.c (apply_silence): Pass new parameter to
+       apply_ban.
+
+2004-12-17  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/channel.c (sub1_from_channel): Immediately destroy
+       non-Apass channels when oplevels are enabled; otherwise, they can
+       stay opless for a considerable period.
+       (mode_parse_ban): Initialize banstr to NULL so that set_ban_mask()
+       does not try to free() an invalid pointer.
+
+       * ircd/ircd_parser.y (uworldblock): Put UWorld server name into
+       aconf->host, not aconf->name.
+
+       * ircd/m_server.c (mr_server, ms_server): Attach CONF_UWORLD items
+       by host here..
+
+       * ircd/s_conf.c (conf_check_server): .. rather than by name here.
+       (attach_conf_uworld): New function to attach CONF_UWORLD items.
+       (rehash): Use attach_conf_uworld() instead of attaching by name.
+
+2004-12-15  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/m_topic.c (do_settopic): Allow +k services to set topics on
+       channels they are not joined.
+
+2004-12-15  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/IPcheck.c (IPTargetEntry): Make count unsigned to squash
+       warning.
+       (ip_registry_canonicalize): New function to convert an IP address
+       into a canonical form for clone checks.
+       (ip_registry_hash): Update to reflect canonical form.
+       (ip_registry_find): Use ip_registry_canonicalize().
+       (ip_registry_check_local, ip_registry_check_remote): Likewise.
+
+       * ircd/numnicks.c (iptobase64): Map 6to4 addresses to IPv4 when
+       sending them to a non-IPv6 server.
+
+2004-02-17  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/s_user.c (hide_hostmask): Preserve user's visibility in a
+       +D channel when they hide their hostmask.
+
+2004-12-15  Michael Poole <dmpoole@troilus.org>
+
+       * doc/example.conf: Remove the example Server blocks since they
+       are no longer used (were merged into Connect).
+
+       * ircd/ircd_res.c (restart_resolver): Fix typo in previous commit.
+
+       * ircd/m_server.c (check_loop_and_lh): Use a different argument to
+       test whether an introduced server is directly connected or not.
+
+2004-12-14  Michael Poole <mdpoole@troilus.org>
+
+       * include/client.h (FLAG_IPV6): New value for enum Flag.
+       (IsIPv6, SetIPv6): Accessor macros for it.
+
+       * include/numnicks.h (iptobase64): Add flag indicating whether to
+       use full IPv6 addresses or fake them in an IPv4-compatible way.
+
+       * ircd/numnicks.c (iptobase64): Use the new flag.
+
+       * include/send.h (sendcmdto_flag_serv_butone): New function to
+       send different lines to servers based on flags (like FLAG_IPV6).
+
+       * ircd/send.c (sendcmdto_flag_serv_butone): Implement it.
+
+       * ircd/s_bsd.c (completed_connection): Advertise IPv6 support in
+       our server flags.
+
+       * ircd/s_serv.c (server_estab): Likewise.  Also make sure we send
+       compatible IP addresses for the new server.
+
+       * ircd/s_user.c (register_user): Only send full IPv6 addresses to
+       links that have FLAG_IPV6 set.
+
+2004-12-13  Michael Poole <mdpoole@troilus.org>
+
+       * doc/example.conf: Update General block comment to mention
+       new RESOLVER option and to explain IPv6 support.
+
+       * ircd/ircd_lexer.l: Recognize RESOLVER token.
+
+       * ircd/ircd_parser.y: Declare RESOLVER token and use it in an
+       alternative for generalitem.
+
+       * ircd/ircd_res.c: Define global ResolverAddr variable.  If it is
+       valid, use it instead of VirtualHost in restart_resolver().
+
+2004-12-13  Michael Poole <mdpoole@troilus.org>
+
+       * doc/example.conf: Update configuration to move Client block
+       comment after sample Class blocks, and update entries in it.
+
+       * ircd/ircd_lexer.y: Recognize IP and USERNAME tokens.
+
+       * ircd/ircd_parser.y: Add ip and username global variables and IP
+       and USERNAME tokens.  Add clientip and clientusername alternatives
+       for clientitem, and update clientblock to correspond.
+
+       * ircd/ircd_res.c (delete_resolver_queries): Do not try to walk
+       the request_list before request_list is initialized.
+       (cres_mem): Likewise.
+
+       * ircd/os_generic.c (sockaddr_from_irc): Improve guessing of
+       proper address family.
+
+       * ircd/s_conf.c (attach_iline): Allow aconf->host == NULL, which
+       means DNS reply is optional.  If aconf->addrbits >= 0, test it.
+
+       * tools/crypter: Delete.
+
+2004-12-11  Kevin L Mitchell  <klmitch@mit.edu>
+
+       * ircd/*.c: use new assert() in ircd_log.h in preference to system
+       assert()
+
+       * ircd/umkpasswd.c: use new assert in ircd_log.h; add necessary
+       glue so that umkpasswd will successfully compile and link
+
+       * ircd/test/ircd_chattr_t.c: comment out include of assert.h since
+       there are no calls to assert()
+
+       * ircd/ircd_log.c: add sentinel (log_inassert) to prevent assert()
+       from looping should there be an assertion failure somewhere in the
+       logging subsystem
+
+       * include/ircd_log.h: custom implementation of assert() that calls
+       log_write()
+
+2004-11-21  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/channel.c (mode_parse_upass): Allow forced mode changes to
+       be done by non-channel-managers, fixing a crash from OPMODE.
+       (mode_parse_apass): Likewise.
+
+2004-11-20  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/m_create.c (ms_create): Complain if a user tries to CREATE
+       a channel they are already in, but do not add them again.
+
+2004-11-09  Michael Poole <mdpoole@troilus.org>
+
+       * include/res.h (init_resolver): Delete, and initialize lazily.
+
+       * ircd/ircd.c (main): Do not call init_resolver().
+
+       * ircd/ircd_res.c (restart_resolver): Use default VirtualHost for
+       local resolver socket address.
+       (init_resolver): Delete.
+       (make_request): Call restart_resolver() if necessary.
+       (query_name): Use ircrandom() instead of rand().
+
+       * ircd/os_generic.c (sockaddr_from_irc): Convert last argument to
+       a file descriptor that indicates the socket family to use.
+       (os_sendto_nonb,os_socket,os_connect_nonb): Update to match.
+
+2004-11-09  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/engine_epoll.c (engine_delete): Do not attempt to remove a
+       socket from epoll on delete, since the kernel does that for us.
+
+2004-11-07  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/m_server.c (m_server, ms_server): Assign timestamp before
+       it might be used in exit_new_server().
+
+2004-11-07  Michael Poole <mdpoole@troilus.org>
+
+       * aclocal.m4, config.h.in, configure, ircd/Makefile.in: Regenerate
+       to reflect the changes since these files' last rebuild.
+
+2004-11-07  Michael Poole <mdpoole@troilus.org>
+
+       * include/ircd_crypt.h (ircd_crypt): This should return char*, not
+       const char*, since it does not own the returned pointer.
+
+       * ircd/ircd_crypt.c (ircd_crypt): Change return type.
+
+       * ircd/ircd_crypt_smd5.c (irc_crypt_smd5): Make passwd a static
+       field since it is returned but this function must own the buffer.
+
+       * ircd/m_oper.c (oper_password_match): Free the string returned by
+       ircd_crypt().
+
+       * ircd/engine_epoll.c (engine_loop): Fix a memory leak.
+
 2004-11-07  Michael Poole <mdpoole@troilus.org>
 
        * acinclude.m4: Look for a 64-bit integer type.