[Devel] [PATCH RHEL7 COMMIT] vzprivnet: Flush rt cache each time rules change
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Mar 24 08:53:31 PDT 2016
The commit is pushed to "branch-rh7-3.10.0-327.10.1.vz7.12.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.10.1.vz7.12.3
------>
commit 4b0fc16e0250d08b4378be091deef2ba67e57117
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date: Thu Mar 24 19:53:31 2016 +0400
vzprivnet: Flush rt cache each time rules change
changes:
1) fix rt_cache_flush arguments
Below commit removes arg delay from rt_cache_flush:
commit bafa6d9d8907 ("ipv4/route: arg delay is useless in
rt_cache_flush()")
Port diff-vz-privnet-flush-rtcache
vzprivnet: Flush rt cache each time rules change
Required to make old dst entries disappear.
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
net/ipv4/netfilter/ip_vzprivnet.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/ipv4/netfilter/ip_vzprivnet.c b/net/ipv4/netfilter/ip_vzprivnet.c
index 0142fc3..170b0c5 100644
--- a/net/ipv4/netfilter/ip_vzprivnet.c
+++ b/net/ipv4/netfilter/ip_vzprivnet.c
@@ -28,6 +28,7 @@
#include <linux/log2.h>
#include <linux/ctype.h>
#include <linux/inet.h>
+#include <net/route.h>
#include <asm/page.h>
#define VZPRIV_PROCNAME "ip_vzprivnet"
@@ -423,6 +424,8 @@ static ssize_t vzpriv_write(struct file * file, const char __user *buf,
if (err)
goto err;
+ rt_cache_flush(&init_net);
+
s = page;
s[count] = 0;
@@ -742,6 +745,8 @@ static ssize_t sparse_write(struct file * file, const char __user *buf,
if (err)
goto err;
+ rt_cache_flush(&init_net);
+
s = page;
s[count] = 0;
More information about the Devel
mailing list