Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: utility/uip.c
- Revision:
- 36:689bcc358067
- Parent:
- 35:f9f3a91fe4d4
--- a/utility/uip.c Mon Feb 20 11:34:22 2017 +0100 +++ b/utility/uip.c Wed Feb 22 14:35:30 2017 +0100 @@ -909,10 +909,10 @@ UDP packet, which may be destined to us. */ #if UIP_BROADCAST DEBUG_PRINTF("UDP IP checksum 0x%04x\n", uip_ipchksum()); - if(BUF->proto == UIP_PROTO_UDP && ( - uip_ipaddr_cmp(BUF->destipaddr, all_ones_addr) - || uip_ipaddr_maskcmp(BUF->destipaddr, uip_hostaddr, uip_netmask) - ) + if(BUF->proto == UIP_PROTO_UDP && ( + uip_ipaddr_cmp(BUF->destipaddr, all_ones_addr) // Limited broadcast + || ((BUF->destipaddr[0]==(uip_hostaddr[0] | (~uip_netmask[0]))) && (BUF->destipaddr[1]==(uip_hostaddr[1] | (~uip_netmask[1])))) // Direct broadcast + ) /*&& uip_ipchksum() == 0xffff*/) { goto udp_input;