June 15, 2011 06:46AM
Hi.

On Wednesday 15 of June 2011 03:47:18 you wrote:
> Hello!
>
> On Tue, Jun 14, 2011 at 07:52:10AM +0200, Gregor Kališnik wrote:
> > Hi.
> >

>
> I believe it would be sufficient to just check for geoipv6_t type.
>
> ngx_feature_incs="#include <GeoIP.h>"
> ...
> ngx_feature_test="geoipv6_t v6addr;
> v6addr.s6_addr[0] = 1;"
>

I've checked GeoIP.h from geoip-1.4.6 and geoip-1.4.7. Both have geoipv6_t.
But the 1.4.6 version doesn't support GeoIP City IPv6 version and check for
geoipv6_t would break compilation when using geoip-1.4.6.

Should I break GeoIP IPv6 code into two parts? First checking for geoipv6_t
and second checking for GeoCity related define/type?

>
> IMHO, something like this will be more readable:
>
> #if (NGX_HAVE_GEOIP_IPV6)
> val = gcf->country_ipv6
> ? handler_v6(gcf->country, ngx_http_geoip_addr_v6(r))
>
> : handler(gcf->country,
> : ngx_http_geoip_addr(r));
>
> #else
> val = handler(gcf->country, ngx_http_geoip_addr(r));
> #endif
>
> Just a matter of taste though.
>

Hope I got the identitation right :) .


Best regards,
Gregor Kališnik_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

GeoIPv6 patch

MasterMind2k 2771 June 11, 2011 04:36AM

Re: GeoIPv6 patch

Arnaud GRANAL 932 June 11, 2011 06:12AM

Re: GeoIPv6 patch

MasterMind2k 1144 June 11, 2011 06:50AM

Re: GeoIPv6 patch

Maxim Dounin 976 June 11, 2011 08:56AM

Re: GeoIPv6 patch

MasterMind2k 1134 June 11, 2011 02:22PM

Re: GeoIPv6 patch

MasterMind2k 1137 June 14, 2011 01:54AM

Re: GeoIPv6 patch

Maxim Dounin 849 June 14, 2011 07:48PM

Re: GeoIPv6 patch

MasterMind2k 1213 June 15, 2011 06:46AM

Re: GeoIPv6 patch

Maxim Dounin 936 June 21, 2011 12:54PM

Re: GeoIPv6 patch

MasterMind2k 1179 June 21, 2011 05:14PM

Re: GeoIPv6 patch

Maxim Dounin 962 June 21, 2011 05:46PM

Re: GeoIPv6 patch

MasterMind2k 1408 June 22, 2011 04:40AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 248
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready