[master] caa3769 Also insist that the vmod name matches before reusing, to cater for hardlinks.

Poul-Henning Kamp phk at FreeBSD.org
Mon Aug 25 10:39:10 CEST 2014


commit caa376943e315def7cee814008f01a0796d8e1d9
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Aug 25 08:38:45 2014 +0000

    Also insist that the vmod name matches before reusing, to cater for hardlinks.

diff --git a/bin/varnishd/cache/cache_vrt_vmod.c b/bin/varnishd/cache/cache_vrt_vmod.c
index b5b76fe..32652ab 100644
--- a/bin/varnishd/cache/cache_vrt_vmod.c
+++ b/bin/varnishd/cache/cache_vrt_vmod.c
@@ -90,7 +90,9 @@ VRT_Vmod_Init(void **hdl, void *ptr, int len, const char *nm,
 
 	AZ(fstat(fd, &st));
 	VTAILQ_FOREACH(v, &vmods, list)
-		if (st.st_dev == v->st_dev && st.st_ino == v->st_ino)
+		if (st.st_dev == v->st_dev &&
+		    st.st_ino == v->st_ino &&
+		    !strcmp(v->nm, nm))
 			break;
 
 	if (v != NULL) {



More information about the varnish-commit mailing list