From 02f5e19420efad16130566ab4b528eb40fcf6f54 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sat, 15 May 2010 16:46:53 +0000 Subject: [PATCH] udp_input: use SO_REUSE && SO_REUSE_RXTOALL to copy incoming (broad-/multicast) data to additional pcbs --- src/core/udp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/udp.c b/src/core/udp.c index 7b5d0492..0fd8993f 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -276,7 +276,7 @@ udp_input(struct pbuf *p, struct netif *inp) } if (pcb != NULL) { snmp_inc_udpindatagrams(); -#if SO_REUSE_RXTOALL +#if SO_REUSE && SO_REUSE_RXTOALL if ((broadcast || ip_addr_ismulticast(&iphdr->dest)) && ((pcb->so_options & SOF_REUSEADDR) != 0)) { /* pass broadcast- or multicast packets to all multicast pcbs @@ -317,7 +317,7 @@ udp_input(struct pbuf *p, struct netif *inp) /* and move payload to UDP data again */ pbuf_header(p, -(s16_t)((IPH_HL(iphdr) * 4) + UDP_HLEN)); } -#endif /* SO_REUSE_RXTOALL */ +#endif /* SO_REUSE && SO_REUSE_RXTOALL */ /* callback */ if (pcb->recv != NULL) { /* now the recv function is responsible for freeing p */