All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipvs: Add traffic statistic up even it is VS/DR or VS/TUN mode
@ 2020-09-29  5:03 ` longguang.yue
  0 siblings, 0 replies; 19+ messages in thread
From: longguang.yue @ 2020-09-29  5:03 UTC (permalink / raw)
  Cc: yuelongguang, longguang.yue, Wensong Zhang, Simon Horman,
	Julian Anastasov, Pablo Neira Ayuso, Jozsef Kadlecsik,
	Florian Westphal, David S. Miller, Jakub Kicinski,
	open list:IPVS, open list:IPVS, open list:NETFILTER,
	open list:NETFILTER, open list

It's ipvs's duty to do traffic statistic if packets get hit,
no matter what mode it is.

Signed-off-by: longguang.yue <bigclouds@163.com>
---
 net/netfilter/ipvs/ip_vs_core.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index e3668a6e54e4..ed523057f07f 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1413,8 +1413,11 @@ ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, in
 			     ipvs, af, skb, &iph);
 
 	if (likely(cp)) {
-		if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ)
+		if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ){
+			ip_vs_out_stats(cp, skb);
+			skb->ipvs_property = 1;
 			goto ignore_cp;
+		}
 		return handle_response(af, skb, pd, cp, &iph, hooknum);
 	}
 
-- 
2.20.1 (Apple Git-117)


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-10-05 20:17 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29  5:03 [PATCH] ipvs: Add traffic statistic up even it is VS/DR or VS/TUN mode longguang.yue
2020-09-29  5:03 ` longguang.yue
2020-09-29  5:17 ` yue longguang
2020-09-29  8:18 ` [PATCH v2] " longguang.yue
2020-09-29  8:18   ` longguang.yue
2020-09-29 14:41   ` Jakub Kicinski
2020-09-30  1:26     ` [PATCH v3] " longguang.yue
2020-09-30  1:26       ` longguang.yue
2020-09-30 18:19       ` Julian Anastasov
2020-10-02 17:17         ` [PATCH v4] " longguang.yue
2020-10-02 17:17           ` longguang.yue
2020-10-02 19:26           ` Julian Anastasov
2020-10-04  4:13             ` [PATCH v5] " longguang.yue
2020-10-04  4:13               ` longguang.yue
2020-10-04 12:25               ` Julian Anastasov
2020-10-04 15:07                 ` [PATCH v6] ipvs: inspect reply packets from DR/TUN real servers longguang.yue
2020-10-04 15:07                   ` longguang.yue
2020-10-05  6:49                 ` [PATCH v7] " longguang.yue
2020-10-05 20:17                   ` Julian Anastasov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.