Skip to content

Commit 79dce09

Browse files
bigcloudsummakynes
authored andcommitted
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>
1 parent df6afe2 commit 79dce09

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

net/netfilter/ipvs/ip_vs_proto_tcp.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,19 +539,21 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct ip_vs_conn *cp,
539539
if (new_state != cp->state) {
540540
struct ip_vs_dest *dest = cp->dest;
541541

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",
544544
pd->pp->name,
545545
((state_off == TCP_DIR_OUTPUT) ?
546546
"output " : "input "),
547547
th->syn ? 'S' : '.',
548548
th->fin ? 'F' : '.',
549549
th->ack ? 'A' : '.',
550550
th->rst ? 'R' : '.',
551-
IP_VS_DBG_ADDR(cp->daf, &cp->daddr),
552-
ntohs(cp->dport),
553551
IP_VS_DBG_ADDR(cp->af, &cp->caddr),
554552
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),
555557
tcp_state_name(cp->state),
556558
tcp_state_name(new_state),
557559
refcount_read(&cp->refcnt));

0 commit comments

Comments
 (0)