[3.0] b97fc0c Fix #1126 by properly setting the mask token to the IP number token.

Tollef Fog Heen tfheen at varnish-cache.org
Thu May 24 14:51:11 CEST 2012


commit b97fc0cd048eb92ca7ad4f25b91e34837c5e1508
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Apr 16 07:04:40 2012 +0000

    Fix #1126 by properly setting the mask token to the IP number token.
    
    Varnishtest doesn't see the difference between a VCC core dump and
    a VCC error, so a test-case is non-trivial.
    
    Fixes	#1126

diff --git a/lib/libvcl/vcc_acl.c b/lib/libvcl/vcc_acl.c
index 30c9eea..272f3c6 100644
--- a/lib/libvcl/vcc_acl.c
+++ b/lib/libvcl/vcc_acl.c
@@ -265,8 +265,10 @@ vcc_acl_try_netnotation(struct vcc *tl, struct acl_e *ae)
 			return (0);
 		p += k + 1;
 	}
-	if (ae->t_mask == NULL)
+	if (ae->t_mask == NULL) {
 		ae->mask = 8 + 8 * i;
+		ae->t_mask = ae->t_addr;
+	}
 	vcc_acl_add_entry(tl, ae, 4, b, AF_INET);
 	return (1);
 }



More information about the varnish-commit mailing list