[Serusers] Error using TCP

Andrei Pelinescu-Onciul andrei at iptel.org
Tue Aug 30 15:28:54 CEST 2005


On Aug 23, 2005 at 12:52, Federico Giannici <giannici at neomedia.it> wrote:
> I'm using SER 0.9.3 with OpenBSD 3.7 amd64.
> 
> Everything works correctly if I use normal UDP connections.
> 
> Now I have to use a TCP connection (UDP is blocked in that network).
> Using ngrep I see SER receives the requests ma no reply is sent.
> The following errors are logged:
> 
> Aug 23 12:48:06 eowyn /usr/local/sbin/ser[16406]: ERROR: send_fd: 
> sendmsg failed on 19: Invalid argument
> Aug 23 12:48:06 eowyn /usr/local/sbin/ser[16406]: ERROR: send2child: 
> send_fd failed
> Aug 23 12:48:06 eowyn /usr/local/sbin/ser[16406]: ERROR: tcp_main_loop: 
> no children available


It seems there is a problem in the send_fd function which is triggered
only on 64bit openbsd (it works on 32 bit openbsd 3.7 and 64 bit
linux or netbsd).
Unfortunately I don't have access to a 64 bit openbsd system so I can't
test it myself.

I've attached a small patch. Could you apply it 
(patch -p0 <send_fd-test.patch) and try again?


Andrei
-------------- next part --------------
Index: pass_fd.c
===================================================================
RCS file: /cvsroot/ser/sip_router/pass_fd.c,v
retrieving revision 1.7
diff -u -r1.7 pass_fd.c
--- pass_fd.c	28 Sep 2004 18:10:08 -0000	1.7
+++ pass_fd.c	30 Aug 2005 13:26:14 -0000
@@ -102,7 +102,7 @@
 	}control_un;
 	
 	msg.msg_control=control_un.control;
-	msg.msg_controllen=sizeof(control_un.control);
+	msg.msg_controllen=CMSG_LEN(sizeof(fd)) /*sizeof(control_un.control)*/;
 	
 	cmsg=CMSG_FIRSTHDR(&msg);
 	cmsg->cmsg_level = SOL_SOCKET;


More information about the sr-users mailing list