buglwIP - A Lightweight TCP/IP stack - Bugs: bug #17200, UDP not receiving broadcast subnet

 
 

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

bug #17200: UDP not receiving broadcast subnet

Submitter:  Tim Curran <tgcmn>
Submitted:  Tue 25 Jul 2006 12:28:16 PM UTC
   
 
Category:  UDP Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Faulty Behaviour
Status:  Fixed Privacy:  Public
Assigned to:  christiaans Open/Closed:  Closed
Planned Release:  None lwIP version:  None

Discussion

Thu 17 Aug 2006 09:44:17 AM UTC, comment #1: 

Not precisely correct, a closing bracket is misplaced.
Don't accept any port for a broadcast ip,
but this specific port and broadcast ip.

It puzzled me since broadcast recvs did work for me
but you probably bound your pcb to a local address
instead of IP_ADDR_ANY (which is perfectly valid)...

The line reference is for an unknown version,
but we get the point.

Christiaan Simons <christiaans>
Group Member
Tue 25 Jul 2006 12:28:16 PM UTC, original submission:  

Using LWIP as UDP client on a NIOS processor and static IP addresses (not DHCP).  The subnet mask is 255.255.255.0.  Packets directed at the socket with exact IP address work fine, but if the last dot quad address is .255, the packet is ignored.  As an unverified patch, I altered line 216 of file udp.c:
  ip_addr_cmp(&(pcb->local_ip), &(iphdr->dest)))) {
replaced with 2 lines
  ip_addr_cmp(&(pcb->local_ip), &(iphdr->dest))) ||
  ip_addr_isbroadcast(&iphdr->dest, inp) )  {

and now subnet broadcasts appear to work okay.  I do not know if this is rigorously correct, but I wanted to report the behavior and suggest what might be a solution.

Tim

Tim Curran <tgcmn>

 

Attached Files

This item currently has no attached files.

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

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.

 

History

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-08-17 christiaans StatusNone Fixed
    Assigned toNone christiaans
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.16-1eaf.
Corresponding source code