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.)
-tih
--
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway Hosting
www.eunet.no T +47-22092958 M +47-93013940 F +47-22092901 FWD 484145
>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.
Posted: Mon Nov 15, 2004 9:48 am Post subject: [Asterisk-bsd] Re: ast_lookup_iface in acl.c
On 16/11/2004 01:06 Olle E. Johansson said the following:
Quote:
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 had a similar problem on a multihomed freebsd box, but the localnet and
externip directives in sip.conf helped.
--
Regards, /\_/\ "All dogs go to heaven."
dinesh@alphaque.com (0 0) http://www.alphaque.com/
+==========================----oOO--(_)--OOo----==========================+
| for a in past present future; do |
| for b in clients employers associates relatives neighbours pets; do |
| echo "The opinions here in no way reflect the opinions of my $a $b." |
| done; done |
+=========================================================================+
Posted: Mon Nov 15, 2004 11:09 am Post subject: [Asterisk-bsd] Re: ast_lookup_iface in acl.c
Tom Ivar Helbekkmo wrote:
Quote:
"Olle E. Johansson" <oej@edvina.net> writes:
>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...
In what situation? Which part of the code is failing, and why isn't
ast_ouraddrfor() sufficient?
Well, at this point, no part of the code is failing. I am building some
new stuff in chan_sip2 and need to know which address we are sending from
and which interfaces we are connected to in a more intelligent way than
now - every interface or just one.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum