lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #46524] Device as dhcp server does not work after upgr


From: Axel Lin
Subject: [lwip-devel] [bug #46524] Device as dhcp server does not work after upgrade to lwip-1.4.1
Date: Fri, 19 Feb 2016 02:56:43 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36

Follow-up Comment #5, bug #46524 (project lwip):

Hi,
The patch actually already checks both dest and src.

diff --git a/src/core/udp.c b/src/core/udp.c
index 4a30010..63b3c74 100644
--- a/src/core/udp.c
+++ b/src/core/udp.c
@@ -269,7 +269,8 @@ udp_input(struct pbuf *p, struct netif *inp)
              ip_get_option(pcb, SOF_BROADCAST) &&
 #endif /* IP_SOF_BROADCAST_RECV */
              (ip_addr_isany(&pcb->local_ip) ||
-              ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(),
netif_ip4_netmask(inp))))))
+              ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(),
netif_ip4_netmask(inp)) ||
+              ip_addr_isany_val(*ip_current_src_addr())))))
 #endif /* LWIP_IPV4 */
               ) {
           local_match = 1;


Below is the snip of the code after apply the patches:
broadcast must be true before other checking:

            (broadcast &&
#if IP_SOF_BROADCAST_RECV
             ip_get_option(pcb, SOF_BROADCAST) &&
#endif /* IP_SOF_BROADCAST_RECV */
             (ip_addr_isany(&pcb->local_ip) ||
              ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(),
netif_ip4_netmask(inp)) ||
              ip_addr_isany_val(*ip_current_src_addr())))))
#endif /* LWIP_IPV4 */
              ) {
          local_match = 1


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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