[bug #17200] UDP not receiving broadcast subnet

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #17200] UDP not receiving broadcast subnet

Wilfred

URL:
  <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=17200>

                 Summary: UDP not receiving broadcast subnet
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: tgcmn
            Submitted on: Tuesday 07/25/2006 at 12:28
                Category: UDP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:

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






    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=17200>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #17200] UDP not receiving broadcast subnet

Wilfred

Update of bug #17200 (project lwip):

                  Status:                    None => Fixed                  
             Assigned to:                    None => christiaans            
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up 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.

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-devel