diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index c15a4099..747a0181 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -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 */ } } }