mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 23:25:58 +00:00
tcp_in: correct some loops continuing without maintaining a prev pointer.
This problem would appear to have only affected systems with multiple interfaces. It was noted causing tcp resets when the pcb was lost, and there might have been other associated problems. Signed-off-by: Dirk Ziegelmeier <dirk@ziegelmeier.net>
This commit is contained in:
parent
28e519b72d
commit
dc7a9c8c37
@ -247,6 +247,7 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
|||||||
/* check if PCB is bound to specific netif */
|
/* check if PCB is bound to specific netif */
|
||||||
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
|
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
|
||||||
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
|
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
|
||||||
|
prev = pcb;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,6 +305,7 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
|||||||
/* check if PCB is bound to specific netif */
|
/* check if PCB is bound to specific netif */
|
||||||
if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
|
if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
|
||||||
(lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
|
(lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
|
||||||
|
prev = (struct tcp_pcb *)lpcb;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user