GeoIPv6 patch

Gregor Kališnik gregor at unimatrix-one.org
Sat Jun 11 14:48:06 MSD 2011


Hi.

Sending patch with snprintf.

Also note that this patch needs geoip-1.4.7 (if nginx is compiled with ipv6 
support).

Best regards.

On Saturday 11 of June 2011 13:10:24 you wrote:
> 2011/6/11 Gregor Kališnik <gregor at unimatrix-one.org>:
> > Hi.
> 
> Hi Gregor,
> 
> > I've created a patch for nginx GeoIP module to also use the GeoIP IPv6
> > version. The patch is attached.
> > 
> > Currently it runs on http://www.podnapisi.net and there are no appearant
> > problems.
> 
> Sounds great,
> 
> Maybe should change
> + sprintf(temp_mapped, "::FFFF:%s", temp);
> to
> + snprintf(temp_mapped, sizeof(temp_mapped), "::FFFF:%s", temp);
> 
> In case we get some forged variable as input (e.g. nginx used as
> load-balancer for another nginx and not using REMOTE_ADDR but
> X-Forwarded-For).
> 
> A.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx-geoipv6.patch
Type: text/x-patch
Size: 6956 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx-devel/attachments/20110611/6583ac14/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://nginx.org/pipermail/nginx-devel/attachments/20110611/6583ac14/attachment.pgp>


More information about the nginx-devel mailing list