mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-28 00:15:16 +00:00
Apply patch #9165: Allowing udp src port to be 0 in cases when we don't care about outgoing port
This commit is contained in:
parent
9366c0eaab
commit
31b0237c50
@ -283,8 +283,12 @@ udp_input(struct pbuf *p, struct netif *inp)
|
||||
uncon_pcb = pcb;
|
||||
}
|
||||
|
||||
/* compare PCB remote addr+port to UDP source addr+port */
|
||||
if ((pcb->remote_port == src) &&
|
||||
/* Compare PCB remote addr+port to UDP source addr+port.
|
||||
* Allow pcb->remote_port 0 for matching any port
|
||||
* from a specified pcb->remote_ip.
|
||||
* See patch #9165
|
||||
*/
|
||||
if (((pcb->remote_port == src) || (pcb->remote_port == 0)) &&
|
||||
(ip_addr_isany_val(pcb->remote_ip) ||
|
||||
ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) {
|
||||
/* the first fully matching PCB */
|
||||
|
Loading…
Reference in New Issue
Block a user