lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #51149] UDP and DHCP server


From: Marco
Subject: [lwip-devel] [bug #51149] UDP and DHCP server
Date: Wed, 31 May 2017 10:58:41 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

URL:
  <http://savannah.nongnu.org/bugs/?51149>

                 Summary: UDP and DHCP server
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: marcoe
            Submitted on: Wed 31 May 2017 02:58:40 PM UTC
                Category: DHCP
                Severity: 3 - Normal
              Item Group: Change Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.0.2

    _______________________________________________________

Details:

Hello guys,
we have one device with 3 network cards:1 ethernet, 1 wifi sta and 1 wifi
access point. We have developed one dhcp server and configured it over the
ethernet and the wifi access point interfaces. The dhcp server creates a new
udp pcb and bind the udp to the local ip address of the interface and the port
67 so we have 2 different udp_pcb, one bound to the ethernet and one to the
wifi access point interface, but the function udp_input() delivers the
received broadcast packet only to one pcb because :

(taken from core/udp.c) 
  /* Iterate through the UDP pcb list for a matching pcb.
   * 'Perfect match' pcbs (connected to the remote port & ip address) are
   * preferred. If no perfect match is found, the first unconnected pcb that
   * matches the local port and ip address gets the datagram. */

How we can delivery the incoming packet to all or almost the correct pcb?

I see two possible solutions:

1. In udp_input() check the source and destination port and if are 68/67 match
the pcb bound to the same address of the incoming network interface.
2. Add a method to retrieve in the udp recv callback the source interface for
the last packet.

Some one have a better solutions?




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]