From 7d16087789fc39f690b60855b04ef86a9bfdcb8b Mon Sep 17 00:00:00 2001 From: christiaans Date: Thu, 17 Aug 2006 09:40:15 +0000 Subject: [PATCH] Fixed bug #17200, added check for broadcast destinations for PCBs bound to a unicast address. --- CHANGELOG | 4 ++++ src/core/udp.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 8664eb57..f47da8dc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -53,6 +53,10 @@ HISTORY ++ Bug fixes: + 2006-08-17 Christiaan Simons + * udp.c: Fixed bug #17200, added check for broadcast + destinations for PCBs bound to a unicast address. + 2006-08-07 Christiaan Simons * api_msg.c: Flushing TCP output in do_close() (bug #15926). diff --git a/src/core/udp.c b/src/core/udp.c index 7456f9b0..59b1b3f8 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -145,7 +145,8 @@ udp_input(struct pbuf *p, struct netif *inp) /* compare PCB local addr+port to UDP destination addr+port */ if ((pcb->local_port == dest) && (ip_addr_isany(&pcb->local_ip) || - ip_addr_cmp(&(pcb->local_ip), &(iphdr->dest)))) { + ip_addr_cmp(&(pcb->local_ip), &(iphdr->dest)) || + ip_addr_isbroadcast(&(iphdr->dest), inp))) { local_match = 1; if ((uncon_pcb == NULL) && ((pcb->flags & UDP_FLAGS_CONNECTED) == 0)) {