lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwIP 1.3.1 : src IP chk drops DHCP (discover) packets


From: Mandeep Sandhu
Subject: Re: [lwip-users] lwIP 1.3.1 : src IP chk drops DHCP (discover) packets
Date: Fri, 4 Sep 2009 16:38:43 +0530

On Thu, Sep 3, 2009 at 7:49 PM, Mandeep
Sandhu<address@hidden> wrote:
> On Thu, Sep 3, 2009 at 7:30 PM, Simon Goldschmidt<address@hidden> wrote:
>>> Why was this added?
>>
>> I think I remember this being added to dump packets that are not for us in 
>> an earlier stage as it would be done without this test. The downside of 
>> course is that you don't receive these packets... Seems like the test isn't 
>> good enough, then.

All,

Can this particular code section be removed? (this in context of this thread)

Or at least make it configurable?

from ip.c:ip_input

#if LWIP_DHCP
  if (check_ip_src)
#endif /* LWIP_DHCP */
  {  if ((ip_addr_isbroadcast(&(iphdr->src), inp)) ||
         (ip_addr_ismulticast(&(iphdr->src)))) {
      /* packet source is not valid */
      LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE | 1, ("ip_input: packet
source is not valid.\n"));
      /* free (drop) packet pbufs */
      pbuf_free(p);
      IP_STATS_INC(ip.drop);
      snmp_inc_ipinaddrerrors();
      snmp_inc_ipindiscards();
      return ERR_OK;
    }
  }

It's causing the stack to drop packets with src IP as either
255.255.255.255 or 0.0.0.0

Thanks,
-mandeep

>
> Yes, I see that bcast packets will be dropped right after this check
> (if we haven't found any netif yet).
>
> The only difference is that we are not incrementing the stats
> (IP_STATS_INC is missing) when we
> are dropping packets.
>
> -mandeep
>
>>
>> Simon
>> --
>> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
>> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>>
>>
>> _______________________________________________
>> lwip-users mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/lwip-users
>>
>




reply via email to

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