lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #54315] IPV6_V6ONLY socket accepts IPV4 connections


From: Joan Lledó
Subject: [lwip-devel] [bug #54315] IPV6_V6ONLY socket accepts IPV4 connections
Date: Sun, 15 Jul 2018 12:16:56 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

URL:
  <http://savannah.nongnu.org/bugs/?54315>

                 Summary: IPV6_V6ONLY socket accepts IPV4 connections
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: jllledo
            Submitted on: Sun 15 Jul 2018 06:16:55 PM CEST
                Category: IPv6
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

Hello,

I observed a strange behaviour on a socket that has the option IPV6_V6ONLY
enabled.

I follow these steps:

        1.- Create an IPV6 only socket listening on ::
        2.- Create an IPV4 socket listening on 0.0.0.0
        3.- Call select() on both sockets
        4.- From another terminal, run netcat and connect using an IPV4 address

Result:
        The IPV6 only socket is being awaken by the stack, it shouldn't since 
it's
not supposed to listen to IPV4 connections.

Attached is a test program. When I run it using lwip stack & sockets API, it
prints:
        New IPV6 connection , socket fd is 2 , ip is : 192.168.30.1 , port : 
34588

But when I run it using glibc and the linux stack, I see this:
        New IPV4 connection , socket fd is 5 , ip is : 192.168.30.1 , port : 
56504 

Which is the behaviour I assume is correct.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 15 Jul 2018 06:16:55 PM CEST  Name: select6.c  Size: 8KiB   By:
jllledo

<http://savannah.nongnu.org/bugs/download.php?file_id=44560>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?54315>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]