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
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  christiaans
Open/Closed:  Closed Planned Release:  None
lwIP version:  None

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>

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 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.13-f8d8.
Corresponding source code