BBlack has submitted this change and it was merged.

Change subject: fix another possible netmapper-1.3+v4 FE crash
......................................................................


fix another possible netmapper-1.3+v4 FE crash

Change-Id: Iddb35c4438e4a0efe4b394f2aae839fa0766eaf7
---
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  BBlack: Verified; Looks good to me, approved



diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index 58a2e3b..738490e 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -167,7 +167,9 @@
 
                // if it's an outside IP, use it to set XCIP (otherwise leave
                // XCIP alone and it's still the proxy's IP)
-               if(<%= @std_ipcast %>.ip(req.http.maybe-xcip, "127.0.0.1") !~ 
wikimedia_nets) {
+               if(req.http.maybe-xcip && <%= @std_ipcast 
%>.ip(req.http.maybe-xcip, "127.0.0.1") !~ wikimedia_nets) {
+                       // the check for empty/false maybe-xcip is to prevent
+                       // the same netmapper-1.3 breakage as the 192.0.2.1 hack
                        set req.http.X-Client-IP = req.http.maybe-xcip;
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/311338
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iddb35c4438e4a0efe4b394f2aae839fa0766eaf7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <bbl...@wikimedia.org>
Gerrit-Reviewer: BBlack <bbl...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to