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

Submitted by:  Tim Curran <tgcmn>
Submitted on:  Tue 25 Jul 2006 12:28:16 PM UTC  
 
Category:  UDP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  Christiaan Simons <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>
Project MemberIn charge of this item.
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

 

 

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.5