BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/99554
Change subject: varnish (3.0.3plus~rc1-wm24) precise; urgency=low ...................................................................... varnish (3.0.3plus~rc1-wm24) precise; urgency=low * update netmapper to 418eb681 -- Brandon Black <[email protected]> Thu, 05 Dec 2013 23:18:24 +0000 Change-Id: Ibdc4bf573987805565d85a1481105de8977775b1 --- M debian/changelog M debian/patches/0098-libvmod-netmapper-src.patch 2 files changed, 15 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/varnish refs/changes/54/99554/1 diff --git a/debian/changelog b/debian/changelog index 22ccd2d..51c4ff7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +varnish (3.0.3plus~rc1-wm24) precise; urgency=low + + * update netmapper to 418eb681 + + -- Brandon Black <[email protected]> Thu, 05 Dec 2013 23:18:24 +0000 + varnish (3.0.3plus~rc1-wm23) precise; urgency=low * Use external, up-to-date jemalloc diff --git a/debian/patches/0098-libvmod-netmapper-src.patch b/debian/patches/0098-libvmod-netmapper-src.patch index 99b2c8c..f9c369d 100644 --- a/debian/patches/0098-libvmod-netmapper-src.patch +++ b/debian/patches/0098-libvmod-netmapper-src.patch @@ -2016,10 +2016,10 @@ +{ "ZZZ": [ "0.0.0.0/1" ] } diff --git a/lib/libvmod_netmapper/src/vmod_netmapper.c b/lib/libvmod_netmapper/src/vmod_netmapper.c new file mode 100644 -index 0000000..c2551cb +index 0000000..63f3737 --- /dev/null +++ b/lib/libvmod_netmapper/src/vmod_netmapper.c -@@ -0,0 +1,224 @@ +@@ -0,0 +1,213 @@ +/* Copyright © 2013 Brandon L Black <[email protected]> + * + * This file is part of libvmod-netmapper. @@ -2136,28 +2136,18 @@ + // free the most-recent data + vnm_db_destruct(vp->dbs[i].db); + free(vp->dbs[i].fn); ++ free(vp->dbs[i].label); + } + + free(vp->dbs); ++ free(vp); +} + +/***************************** + * Actual VMOD/VCL/VRT Hooks * + *****************************/ + -+// we serialize all calls to vmod_init() for this vmod globally, because -+// (a) it's not a perf hotspot anyways and -+// (b) it is critical that this executes serially for all .init() calls -+// at *least* within a given VCL (PRIV_VCL context). -+// (c) I'm not 100% sure that varnish will never call this from two threads -+// in parallel, either now or in the future, during startup with multiple -+// VCLs using the module, etc. -+pthread_mutex_t serial_init = PTHREAD_MUTEX_INITIALIZER; -+ +void vmod_init(struct sess *sp, struct vmod_priv *priv, const char* db_label, const char* json_path, const int reload_interval) { -+ -+ pthread_mutex_lock(&serial_init); -+ + vnm_priv_t* vp = priv->priv; + + if(!vp) { @@ -2177,7 +2167,6 @@ + if(!dbf->db) + VSL(SLT_Error, 0, "vmod_netmapper: Failed initial load of JSON netmapper database %s (will keep trying periodically)", dbf->fn); + -+ pthread_mutex_unlock(&serial_init); + pthread_create(&dbf->updater, NULL, updater_start, dbf); +} + @@ -2255,10 +2244,10 @@ +Function STRING map(PRIV_VCL, STRING, STRING) diff --git a/lib/libvmod_netmapper/src/vnm.c b/lib/libvmod_netmapper/src/vnm.c new file mode 100644 -index 0000000..353fc89 +index 0000000..fd8170f --- /dev/null +++ b/lib/libvmod_netmapper/src/vnm.c -@@ -0,0 +1,274 @@ +@@ -0,0 +1,277 @@ +/* Copyright © 2013 Brandon L Black <[email protected]> + * + * This file is part of libvmod-netmapper. @@ -2531,6 +2520,9 @@ + stridx = ntree_lookup(d->tree, ainfo->ai_addr); + } + ++ if(ainfo) ++ freeaddrinfo(ainfo); ++ + return vnm_strdb_get(d->strdb, stridx); +} diff --git a/lib/libvmod_netmapper/src/vnm.h b/lib/libvmod_netmapper/src/vnm.h -- To view, visit https://gerrit.wikimedia.org/r/99554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibdc4bf573987805565d85a1481105de8977775b1 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/varnish Gerrit-Branch: testing/3.0.3plus-rc1 Gerrit-Owner: BBlack <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
