[master] 10f1de6 Fix #1126 by properly setting the mask token to the IP number token.

Poul-Henning Kamp phk at varnish-cache.org
Mon Apr 16 09:05:37 CEST 2012


commit 10f1de6232d60c8cd2d9081a7680dad857c6d5aa
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 e6a1065..b42f9de 100644
--- a/lib/libvcl/vcc_acl.c
+++ b/lib/libvcl/vcc_acl.c
@@ -263,8 +263,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