![]() |
lvs-devel
|
| To: | unlisted-recipients:; (no To-header on input) |
|---|---|
| Subject: | [PATCH v6] ipvs: adjust the debug info in function set_tcp_state |
| Cc: | ja@xxxxxx, kuba@xxxxxxxxxx, wensong@xxxxxxxxxxxx, horms@xxxxxxxxxxxx, pablo@xxxxxxxxxxxxx, kadlec@xxxxxxxxxxxxx, fw@xxxxxxxxx, davem@xxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, yuelongguang@xxxxxxxxx, "longguang.yue" <bigclouds@xxxxxxx> |
| From: | "longguang.yue" <bigclouds@xxxxxxx> |
| Date: | Sun, 4 Oct 2020 23:18:57 +0800 |
Outputting client,virtual,dst addresses info when tcp state changes,
which makes the connection debug more clear
---
v5,v6: fix indentation and add changelogs
v3,v4: fix checkpatch
v2: IP_VS_DBG_BUF outputs src,virtual,dst of ip_vs_conn
v1: fix the inverse of src and dst address
Signed-off-by: longguang.yue <bigclouds@xxxxxxx>
---
net/netfilter/ipvs/ip_vs_proto_tcp.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c
b/net/netfilter/ipvs/ip_vs_proto_tcp.c
index dc2e7da2742a..7da51390cea6 100644
--- a/net/netfilter/ipvs/ip_vs_proto_tcp.c
+++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c
@@ -539,8 +539,8 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct
ip_vs_conn *cp,
if (new_state != cp->state) {
struct ip_vs_dest *dest = cp->dest;
- IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] %s:%d->"
- "%s:%d state: %s->%s conn->refcnt:%d\n",
+ IP_VS_DBG_BUF(8, "%s %s [%c%c%c%c] c:%s:%d v:%s:%d "
+ "d:%s:%d state: %s->%s conn->refcnt:%d\n",
pd->pp->name,
((state_off == TCP_DIR_OUTPUT) ?
"output " : "input "),
@@ -548,10 +548,12 @@ set_tcp_state(struct ip_vs_proto_data *pd, struct
ip_vs_conn *cp,
th->fin ? 'F' : '.',
th->ack ? 'A' : '.',
th->rst ? 'R' : '.',
- IP_VS_DBG_ADDR(cp->daf, &cp->daddr),
- ntohs(cp->dport),
IP_VS_DBG_ADDR(cp->af, &cp->caddr),
ntohs(cp->cport),
+ IP_VS_DBG_ADDR(cp->af, &cp->vaddr),
+ ntohs(cp->vport),
+ IP_VS_DBG_ADDR(cp->daf, &cp->daddr),
+ ntohs(cp->dport),
tcp_state_name(cp->state),
tcp_state_name(new_state),
refcount_read(&cp->refcnt));
--
2.20.1 (Apple Git-117)
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH v6] ipvs: inspect reply packets from DR/TUN real servers, longguang.yue |
|---|---|
| Next by Date: | [PATCH v7] ipvs: inspect reply packets from DR/TUN real servers, longguang.yue |
| Previous by Thread: | [PATCH v4] ipvs: Add traffic statistic up even it is VS/DR or VS/TUN mode, longguang.yue |
| Next by Thread: | [PATCH v8 net-next] ipvs: inspect reply packets from DR/TUN real servers, Julian Anastasov |
| Indexes: | [Date] [Thread] [Top] [All Lists] |