lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPaK2r__afG7epSM6As3SehhCvTk4KvXB_UjQuwjCNZmf-giGA@mail.gmail.com>
Date:   Tue, 29 Sep 2020 13:17:20 +0800
From:   yue longguang <yuelongguang@...il.com>
To:     "longguang.yue" <bigclouds@....com>
Cc:     Wensong Zhang <wensong@...ux-vs.org>,
        Simon Horman <horms@...ge.net.au>,
        Julian Anastasov <ja@....bg>,
        Pablo Neira Ayuso <pablo@...filter.org>,
        Jozsef Kadlecsik <kadlec@...filter.org>,
        Florian Westphal <fw@...len.de>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        "open list:IPVS" <netdev@...r.kernel.org>,
        "open list:IPVS" <lvs-devel@...r.kernel.org>,
        "open list:NETFILTER" <netfilter-devel@...r.kernel.org>,
        "open list:NETFILTER" <coreteam@...filter.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ipvs: Add traffic statistic up even it is VS/DR or VS/TUN mode

especially in public cloud case, statistic is related to monitorring
and billing , both ingress and egress packets will go throught ipvs,
even dr/tun mode.
in dr/tun mode, ipvs need to do nothing except  statistic, so
skb->ipvs_property = 1

regards

On Tue, Sep 29, 2020 at 1:04 PM longguang.yue <bigclouds@....com> wrote:
>
> 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@....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)
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ