mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-06 20:29:04 +00:00
Fix bug #48504: tcp_debug_print_pcbs reads nonexisting tcp_pcb fields
This commit is contained in:
parent
09636c5b92
commit
4ec3d29168
@ -2023,6 +2023,8 @@ void
|
||||
tcp_debug_print_pcbs(void)
|
||||
{
|
||||
struct tcp_pcb *pcb;
|
||||
struct tcp_pcb_listen *pcbl;
|
||||
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("Active PCB states:\n"));
|
||||
for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) {
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F", foreign port %"U16_F" snd_nxt %"U32_F" rcv_nxt %"U32_F" ",
|
||||
@ -2030,13 +2032,13 @@ tcp_debug_print_pcbs(void)
|
||||
pcb->snd_nxt, pcb->rcv_nxt));
|
||||
tcp_debug_print_state(pcb->state);
|
||||
}
|
||||
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("Listen PCB states:\n"));
|
||||
for (pcb = (struct tcp_pcb *)tcp_listen_pcbs.pcbs; pcb != NULL; pcb = pcb->next) {
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F", foreign port %"U16_F" snd_nxt %"U32_F" rcv_nxt %"U32_F" ",
|
||||
pcb->local_port, pcb->remote_port,
|
||||
pcb->snd_nxt, pcb->rcv_nxt));
|
||||
tcp_debug_print_state(pcb->state);
|
||||
for (pcbl = tcp_listen_pcbs.listen_pcbs; pcbl != NULL; pcbl = pcbl->next) {
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F" ", pcbl->local_port));
|
||||
tcp_debug_print_state(pcbl->state);
|
||||
}
|
||||
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("TIME-WAIT PCB states:\n"));
|
||||
for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) {
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("Local port %"U16_F", foreign port %"U16_F" snd_nxt %"U32_F" rcv_nxt %"U32_F" ",
|
||||
|
Loading…
Reference in New Issue
Block a user