Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Wishlist ] Please port to VMOD changes on Varnish 4 #7

Open
thatguyatgithub opened this issue Apr 23, 2014 · 2 comments
Open

[ Wishlist ] Please port to VMOD changes on Varnish 4 #7

thatguyatgithub opened this issue Apr 23, 2014 · 2 comments

Comments

@thatguyatgithub
Copy link

Hi.

Since Varnish 4, the VMODs need to be changed, since the old sess struct has been split, some data is in vrt_ctx->req, and some is in vrt_vtx->req->sp.

varnishdCommand failed with error code 106
Message from C-compiler:
./vcl.7z2OalIg.c:1258:44: warning: ‘struct sess’ declared inside parameter list [enabled by default]
 void vcl_geoip_send_synthetic(const struct sess *sp) {
                                            ^
./vcl.7z2OalIg.c:1258:44: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
./vcl.7z2OalIg.c: In function ‘vcl_geoip_send_synthetic’:
./vcl.7z2OalIg.c:1260:5: warning: passing argument 1 of ‘VRT_r_client_ip’ from incompatible pointer type [enabled by default]
     vcl_string *ip = VRT_IP_string(sp, VRT_r_client_ip(sp));
     ^
./vcl.7z2OalIg.c:431:8: note: expected ‘const struct vrt_ctx *’ but argument is of type ‘const struct sess *’
 VCL_IP VRT_r_client_ip(const struct vrt_ctx *);
[140 lines truncated]
Running C-compiler failed, exit 1
VCL compilation failed
Error: vcl.load root:dc384c58-0338-411b-8be8-2b306ca075fc /etc/varnish/default.vcl failed
 failed!
@cosimo
Copy link
Owner

cosimo commented Apr 29, 2014

Thanks! I'm a long way from migrating to Varnish 4, so I'm not sure when I'll have time for this :-(

@cosimo
Copy link
Owner

cosimo commented Jul 17, 2015

I would recommend you to look at https://github.com/fgsch/libvmod-geoip2 for Varnish 4 compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants