Package: nacl-tools
Version: 20110221-4.1
Severity: important

Dear Maintainer,

I would like to report bug in nacl-tools.
socket_bind library does'n correctly setup PF_INET flag for socket.

How to reproduce:
curvecpserver -v this.machine.name serverkey 127.0.0.1 10000 
31415926535897932384626433832795 curvecpmessage cat /usr/share/dict/words
curvecpserver: fatal: unable to bind socket: address family not supported

The fix is simple:

diff -Nur nacl-20110221.orig/curvecp/socket_bind.c 
nacl-20110221/curvecp/socket_bind.c
--- nacl-20110221.orig/curvecp/socket_bind.c    2012-06-27 16:48:27.877207880 
+0200
+++ nacl-20110221/curvecp/socket_bind.c 2012-06-27 16:50:10.393710544 +0200
@@ -9,6 +9,7 @@
 {
   struct sockaddr_in sa;
   byte_zero(&sa,sizeof sa);
+  sa.sin_family = PF_INET;
   byte_copy(&sa.sin_addr,4,ip);
   byte_copy(&sa.sin_port,2,port);
   return bind(fd,(struct sockaddr *) &sa,sizeof sa);

-- System Information:
Debian Release: 8.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages nacl-tools depends on:
ii  libc6  2.19-18+deb8u3

nacl-tools recommends no packages.

nacl-tools suggests no packages.

-- no debconf information

Reply via email to