diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-09-25 23:16:51 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-09-25 23:16:51 +0800 |
commit | 8eb39923ceec15570d3e709103f118115f44a2fd (patch) | |
tree | 979b6f28853f4d13c31217c9f788bfa078a3ed93 /camel/providers | |
parent | edafb41f2a1b8acb546591a7aaad4177811c93c9 (diff) | |
download | gsoc2013-evolution-8eb39923ceec15570d3e709103f118115f44a2fd.tar gsoc2013-evolution-8eb39923ceec15570d3e709103f118115f44a2fd.tar.gz gsoc2013-evolution-8eb39923ceec15570d3e709103f118115f44a2fd.tar.bz2 gsoc2013-evolution-8eb39923ceec15570d3e709103f118115f44a2fd.tar.lz gsoc2013-evolution-8eb39923ceec15570d3e709103f118115f44a2fd.tar.xz gsoc2013-evolution-8eb39923ceec15570d3e709103f118115f44a2fd.tar.zst gsoc2013-evolution-8eb39923ceec15570d3e709103f118115f44a2fd.zip |
If the localhost lookup results in a numeric IPv6 host, use the form
2003-09-25 Jeffrey Stedfast <fejj@ximian.com>
* providers/smtp/camel-smtp-transport.c (smtp_helo): If the
localhost lookup results in a numeric IPv6 host, use the form
"[IPv6:<addr>]" as specified in rfc2821. Fixes bug #46006.
svn path=/trunk/; revision=22694
Diffstat (limited to 'camel/providers')
-rw-r--r-- | camel/providers/smtp/camel-smtp-transport.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index e2e1fccf5c..120b24d1dc 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -895,8 +895,10 @@ smtp_helo (CamelSmtpTransport *transport, CamelException *ex) } else { #ifdef ENABLE_IPv6 char ip[MAXHOSTNAMELEN + 1]; + const char *proto; - name = g_strdup_printf ("[%s]", inet_ntop (af, transport->localaddr->address, ip, MAXHOSTNAMELEN)); + proto = transport->localaddr->family == CAMEL_TCP_ADDRESS_IPv6 ? "IPv6:" : ""; + name = g_strdup_printf ("[%s%s]", proto, inet_ntop (af, transport->localaddr->address, ip, MAXHOSTNAMELEN)); #else /* We *could* use inet_ntoa() here, but it's probably not worth it since we would have to worry about |