< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate] handling all IPs/breaks virtual hosting


I like the idea of only calling that code if you bind to INADDR_ANY (0.0.0.0).  I suppose the condition would need to be that if any transport is bound to INADDR_ANY then run that code, otherwise just add all the specific IP addresses bound to each transport.

Scott

On Wed, Aug 1, 2012 at 5:58 PM, Daniel Pocock <daniel@xxxxxxxxxxxxx> wrote:



I just came across this in ReproRunner.cxx:


   list<pair<Data,Data> > ips = DnsUtil::getInterfaces();
   for ( list<pair<Data,Data> >::const_iterator i=ips.begin();
i!=ips.end(); i++)
   {
      if(log) InfoLog( << "Adding domain for IP " << i->second << " from
interface " << i->first  );
      tu.addDomain(i->second);
   }



Basically, all IPs are added, and this means that

    Proxy.isMyDomain(some other IP on the host)

returns true

So if two repros are running with different IPs on the same host, then
they get a bit confused, because they both challenge each other's requests.

In my config, I have a specific IP (not 0.0.0.0) for each repro
instance, so I would really not expect this interface scanning code.

Can anyone comment on this code?  Could it be removed, or should it only
be run if config specifies binding to 0.0.0.0?

_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel