patchlwIP - A Lightweight TCP/IP stack - Patches: patch #7906, Broadcast handling and UDP port...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7906: Broadcast handling and UDP port binding for multiple phy in same subnet

Submitter:  Nick van IJzendoorn <dipswitch_>
Submitted:  Fri 21 Dec 2012 10:47:51 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Wont Do Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Fri 21 Dec 2012 04:18:46 PM UTC, comment #2: 

a) This is a duplicate to bug #34683!
b) Like Kieran already said in that bug: Supporting multiple netifs on the same subnet is one of those things that we're happy for lwIP not to support to keep it lightweight.

Simon Goldschmidt <goldsimon>
Group administrator
Fri 21 Dec 2012 10:57:29 AM UTC, comment #1: 

Can't talk about the subject itself, but your patch should be a "diff -Nru" patch so that it can be applied with a merging algorithm.

Sylvain Rochet <gradator>
Group Member
Fri 21 Dec 2012 10:47:51 AM UTC, original submission:  

Currently we are working on a device which has two interfaces in the same subnet.

We noticed that if an UDP broadcast message was received while both connections are alive to the same subnet the broadcast will be routed to the first interface and never to the socket where the socket was bound on.
This would be wrong in my opinion since if a socket is bound to a specific address it should not receive the message of the other interface.

Another problem we noticed, was that when you bind the socket to a specific address, the ip_route function would not take this into account, which results in selecting of the first available route for the given packet. Later in the function udp_sendto_if_chksum the packet would be dropped since the source address would not match the interface address.

Hereby I send the patch written for LwIP v1.4.0. I don't know if it would break any other functionality but I think this should be the right way the packets should be handled.

Kind regards,
Nick

Nick van IJzendoorn <dipswitch_>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #27137:  dual-phy-udp-patch.patch added by dipswitch_ (5KiB - application/octet-stream - unified format)
file #27136:  dual-phy-same-subnet.patch added by dipswitch_ (1KiB - application/octet-stream - Patch was the wrong way...)
file #27135:  dual-phy-same-subnet.patch added by dipswitch_ (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by gradator (Posted a comment)
  • -email is unavailable- added by dipswitch_ (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-12-21 goldsimon StatusNone Wont Do
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2012-12-21 dipswitch_ Attached File- Added dual-phy-udp-patch.patch, #27137
    2012-12-21 dipswitch_ Attached File- Added dual-phy-same-subnet.patch, #27136
    2012-12-21 dipswitch_ Attached File- Added dual-phy-same-subnet.patch, #27135

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code