tcp: send RST to input netif when no pcb is available

If we know there's no matchin pcb (e.g. for routing), don't even
try to pass NULL but instead send the RST to the input netif.

See also patch #9988.
This commit is contained in:
Simon Goldschmidt
2021-03-04 21:10:28 +01:00
parent 1f4a029d10
commit 3666dcc66c
3 changed files with 121 additions and 52 deletions

View File

@@ -464,6 +464,9 @@ void tcp_rexmit_seg(struct tcp_pcb *pcb, struct tcp_seg *seg);
void tcp_rst(const struct tcp_pcb* pcb, u32_t seqno, u32_t ackno,
const ip_addr_t *local_ip, const ip_addr_t *remote_ip,
u16_t local_port, u16_t remote_port);
void tcp_rst_netif(struct netif *netif, u32_t seqno, u32_t ackno,
const ip_addr_t *local_ip, const ip_addr_t *remote_ip,
u16_t local_port, u16_t remote_port);
u32_t tcp_next_iss(struct tcp_pcb *pcb);