Project

General

Profile

Bug #355

Invalid PONG response

Added by Neckara Neckara almost 6 years ago. Updated almost 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
Start date:
2014-11-07
Due date:
% Done:

0%

Estimated time:
1:00 h
Patch Available:
No
Found in Versions:
0.8.9
Confirmed:
Yes
Branch:
Security:
Help Needed:
Yes

Description

Hello,

I use bip from the Debian Jessie package (0.8.9, I tried also which the Repo version).
Each time my IRC client send a PING request :

"PING _1415376678828"

I get this response :
":127.0.0.1 PONG _1415376678828" instead of ":127.0.0.1 PONG 127.0.0.1 :_1415376678828" others IRC server can send me.
Indeed, the RFC ( https://tools.ietf.org/html/rfc2812#section-3.7.3 or https://tools.ietf.org/html/rfc1459#section-4.6.3 ) says PONG has as for parameters <server> [<server>].

Each 2-3 minutes, I get disconnected few seconds after the client's PING request.
In the bip logs I have :

07-11-2014 06:47:20 ERROR: read(fd=7): Connection lost: Connection timed out
07-11-2014 06:47:20 ERROR: Error while reading on fd 7
07-11-2014 06:47:20 ERROR: client read_lines error, closing...
07-11-2014 06:50:07 ERROR: read(fd=7): Connection lost: Connection timed out
07-11-2014 06:50:07 ERROR: Error while reading on fd 7
07-11-2014 06:50:07 ERROR: client read_lines error, closing...
[...]
07-11-2014 17:06:48 ERROR: read(fd=5): Connection lost: Resource temporarily unavailable
07-11-2014 17:06:48 ERROR: Error while reading on fd 5
07-11-2014 17:06:48 ERROR: client read_lines error, closing...
07-11-2014 17:09:19 ERROR: read(fd=5): Connection lost: Resource temporarily unavailable
07-11-2014 17:09:19 ERROR: Error while reading on fd 5
07-11-2014 17:09:19 ERROR: client read_lines error, closing...
07-11-2014 17:12:01 ERROR: read(fd=5): Connection lost: Resource temporarily unavailable
07-11-2014 17:12:01 ERROR: Error while reading on fd 5
07-11-2014 17:12:01 ERROR: client read_lines error, closing...
07-11-2014 17:12:45 ERROR: read(fd=6): Connection lost: Resource temporarily unavailable
07-11-2014 17:12:45 ERROR: Error while reading on fd 6
07-11-2014 17:12:45 ERROR: client read_lines error, closing...

Can you do something about that ?

Cordially,
Neckara


Related issues

Is duplicate of Bip - Bug #192: using "hide ping pong event" in mIRC doesn't work with bipFeedback2011-02-09

Actions

History

#1

Updated by Neckara Neckara almost 6 years ago

I think the problem is in https://projects.duckcorp.org/projects/bip/repository/revisions/master/entry/src/irc.c

In irc_dispatch_client (line 1112) or in irc_dispatch_server (line 367).

#2

Updated by Pierre-Louis Bonicoli almost 6 years ago

Which IRC client do you use ? Could you indicate an IRC server used ?

#3

Updated by Pierre-Louis Bonicoli almost 6 years ago

  • Description updated (diff)
#4

Updated by Neckara Neckara almost 6 years ago

Hello I use Icedove (Thunderbird) as IRC Client and inspircd as IRC server.

I try with Quakenet servers, they send :
PING _1415378784294
:underworld1.no.quakenet.org PONG underworld1.no.quakenet.org :_1415378784294

#5

Updated by Neckara Neckara almost 6 years ago

Seems to be the same bug than #192 : https://projects.duckcorp.org/issues/192

#6

Updated by Neckara Neckara almost 6 years ago

To fix the bug, replace the line 1112 in the file /src/irc.c :
WRITE_LINE1(CONN, link_name((struct link_any *)ic), "PONG", irc_line_elem(line, 1));

By :
/** begin */

size_t offset =  strlen("PONG");
char * command = malloc( offset + 1 + strlen(link_name((struct link_any *)ic)) + 1 );
strcpy(command, "PONG");
command[offset++] = ' ';
strcpy(command + offset, link_name((struct link_any *)ic) );
char * param = malloc( strlen(irc_line_elem(line, 1)) + 1 + 1);
param[0] = ':';
strcpy(param + 1, irc_line_elem(line, 1));
WRITE_LINE1(CONN(ic), link_name((struct link_any * )ic), command, param);
free(param);
free(command);
/** end */

I think there is a way more "correct" with your functions but I don't know your API very well and the code isn't really readable.

#7

Updated by Marc Dequènes almost 6 years ago

  • Is duplicate of Bug #192: using "hide ping pong event" in mIRC doesn't work with bip added

Also available in: Atom PDF