The code you quoted dropping
all packets which have a broadcast or multicast SOURCE address, which is illegal except in special conditions such as
DHCP. Refer to RFC1122, which is mentioned in ip.c just above the bit you
quoted.
LWIP can receive packets where the DESTINATION
address is broadcast or multicast.
----- Original Message -----
Sent: Tuesday, June 01, 2010 11:49
PM
Subject: [lwip-users] Multicast packet
will drop in ip.c
Hi,
I would like to check lwip 1.3.2 implementation about multicast/broadcast
implementation.
even though, IP_SOF_BROADCAST_RECV & IP_SOF_BROADCAST
defined, ip layer will drop all multicast and broadcast packet except DHCP
protocol. Is this a bug or intended implementation?
// In ip.c
if (check_ip_src) { 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; } } Regards, -- Bandu address@hidden
_______________________________________________ lwip-users mailing
list address@hidden http://lists.nongnu.org/mailman/listinfo/lwip-users
|