mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 23:12:09 +00:00
tcp: make tcp_listen() inherit the netbuf_idx of the original pcb
This simple patch causes tcp_listen() to inherit the netbuf_idx setting of the original pcb. Without this, it is not possible to restrict a socket to a specific interface using SO_BINDTODEVICE before listening. Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
parent
3666dcc66c
commit
b5176936c7
@ -890,7 +890,7 @@ tcp_listen_with_backlog_and_err(struct tcp_pcb *pcb, u8_t backlog, err_t *err)
|
|||||||
lpcb->state = LISTEN;
|
lpcb->state = LISTEN;
|
||||||
lpcb->prio = pcb->prio;
|
lpcb->prio = pcb->prio;
|
||||||
lpcb->so_options = pcb->so_options;
|
lpcb->so_options = pcb->so_options;
|
||||||
lpcb->netif_idx = NETIF_NO_INDEX;
|
lpcb->netif_idx = pcb->netif_idx;
|
||||||
lpcb->ttl = pcb->ttl;
|
lpcb->ttl = pcb->ttl;
|
||||||
lpcb->tos = pcb->tos;
|
lpcb->tos = pcb->tos;
|
||||||
#if LWIP_VLAN_PCP
|
#if LWIP_VLAN_PCP
|
||||||
|
Loading…
Reference in New Issue
Block a user