mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-08 12:30:40 +00:00
Hack to be able to receive UDPv4 multicast packets
This commit is contained in:
parent
fb037e0afb
commit
f25856a387
@ -41,7 +41,7 @@
|
||||
*
|
||||
* This file is part of the uIP TCP/IP stack.
|
||||
*
|
||||
* $Id: uip.c,v 1.15 2008/10/15 08:08:32 adamdunkels Exp $
|
||||
* $Id: uip.c,v 1.16 2009/10/18 22:03:44 adamdunkels Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -903,9 +903,16 @@ uip_process(u8_t flag)
|
||||
#if UIP_BROADCAST
|
||||
DEBUG_PRINTF("UDP IP checksum 0x%04x\n", uip_ipchksum());
|
||||
if(BUF->proto == UIP_PROTO_UDP &&
|
||||
uip_ipaddr_cmp(&BUF->destipaddr, &uip_broadcast_addr)
|
||||
/*&&
|
||||
uip_ipchksum() == 0xffff*/) {
|
||||
(uip_ipaddr_cmp(&BUF->destipaddr, &uip_broadcast_addr) ||
|
||||
(BUF->destipaddr.u8[0] & 224) == 224)) { /* XXX this is a
|
||||
hack to be able
|
||||
to receive UDP
|
||||
multicast
|
||||
packets. We check
|
||||
for the bit
|
||||
pattern of the
|
||||
multicast
|
||||
prefix. */
|
||||
goto udp_input;
|
||||
}
|
||||
#endif /* UIP_BROADCAST */
|
||||
|
Loading…
Reference in New Issue
Block a user