mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
IPv6 fixes. Everything now keeps both v4 and v6 addresses in memory and
at connect() time it's decided which one should be used. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1334 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
5afb3c1454
commit
4c7b07ed3f
21 changed files with 216 additions and 127 deletions
|
|
@ -362,6 +362,8 @@ static void sig_chat_connected(CHAT_DCC_REC *dcc)
|
|||
|
||||
static void dcc_chat_connect(CHAT_DCC_REC *dcc)
|
||||
{
|
||||
IPADDR *own_ip;
|
||||
|
||||
g_return_if_fail(IS_DCC_CHAT(dcc));
|
||||
|
||||
if (dcc->addrstr[0] == '\0' ||
|
||||
|
|
@ -370,8 +372,8 @@ static void dcc_chat_connect(CHAT_DCC_REC *dcc)
|
|||
return;
|
||||
}
|
||||
|
||||
dcc->handle = net_connect_ip(&dcc->addr, dcc->port,
|
||||
source_host_ok ? source_host_ip : NULL);
|
||||
own_ip = IPADDR_IS_V6(&dcc->addr) ? source_host_ip6 : source_host_ip4;
|
||||
dcc->handle = net_connect_ip(&dcc->addr, dcc->port, own_ip);
|
||||
if (dcc->handle != NULL) {
|
||||
dcc->tagconn = g_input_add(dcc->handle,
|
||||
G_INPUT_WRITE | G_INPUT_READ,
|
||||
|
|
|
|||
|
|
@ -212,14 +212,15 @@ static void sig_dccget_connected(GET_DCC_REC *dcc)
|
|||
|
||||
void dcc_get_connect(GET_DCC_REC *dcc)
|
||||
{
|
||||
IPADDR *own_ip;
|
||||
|
||||
if (dcc->get_type == DCC_GET_DEFAULT) {
|
||||
dcc->get_type = settings_get_bool("dcc_autorename") ?
|
||||
DCC_GET_RENAME : DCC_GET_OVERWRITE;
|
||||
}
|
||||
|
||||
|
||||
dcc->handle = net_connect_ip(&dcc->addr, dcc->port,
|
||||
source_host_ok ? source_host_ip : NULL);
|
||||
own_ip = IPADDR_IS_V6(&dcc->addr) ? source_host_ip6 : source_host_ip4;
|
||||
dcc->handle = net_connect_ip(&dcc->addr, dcc->port, own_ip);
|
||||
if (dcc->handle != NULL) {
|
||||
dcc->tagconn =
|
||||
g_input_add(dcc->handle,
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ void dcc_ip2str(IPADDR *ip, char *host)
|
|||
{
|
||||
unsigned long addr;
|
||||
|
||||
if (is_ipv6_addr(ip)) {
|
||||
if (IPADDR_IS_V6(ip)) {
|
||||
/* IPv6 */
|
||||
net_ip2host(ip, host);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue