From 368b25b6435120064669fdfde4205b0df92a2c65 Mon Sep 17 00:00:00 2001 From: Tomek Orzechowski Date: Mon, 27 Jan 2003 02:10:40 +0000 Subject: [PATCH] - fixes against 2.0.3 (generally - 2.0) - now builds, should work Changed files: postfix-ipv6.patch -> 1.18 --- postfix-ipv6.patch | 71 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/postfix-ipv6.patch b/postfix-ipv6.patch index 539b1c0..2266407 100644 --- a/postfix-ipv6.patch +++ b/postfix-ipv6.patch @@ -902,6 +902,44 @@ diff -Nur postfix-1.1.2.orig/src/smtp/smtp_addr.c postfix-1.1.2/src/smtp/smtp_ad + } } + /* +@@ -400,12 +400,36 @@ + */ + self = proxy_inet_addr_list(); + for (addr = addr_list; addr; addr = addr->next) { +- for (i = 0; i < self->used; i++) ++ for (i = 0; i < self->used; i++) { ++#ifdef INET6 ++ sa = (struct sockaddr *)&self->addrs[i]; ++ switch(addr->type) { ++ case T_AAAA: ++ /* XXX scope */ ++ if (sa->sa_family != AF_INET6) ++ break; ++ if (memcmp(&((struct sockaddr_in6 *)sa)->sin6_addr, ++ addr->data, sizeof(struct in6_addr)) == 0) { ++ return(addr); ++ } ++ break; ++ case T_A: ++ if (sa->sa_family != AF_INET) ++ break; ++ if (memcmp(&((struct sockaddr_in *)sa)->sin_addr, ++ addr->data, sizeof(struct in_addr)) == 0) { ++ return(addr); ++ } ++ break; ++ } ++#else + if (INADDRP(addr->data)->s_addr == self->addrs[i].s_addr) { + if (msg_verbose) + msg_info("%s: found at pref %d", myname, addr->pref); + return (addr); + } ++#endif ++ } + } + /* diff -Nur postfix-1.1.2.orig/src/smtp/smtp_connect.c postfix-1.1.2/src/smtp/smtp_connect.c --- postfix-1.1.2.orig/src/smtp/smtp_connect.c Mon Jan 28 12:38:34 2002 @@ -1167,6 +1205,39 @@ diff -Nur postfix-1.1.2.orig/src/smtp/smtp_connect.c postfix-1.1.2/src/smtp/smtp smtp_errno = SMTP_RETRY; close(sock); return (0); +@@ -369,7 +369,7 @@ + stream = vstream_fdopen(sock, O_RDWR); + if ((ch = VSTREAM_GETC(stream)) == VSTREAM_EOF) { + vstring_sprintf(why, "connect to %s[%s]: server dropped connection without sending the initial greeting", +- addr->name, inet_ntoa(sin.sin_addr)); ++ addr->name, hbuf); + smtp_errno = SMTP_RETRY; + vstream_fclose(stream); + return (0); +@@ -381,7 +381,7 @@ + */ + if (ch == '4' && var_smtp_skip_4xx_greeting) { + vstring_sprintf(why, "connect to %s[%s]: server refused mail service", +- addr->name, inet_ntoa(sin.sin_addr)); ++ addr->name, hbuf); + smtp_errno = SMTP_RETRY; + vstream_fclose(stream); + return (0); +@@ -392,12 +392,12 @@ + */ + if (ch == '5' && var_smtp_skip_5xx_greeting) { + vstring_sprintf(why, "connect to %s[%s]: server refused mail service", +- addr->name, inet_ntoa(sin.sin_addr)); ++ addr->name, hbuf); + smtp_errno = SMTP_RETRY; + vstream_fclose(stream); + return (0); + } +- return (smtp_session_alloc(dest, stream, addr->name, inet_ntoa(sin.sin_addr))); ++ return (smtp_session_alloc(dest, stream, addr->name, hbuf)); + } + + /* smtp_connect_host - direct connection to host */ diff -Nur postfix-1.1.2.orig/src/smtp/smtp_unalias.c postfix-1.1.2/src/smtp/smtp_unalias.c --- postfix-1.1.2.orig/src/smtp/smtp_unalias.c Thu Sep 28 19:06:09 2000 +++ postfix-1.1.2/src/smtp/smtp_unalias.c Mon Jan 28 12:40:04 2002 -- 2.44.0