httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Monson <ch...@orangatango.net>
Subject Re: [PATCH] IPLookups (revisited)
Date Tue, 11 Mar 2003 17:51:04 GMT
> what does "change the entries in proxy_util.c" mean? 


There are some calls to apr_sockaddr_info_get in proxy_util.c, and I 
wasn't really sure whether they should be looking  at this flag or not.  
In some cases (where we already have an IP address, etc) it is clearly 
something that they should not do.

>> <snip>
>> do things on a per-directory basis).
>
>
> does anybody else have an opinion here?  I'm guessing it isn't 
> necessary, but I don't have a good feel 

I think it is probably not necessary to do things on a per-directory 
basis, either.  I can certainly modify the patch to remove the request 
dependency, but *some* information will need to be passed into the 
configuration accessor (like the server_rec, etc). Any thoughts?

Again, my motivation for allowing per-directory stuff had more to do 
with the fact that HostNameLookups does the same thing than anything 
else.  Is anyone using that functionality for HostNameLookups, or is 
that also overkill?

> I would like us to create an interface that allows "IPLookups 
> IPv[46]Only" to be possible with some follow-on enhancements, so
> I think this needs to tell the caller two things:
>
>   what family to pass to apr_sockaddr_info_get
>   what flags to turn on for apr_sockaddr_info_get
>
> If the conf file says
>
>   IPLookups All
>
>     returned family is APR_UNSPEC, returned flag is 0
>
>   IPLookups IPv4OK
>
>     returned family is APR_UNSPEC, returned flag is APR_IPV4_ADDR_OK
>
>   IPLookups IPv6OK
>
>     returned family is APR_UNSPEC, returned flag is APR_IPV6_ADDR_OK
>
> and after future enhancement
>
>   IPLookups IPv4Only
>
>     returned family is APR_INET, returned flag is 0
>
>   IPLookups IPv6Only
>
>     returned family is APR_INET6, returned flag is 0
>
> so no return code, and two apr_int32_t * parameters after request_rec * 

I started to implement this, and then I checked the archives and found 
that it had been discussed previously.  Adding IPvxOnly was considered 
the "optimization of an error path" and therefore unnecessary, but this 
was a while ago.  If there are fresh insights, I would love to hear 
them.  I don't have much of a feel for this particular issue, though the 
implementation would be trivial.

C


Mime
View raw message