I found that for IPv6 connections, tcpserver wasn't setting some of the
TCP6xxxx environment variables. With a few patches to add them it now
seems to work well with mailfront on an IPv6 connection.
Regards,
John Levine, johnl@iecc.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail.
http://jl.ly *** ucspi-tcp6-0.99.1/src/tcpserver.c 2013-11-11 12:55:29.000000000 -0500
--- ucspi-tcp6-0.99.1a/src/tcpserver.c 2014-01-05 17:22:40.000000000 -0500
***************
*** 1,4 ****
--- 1,5 ----
#include <sys/types.h>
+ #include <unistd.h>
#include <sys/param.h>
#include <netdb.h>
#include "uint16.h"
***************
*** 167,173 ****
socket_tcpnodelay(t);
if (*banner) {
! buffer_init(&b,write,t,bspace,sizeof bspace);
if (buffer_putsflush(&b,banner) == -1)
strerr_die2sys(111,DROP,"unable to print banner: ");
}
--- 168,174 ----
socket_tcpnodelay(t);
if (*banner) {
! buffer_init(&b,(int (*)())write,t,bspace,sizeof bspace);
if (buffer_putsflush(&b,banner) == -1)
strerr_die2sys(111,DROP,"unable to print banner: ");
}
***************
*** 196,204 ****
env("TCPLOCALPORT",localportstr);
env("TCPLOCALHOST",localhost);
! if (!mappedv4 && scope_id)
! env("TCP6INTERFACE",socket_getifname(scope_id));
!
if (flagremotehost)
if (dns_name6(&remotehostsa,remoteip) == 0)
if (remotehostsa.len) {
--- 197,209 ----
env("TCPLOCALPORT",localportstr);
env("TCPLOCALHOST",localhost);
! if(!mappedv4) {
! env("TCP6LOCALIP",localipstr);
! env("TCP6LOCALHOST",localhost);
! env("TCP6LOCALPORT",localportstr);
! if (scope_id)
! env("TCP6INTERFACE",socket_getifname(scope_id));
! }
if (flagremotehost)
if (dns_name6(&remotehostsa,remoteip) == 0)
if (remotehostsa.len) {
***************
*** 327,336 ****
}
}
main(int argc,char **argv)
{
char *hostname;
! char *portname;
int opt;
struct servent *se;
char *x;
--- 332,342 ----
}
}
+ int
main(int argc,char **argv)
{
char *hostname;
! /* char *portname; */
int opt;
struct servent *se;
char *x;
***************
*** 432,438 ****
localipstr[ip6_compactaddr(localipstr,localip)]= 0;
localportstr[fmt_ulong(localportstr,localport)] = 0;
if (flag1) {
! buffer_init(&b,write,1,bspace,sizeof bspace);
buffer_puts(&b,localipstr);
buffer_puts(&b," : ");
buffer_puts(&b,localportstr);
--- 438,444 ----
localipstr[ip6_compactaddr(localipstr,localip)]= 0;
localportstr[fmt_ulong(localportstr,localport)] = 0;
if (flag1) {
! buffer_init(&b,(int (*)())write,1,bspace,sizeof bspace);
buffer_puts(&b,localipstr);
buffer_puts(&b," : ");
buffer_puts(&b,localportstr);