[RHEL7,COMMIT] vznetstat: Simplify venet_acct_out_hook()

Submitted by Vasily Averin on Oct. 7, 2020, 5:19 a.m.

Details

Message ID 202010070519.0975JTfx007207@vz7build.vvs.sw.ru
State New
Series "Series without cover letter"
Headers show

Commit Message

Vasily Averin Oct. 7, 2020, 5:19 a.m.
The commit is pushed to "branch-rh7-3.10.0-1127.18.2.vz7.163.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.18.2.vz7.163.34
------>
commit da902108bf97512e7097d92bd0019047ac1039b2
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Wed Oct 7 08:19:29 2020 +0300

    vznetstat: Simplify venet_acct_out_hook()
    
    https://jira.sw.ru/browse/PSBM-120713
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 kernel/ve/vznetstat/ip_vznetstat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/kernel/ve/vznetstat/ip_vznetstat.c b/kernel/ve/vznetstat/ip_vznetstat.c
index 999a93b..d960657 100644
--- a/kernel/ve/vznetstat/ip_vznetstat.c
+++ b/kernel/ve/vznetstat/ip_vznetstat.c
@@ -82,7 +82,7 @@  static unsigned int venet_acct_out_hook(const struct nf_hook_ops *hook,
 	res = NF_ACCEPT;
 
 	/* Skip loopback dev */
-	if (out == dev_net(out)->loopback_dev)
+	if (out->flags & IFF_LOOPBACK)
 		goto out;
 
 	/* Paranoia */