Package: netcat-openbsd
Version: 1.105-7
Severity: normal
Tags: upstream

Dear Maintainer,

I was toying around with some TCP/IP code, trying to implement an IPv6
server (on the local machine only - I don't have any special hardware) and using
netcat for the client end. I was surprised to see that my code never
gained control after calling poll() in the IPv6 version. The IPv4
version worked as expected. I let strace loose on netcat and
found this excerpt which seems to be relevant:

$ strace nc.openbsd -6 fe80::e269:95ff:feb1:8b09 1088
[ ... many lines elided ... ]
socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP) = 3
fcntl(3, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
connect(3, {sa_family=AF_INET6, sin6_port=htons(1088),
inet_pton(AF_INET6, "fe80::e269:95ff:feb1:8b09", &sin6_addr), sin6_flowinfo=0, 
sin6_scope_id=0}, 28) = -1 EINVAL (Invalid argument)
fcntl(3, F_SETFL, O_RDWR)               = 0
close(3)                                = 0
close(4294967295)                       = -1 EBADF (Bad file descriptor)
exit_group(1)                           = ?

Hence, there doesn't seem to be a problem with the server-side code.
However, no error is displayed on the screen on the part of netcat -
so it would seem, if nothing else, that there is an error handling
problem with netcat.

Best regards

Lars



*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages netcat-openbsd depends on:
ii  libbsd0  0.6.0-2
ii  libc6    2.19-13

netcat-openbsd recommends no packages.

netcat-openbsd suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to