Module: sip-router Branch: master Commit: e1b3961b16b76b02ae7ad5f52b2e9db126f81ff9 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e1b3961b...
Author: Carsten Bock carsten@ng-voice.com Committer: Carsten Bock carsten@ng-voice.com Date: Tue Sep 11 19:39:32 2012 +0200
Do not perform a lookup for IPv4 addresses, if only listening on IPv6 sockets.
---
resolve.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/resolve.h b/resolve.h index 8ce68e6..eeae6c2 100644 --- a/resolve.h +++ b/resolve.h @@ -429,8 +429,10 @@ static inline struct hostent* _resolvehost(char* name) } #endif #endif - /* ipv4 */ - he=gethostbyname(name); + if (socket_types & SOCKET_T_IPV4) { + /* ipv4 */ + he=gethostbyname(name); + } #ifdef USE_IPV6 if(he==0 && cfg_get(core, core_cfg, dns_try_ipv6)){ #ifndef DNS_IP_HACK
17 sep 2012 kl. 17:29 skrev admin@sip-router.org:
Module: sip-router Branch: master Commit: e1b3961b16b76b02ae7ad5f52b2e9db126f81ff9 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e1b3961b...
Author: Carsten Bock carsten@ng-voice.com Committer: Carsten Bock carsten@ng-voice.com Date: Tue Sep 11 19:39:32 2012 +0200
Do not perform a lookup for IPv4 addresses, if only listening on IPv6 sockets.
Hmm.
What if I know that I have an outbound proxy that is dual stack?
If the server listening to only IPv6 sockets needs to call me, it needs to know that the only target is IPv4 so either fail or forward to a dual stack proxy.
Maybe this should be configurable. And of course, the opposite is true too. An ipv4-only server should be able to call IPv6-only by using another proxy.
/O
On 17.09.2012 20:26, Olle E. Johansson wrote:
17 sep 2012 kl. 17:29 skrev admin@sip-router.org:
Module: sip-router Branch: master Commit: e1b3961b16b76b02ae7ad5f52b2e9db126f81ff9 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e1b3961b...
Author: Carsten Bock carsten@ng-voice.com Committer: Carsten Bock carsten@ng-voice.com Date: Tue Sep 11 19:39:32 2012 +0200
Do not perform a lookup for IPv4 addresses, if only listening on IPv6 sockets.
Hmm.
What if I know that I have an outbound proxy that is dual stack?
If the server listening to only IPv6 sockets needs to call me, it needs to know that the only target is IPv4 so either fail or forward to a dual stack proxy.
Maybe this should be configurable. And of course, the opposite is true too. An ipv4-only server should be able to call IPv6-only by using another proxy.
Do the DNS lookup for the external domain on the border element, which is dual-stack.
regards Klaus
17 sep 2012 kl. 21:11 skrev Klaus Darilion klaus.mailinglists@pernau.at:
On 17.09.2012 20:26, Olle E. Johansson wrote:
17 sep 2012 kl. 17:29 skrev admin@sip-router.org:
Module: sip-router Branch: master Commit: e1b3961b16b76b02ae7ad5f52b2e9db126f81ff9 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e1b3961b...
Author: Carsten Bock carsten@ng-voice.com Committer: Carsten Bock carsten@ng-voice.com Date: Tue Sep 11 19:39:32 2012 +0200
Do not perform a lookup for IPv4 addresses, if only listening on IPv6 sockets.
Hmm.
What if I know that I have an outbound proxy that is dual stack?
If the server listening to only IPv6 sockets needs to call me, it needs to know that the only target is IPv4 so either fail or forward to a dual stack proxy.
Maybe this should be configurable. And of course, the opposite is true too. An ipv4-only server should be able to call IPv6-only by using another proxy.
Do the DNS lookup for the external domain on the border element, which is dual-stack.
Sorry, I wasn't very clear.
If my proxy has an IPv6-outbound-proxy that I *ONLY* use for IPv6 gatewaying, I need to be able to make the routing decision locally. If my local IPv4-only server can't resolve IPv6 addresses, I have no way to figure out what's going on and make a decision that "this target is on IPv6 so I need to forward that to my IPv6-connected peer".
/O
On 18.09.2012 09:40, Olle E. Johansson wrote:
17 sep 2012 kl. 21:11 skrev Klaus Darilion klaus.mailinglists@pernau.at:
On 17.09.2012 20:26, Olle E. Johansson wrote:
17 sep 2012 kl. 17:29 skrev admin@sip-router.org:
Module: sip-router Branch: master Commit: e1b3961b16b76b02ae7ad5f52b2e9db126f81ff9 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e1b3961b...
Author: Carsten Bock carsten@ng-voice.com Committer: Carsten Bock carsten@ng-voice.com Date: Tue Sep 11 19:39:32 2012 +0200
Do not perform a lookup for IPv4 addresses, if only listening on IPv6 sockets.
Hmm.
What if I know that I have an outbound proxy that is dual stack?
If the server listening to only IPv6 sockets needs to call me, it needs to know that the only target is IPv4 so either fail or forward to a dual stack proxy.
Maybe this should be configurable. And of course, the opposite is true too. An ipv4-only server should be able to call IPv6-only by using another proxy.
Do the DNS lookup for the external domain on the border element, which is dual-stack.
Sorry, I wasn't very clear.
If my proxy has an IPv6-outbound-proxy that I *ONLY* use for IPv6 gatewaying, I need to be able to make the routing decision locally. If my local IPv4-only server can't resolve IPv6 addresses, I have no way to figure out what's going on and make a decision that "this target is on IPv6 so I need to forward that to my IPv6-connected peer".
Indeed. That's a reason to not have an IPv6 *only* gateway ;-)
Anyway, shouldn't a proxy only have to deal with the next hop, not the next but one hop?
I think it would be really complicated to have the "next but one IP protocol" decision in the configuration file: you would have to DNS lookups (RFC3263) manually, and based on the result set the next hop address.
regards Klaus