mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +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 */
|
||||
if ((pcb->netif_idx != NETIF_NO_INDEX) &&
|
||||
(pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
|
||||
prev = pcb;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -304,6 +305,7 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
||||
/* check if PCB is bound to specific netif */
|
||||
if ((lpcb->netif_idx != NETIF_NO_INDEX) &&
|
||||
(lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) {
|
||||
prev = (struct tcp_pcb *)lpcb;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -327,7 +329,7 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
||||
lpcb_prev = prev;
|
||||
#else /* SO_REUSE */
|
||||
break;
|
||||
#endif /* SO_REUSE */
|
||||
#endif /* SO_REUSE */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user