[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #41700] Call to tcp_listen_dual() should not accept IP
From: |
Drew Stebbins |
Subject: |
[lwip-devel] [bug #41700] Call to tcp_listen_dual() should not accept IPv4 listen PCB args |
Date: |
Tue, 25 Feb 2014 22:38:53 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36 |
URL:
<http://savannah.nongnu.org/bugs/?41700>
Summary: Call to tcp_listen_dual() should not accept IPv4
listen PCB args
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: astebbin
Submitted on: Tue 25 Feb 2014 10:38:52 PM GMT
Category: TCP
Severity: 3 - Normal
Item Group: Faulty Behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: 1.3.1
_______________________________________________________
Details:
tcp_listen_dual() should fail and return NULL when its pcb arg is IPv4-only.
Currently, tcp_listen_dual() will incorrectly make lwip listen for IPv4 OR
IPv6 connections to a given IPv4-only PCB, disregarding this PCB's 'isipv6'
value of 0.
Allowing IPv4 listen PCBs to accept IPv6 connections also has the side-effect
of decrementing pending_accepts on the wrong PCB in tcp_pcb_purge(), in the
case where an IPv6 listen PCB is bound to the same port. This is because
tcp_pcb_purge() matches its active PCB arg to its listen PCB parent with a
by-value comparison. The active PCB which was created to handle the IPv4
listen PCB's accepted connection has isipv6 == 1, whereas its listen PCB
parent has isipv6 == 0. This causes tcp_pcb_purge() to decrement
pending_accepts for the wrong listen PCB, in some cases wrapping this field
around to its maximum value.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?41700>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #41700] Call to tcp_listen_dual() should not accept IPv4 listen PCB args,
Drew Stebbins <=