[Devel] [PATCH RHEL7 COMMIT] vzprivnet: Include the last IP of the range into checks

Konstantin Khorenko khorenko at virtuozzo.com
Thu Mar 24 08:53:26 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 6b18d397a2590d341b700895934f3b62d3ee85ce
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date:   Thu Mar 24 19:53:26 2016 +0400

    vzprivnet: Include the last IP of the range into checks
    
    Port diff-vzfilter-include-last-ip-in-range
      vzprivnet: Include the last IP of the range into checks
    
      Otherwise ip with all host bits set to 1 isn't included
      into the privnet.
    
      https://jira.sw.ru/browse/PCLIN-28345
    
    Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
 net/ipv4/netfilter/ip_vzprivnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/netfilter/ip_vzprivnet.c b/net/ipv4/netfilter/ip_vzprivnet.c
index 2d66dcc..2c7d532 100644
--- a/net/ipv4/netfilter/ip_vzprivnet.c
+++ b/net/ipv4/netfilter/ip_vzprivnet.c
@@ -67,7 +67,7 @@ static struct vzprivnet *tree_search(u32 ip)
 		start = ntohl(p->netip);
 		end = start | ~ntohl(p->netmask1);
 
-		if (ip < end) {
+		if (ip <= end) {
 			if (start <= ip)
 				return p;
 


More information about the Devel mailing list