Menu

#96 New Listener option doesn't work with IPv4/IPv6 concurrently

closed-wont-fix
nobody
None
4
2010-10-17
2010-10-14
Brad Smith
No

Ever since 0.90 I cannot get both IPv4 and IPv6 to work concurrently with ZNC. Using the Listener4 option results in a IPv4 socket. Using the Listener6 option results in a IPv6 socket. Listener only provides a IPv6 socket and thus no working IPv4.

Discussion

  • Psychon

    Psychon - 2010-10-14

    znc.conf got:
    Listener = +1235

    $ telnet 127.0.0.1 1235
    Trying 127.0.0.1...
    Connected to 127.0.0.1.

    $ telnet ::1 1235
    Trying ::1...
    Connected to ::1.
    Escape character is '^]'.

    What am I doing "wrong"?

     
  • Psychon

    Psychon - 2010-10-14
    • assigned_to: prozacx --> nobody
    • labels: 707557 -->
    • priority: 5 --> 4
    • status: open --> pending
     
  • Brad Smith

    Brad Smith - 2010-10-14

    znc.conf has..

    Listener = irc_only 6669
    Listener = web_only 8080
    ConnectDelay = 30
    LoadModule = webadmin

    plus a minimal user config.

    $ znc
    [ ok ] Opening Config [/home/bburns/.znc/configs/znc.conf]...
    [ ok ] Binding to port [6669]...
    [ ok ] Binding to port [8080]...
    [ ** ] Loading user [bburns]
    [ ok ] Loading Global Module [webadmin]... [/usr/local/lib/znc/webadmin.so]
    [ ok ] Forking into the background... [pid: 1185]
    [ ** ] ZNC 0.092 - http://znc.sourceforge.net
    $ fstat | grep znc
    bburns znc 1185 text /usr 1091546 -rwxr-xr-x r 1643261
    bburns znc 1185 wd /home 1169280 drwxr-xr-x r 512
    bburns znc 1185 0 / 2671 crw-rw-rw- r null
    bburns znc 1185 1 / 2671 crw-rw-rw- w null
    bburns znc 1185 2 / 2671 crw-rw-rw- w null
    bburns znc 1185 3 /home 1195759 -rw-r--r-- r 182
    bburns znc 1185 4* internet6 stream tcp 0xfffffe809ef8c060 *:6669
    bburns znc 1185 5* internet6 stream tcp 0xfffffe809ef8c900 *:8080

    As you can see. No IPv4 sockets.

    $ telnet -4 localhost 6669
    Trying 127.0.0.1...
    telnet: connect to address 127.0.0.1: Connection refused
    $ telnet -6 localhost 6669
    Trying ::1...
    Connected to localhost.
    Escape character is '^]'.

     
  • Brad Smith

    Brad Smith - 2010-10-14
    • status: pending --> open
     
  • Nobody/Anonymous

    Hm, that works here without any problems.

    It's no problem if fstat or netstat show znc as only listening on a ipv6 port, one can configure an ipv6 port so that it also accepts ipv4 connections. At least I thought so. :-(

    Which operating system is this?

     
  • Brad Smith

    Brad Smith - 2010-10-17

    No. What you said is an assumption. The only portable and proper way of supporting both address families is to open a socket for each.

    OS: OpenBSD.

     
  • Nobody/Anonymous

    This is done via explicitly setting IPV6_V6ONLY to the "right" value. AFAIK this socket option is even proposed in some RFC. The only OS I know where this doesn't work is old versions of windows (XP is the first release which supports this socket option).

    I'll see if I can found an openbsd shell to reproduce this.

     
  • Brad Smith

    Brad Smith - 2010-10-17

    No. That does not work with OpenBSD. There is intentionally no support for v4-mapped addresses.

     
  • Psychon

    Psychon - 2010-10-17
    • status: open --> closed-wont-fix
     
  • Psychon

    Psychon - 2010-10-17

    Closing as Wont Fix, but will add a warning when IPV6_V6ONLY is missing. Work-around is using "Listen4" and "Listen6" instead.

     

Log in to post a comment.