mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-29 00:32:51 +00:00
fixed bug #34072: UDP broadcast is received from wrong UDP pcb if udp port matches
This commit is contained in:
parent
5e8ee7e006
commit
4849eb4c54
@ -47,6 +47,10 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2011-09-09: Simon Goldschmidt
|
||||||
|
* udp.c: fixed bug #34072: UDP broadcast is received from wrong UDP pcb if
|
||||||
|
udp port matches
|
||||||
|
|
||||||
2011-09-03: Simon Goldschmidt
|
2011-09-03: Simon Goldschmidt
|
||||||
* tcp_in.c: fixed bug #33952 PUSH flag in incoming packet is lost when packet
|
* tcp_in.c: fixed bug #33952 PUSH flag in incoming packet is lost when packet
|
||||||
is aggregated and sent to application
|
is aggregated and sent to application
|
||||||
|
@ -173,7 +173,8 @@ udp_input(struct pbuf *p, struct netif *inp)
|
|||||||
LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", pcb->remote_port));
|
LWIP_DEBUGF(UDP_DEBUG, (", %"U16_F")\n", pcb->remote_port));
|
||||||
|
|
||||||
/* compare PCB local addr+port to UDP destination addr+port */
|
/* compare PCB local addr+port to UDP destination addr+port */
|
||||||
if ((pcb->local_port == dest) &&
|
if (pcb->local_port == dest) {
|
||||||
|
if (
|
||||||
#if LWIP_IPV6
|
#if LWIP_IPV6
|
||||||
((PCB_ISIPV6(pcb) && (ip_current_is_v6()) &&
|
((PCB_ISIPV6(pcb) && (ip_current_is_v6()) &&
|
||||||
(ip6_addr_isany(ipX_2_ip6(&pcb->local_ip)) ||
|
(ip6_addr_isany(ipX_2_ip6(&pcb->local_ip)) ||
|
||||||
@ -192,15 +193,18 @@ udp_input(struct pbuf *p, struct netif *inp)
|
|||||||
ip_addr_ismulticast(ip_current_dest_addr()) ||
|
ip_addr_ismulticast(ip_current_dest_addr()) ||
|
||||||
#endif /* LWIP_IGMP */
|
#endif /* LWIP_IGMP */
|
||||||
#if IP_SOF_BROADCAST_RECV
|
#if IP_SOF_BROADCAST_RECV
|
||||||
(broadcast && (pcb->so_options & SOF_BROADCAST)))))) {
|
(broadcast && (pcb->so_options & SOF_BROADCAST) &&
|
||||||
#else /* IP_SOF_BROADCAST_RECV */
|
ip_addr_netcmp(ipX_2_ip(&pcb->local_ip), ip_current_dest_addr(), &inp->netmask)))))) {
|
||||||
(broadcast))))) {
|
#else /* IP_SOF_BROADCAST_RECV */
|
||||||
#endif /* IP_SOF_BROADCAST_RECV */
|
(broadcast &&
|
||||||
local_match = 1;
|
ip_addr_netcmp(ipX_2_ip(&pcb->local_ip), ip_current_dest_addr(), &inp->netmask)))))) {
|
||||||
if ((uncon_pcb == NULL) &&
|
#endif /* IP_SOF_BROADCAST_RECV */
|
||||||
((pcb->flags & UDP_FLAGS_CONNECTED) == 0)) {
|
local_match = 1;
|
||||||
/* the first unconnected matching PCB */
|
if ((uncon_pcb == NULL) &&
|
||||||
uncon_pcb = pcb;
|
((pcb->flags & UDP_FLAGS_CONNECTED) == 0)) {
|
||||||
|
/* the first unconnected matching PCB */
|
||||||
|
uncon_pcb = pcb;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* compare PCB remote addr+port to UDP source addr+port */
|
/* compare PCB remote addr+port to UDP source addr+port */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user