aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index cfe36ef306..c3cc137b0d 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2003-09-23 Jeffrey Stedfast <fejj@ximian.com>
* providers/local/camel-mbox-store.c (get_folder): If the CREATE
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