lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #3168] Handling UDP/TCP PCBs upon netif address change


From: Simon Goldschmidt
Subject: [lwip-devel] [bug #3168] Handling UDP/TCP PCBs upon netif address change.
Date: Sun, 13 May 2007 14:48:02 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Follow-up Comment #12, bug #3168 (project lwip):

>From experimentation on Linux, trying it out with a UDP socket, send() gets
EINVAL if the local IP address that had been bound gets changed.

We can get that by including a check in udp_send() that checks if the
local_ip of the udp pcb (if not is_any) is the same as the ip_addr of the
netif used to send the packet (if not, we return ERR_VAL).

If we then send to the socket/netconn, we get an error ERR_VAL into conn->err
(do_send() has to be modified to catch more errors, see task #6880) that is
translated to EINVAL.

See attached patch for this.

The receive side, however, sits there and waits since there is no new packet
delivered. Jonathan, can you check on linux what happens calling recv() on
such a socket? Or what happens if, during a blocking recv() call, the ip
address gets changed?

(file #12764)
    _______________________________________________________

Additional Item Attachment:

File name: udp_check_local_ip_on_send.patch Size:2 KB


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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