On Thu, Sep 3, 2009 at 7:49 PM, Mandeep
Sandhu<[email protected]> wrote:
> On Thu, Sep 3, 2009 at 7:30 PM, Simon Goldschmidt<[email protected]> 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
>> [email protected]
>> http://lists.nongnu.org/mailman/listinfo/lwip-users
>>
>
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users