forked from Imagelibrary/lwip
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:
committed by
Dirk Ziegelmeier
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 */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user