From 4076b12ee93e13fc60c59cf92068588489a96608 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 22 Nov 2016 14:35:45 +0100 Subject: [PATCH] Revert "Apply patch #9165: Allowing udp src port to be 0 in cases when we don't care about outgoing port" This reverts commit 31b0237c501652e6e18f0705e473004f5e20823a. --- src/core/udp.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/core/udp.c b/src/core/udp.c index ebb04edc..491fb074 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -283,12 +283,8 @@ udp_input(struct pbuf *p, struct netif *inp) uncon_pcb = pcb; } - /* 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)) && + /* compare PCB remote addr+port to UDP source addr+port */ + if ((pcb->remote_port == src) && (ip_addr_isany_val(pcb->remote_ip) || ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) { /* the first fully matching PCB */