[RH7,2/3] vznetstat: Simplify venet_acct_out_hook()

Submitted by Kirill Tkhai on Oct. 6, 2020, 1:19 p.m.

Details

Message ID 160199034404.150671.6648269180823042643.stgit@localhost.localdomain
State New
Series "Series without cover letter"
Headers show

Commit Message

Kirill Tkhai Oct. 6, 2020, 1:19 p.m.
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 999a93b84cab..d96065768ab3 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 */