[Asterisk-bsd] Re: ast_lookup_iface in acl.c

Olle E. Johansson oej at edvina.net
Mon Nov 15 11:06:11 CST 2004


Tom Ivar Helbekkmo wrote:

> "Dr. Rich Murphey" <Rich at WhiteOakLabs.com> writes:
> 
> 
>>It looks like ast_ouraddrfor() doesn't call ast_lookup_iface() on 
>>FreeBSD, but rather searches through the routing tables.
> 
> 
> ...which is correct, and should not be changed.  Under BSD, when you
> don't bind to a specific source address, the routing table is where
> the choice of source address for a specific destination address is
> made.  The address chosen as source need not be the primary address on
> the interface the traffic is routed out through.  In fact, it need not
> even reside on that interface -- it might, for instance, be configured
> on a loopback interface instead.  (You use the -ifa flag with route(8)
> to create a routing table entry to handle this situation.)
The problem I am trying to solve is that we send FROM the wrong IP
address, so I need to know what addresses there is to pick from...

I will not change ast_ouraddrfor() but need to call ast_lookup_iface()
directly.

/O


More information about the Asterisk-BSD mailing list