[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

working with UDP sockets



Hi guys,

If this isn't the right list for this question, please
point me to a better place.

I compiled a piece of code on OpenBSD 3.3 and on 3.4,
successfully.  The code attempts to connect to a UDP
port on a remote host.  From the linux boxes it works
just fine.  From the obsd boxes, I get the following
ktrace snippet:

  23414 cvm-testclient CALL  sigprocmask(0x3,0)
  23414 cvm-testclient RET   sigprocmask -65793/0xfffefeff
  23414 cvm-testclient CALL  connect(0x3,0xcfbf8684,0x10)
  23414 cvm-testclient RET   connect 0
  23414 cvm-testclient CALL  sigprocmask(0x1,0xffffffff)
  23414 cvm-testclient RET   sigprocmask 0
  23414 cvm-testclient CALL  mprotect(0x3c002000,0x1000,0x3)
  23414 cvm-testclient RET   mprotect 0
  23414 cvm-testclient CALL  mprotect(0x3c002000,0x1000,0x1)
  23414 cvm-testclient RET   mprotect 0
  23414 cvm-testclient CALL  sigprocmask(0x3,0)
  23414 cvm-testclient RET   sigprocmask -65793/0xfffefeff
  23414 cvm-testclient CALL  
sendto(0x3,0x3c003440,0x15,0,0xcfbf8634,0x10)
  23414 cvm-testclient RET   sendto -1 errno 56 Socket is already 
connected
  23414 cvm-testclient CALL  sigprocmask(0x1,0xffffffff)
  23414 cvm-testclient RET   sigprocmask 0

tcpdump shows no attempt to connect

the c code to create the socket is simply:
my_sock = socket(AF_INET, SOCK_DGRAM, 0);

is there something I should be aware of?

PS: I get the same problem even if I run the
native Linux code on oBsd.

Cheers,
	Balázs

http://www.thenewpush.com