]> jfr.im git - solanum.git/blobdiff - ircd/authproc.c
Add ipv4-in-ipv6 logic to check_one_kline
[solanum.git] / ircd / authproc.c
index 00fec3e0d1def6d0110da2388a431eb31370373b..e1545bfc8e6e254c931870e17d169dc0b7eac89a 100644 (file)
@@ -275,13 +275,13 @@ parse_authd_reply(rb_helper * helper)
        ssize_t len;
        int parc;
        char buf[READBUF_SIZE];
-       char *parv[MAXPARA + 1];
+       char *parv[MAXPARA];
 
        while((len = rb_helper_read(helper, buf, sizeof(buf))) > 0)
        {
                struct authd_cb *cmd;
 
-               parc = rb_string_to_array(buf, parv, MAXPARA+1);
+               parc = rb_string_to_array(buf, parv, sizeof(parv));
                cmd = &authd_cmd_tab[(unsigned char)*parv[0]];
                if(cmd->fn != NULL)
                {
@@ -335,11 +335,9 @@ configure_authd(void)
                        rb_helper_write(authd_helper, "O opm_listener %s %hu",
                                opm_listeners[LISTEN_IPV4].ipaddr, opm_listeners[LISTEN_IPV4].port);
 
-#ifdef RB_IPV6
                if(opm_listeners[LISTEN_IPV6].ipaddr[0] != '\0')
                        rb_helper_write(authd_helper, "O opm_listener %s %hu",
                                opm_listeners[LISTEN_IPV6].ipaddr, opm_listeners[LISTEN_IPV6].port);
-#endif
 
                RB_DLINK_FOREACH(ptr, opm_list.head)
                {
@@ -387,9 +385,6 @@ authd_abort_client(struct Client *client_p)
 static void
 restart_authd_cb(rb_helper * helper)
 {
-       rb_dictionary_iter iter;
-       struct Client *client_p;
-
        iwarn("authd: restart_authd_cb called, authd died?");
        sendto_realops_snomask(SNO_GENERAL, L_ALL, "authd: restart_authd_cb called, authd died?");
 
@@ -479,7 +474,12 @@ authd_initiate_client(struct Client *client_p, bool defer)
        /* Add a bit of a fudge factor... */
        client_p->preClient->auth.timeout = rb_current_time() + ConfigFileEntry.connect_timeout + 10;
 
-       rb_helper_write(authd_helper, "C %x %s %hu %s %hu", authd_cid, listen_ipaddr, listen_port, client_ipaddr, client_port);
+       rb_helper_write(authd_helper, "C %x %s %hu %s %hu %x", authd_cid, listen_ipaddr, listen_port, client_ipaddr, client_port,
+#ifdef HAVE_LIBSCTP
+               IsSCTP(client_p) ? IPPROTO_SCTP : IPPROTO_TCP);
+#else
+               IPPROTO_TCP);
+#endif
 }
 
 static inline void