Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipvs: adjust the debug info in function set_tcp_state

Outputting client,virtual,dst addresses info when tcp state changes,
which makes the connection debug more clear

Signed-off-by: longguang.yue <bigclouds@163.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

authored by

longguang.yue and committed by
Pablo Neira Ayuso
79dce09a df6afe2f

+6 -4
+6 -4
net/netfilter/ipvs/ip_vs_proto_tcp.c
··· 539 539 if (new_state != cp->state) { 540 540 struct ip_vs_dest *dest = cp->dest; 541 541 542 - IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] %s:%d->" 543 - "%s:%d state: %s->%s conn->refcnt:%d\n", 542 + IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] c:%s:%d v:%s:%d " 543 + "d:%s:%d state: %s->%s conn->refcnt:%d\n", 544 544 pd->pp->name, 545 545 ((state_off == TCP_DIR_OUTPUT) ? 546 546 "output " : "input "), ··· 548 548 th->fin ? 'F' : '.', 549 549 th->ack ? 'A' : '.', 550 550 th->rst ? 'R' : '.', 551 - IP_VS_DBG_ADDR(cp->daf, &cp->daddr), 552 - ntohs(cp->dport), 553 551 IP_VS_DBG_ADDR(cp->af, &cp->caddr), 554 552 ntohs(cp->cport), 553 + IP_VS_DBG_ADDR(cp->af, &cp->vaddr), 554 + ntohs(cp->vport), 555 + IP_VS_DBG_ADDR(cp->daf, &cp->daddr), 556 + ntohs(cp->dport), 555 557 tcp_state_name(cp->state), 556 558 tcp_state_name(new_state), 557 559 refcount_read(&cp->refcnt));