[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exim and IPv6 Help



Hello,

First off I apologize for cross posting it to both tech@ and ipv6@. I
am trying to get exim working with IPv6 on OpenBSD. Apparently this
was never tested before, and there are issues with this. I'll try not
to delve too deep in exim's working details here.

Specifically, "if" IPv6 support is compiled in, exim does listen on
the IPv6 interface but it fails to listen on the IPv4 interface.
Working with the exim developers, they have managed to get the
attached changes specifically for OpenBSD and IPv6. But now the daemon
tries bind() to the all the interfaces and fails for the Ipv4
interfaces. I am at loss now on what should be done next and would
appreciate any help from you guru's out there.

[root@satan exim-3.31/build-OpenBSD-i386] 518 $fstat -p 18728
USER     CMD          PID   FD MOUNT      INUM MODE       R/W    DV|SZ
exim     exim       18728   wd /var      48028 drwxr-x---   r      512
exim     exim       18728    0* internet6 stream tcp 0xe0bedd00 *:2525

Patch attached.

Rgds

--
Kevin Sindhu			<kevin at tgivan dot com>
Systems Engineer
TGI Technologies Inc.		Tel: (604) 872-6676 Ext 321
107 E 3rd Avenue		Fax: (604) 872-6601
Vancouver,BC V5T 1C7
Canada.
--- OS/os.h-OpenBSD.orig	Tue Jul 10 11:55:37 2001
+++ OS/os.h-OpenBSD	Tue Jul 10 11:55:53 2001
@@ -3,6 +3,7 @@
 #define HAVE_BSD_GETLOADAVG
 #define HAVE_MMAP
 #define HAVE_SYS_MOUNT_H
+#define SIOCGIFCONF_GIVES_ADDR
 
 typedef struct flock flock_t;
 
--- src/daemon.c.orig	Tue Jul 10 11:52:32 2001
+++ src/daemon.c	Tue Jul 10 11:53:33 2001
@@ -841,7 +841,13 @@
 
     for (i = 9; i >= 0; i--)
       {
-      if (bind(listen_sockets[sk], (struct sockaddr *)&sin, sizeof(sin)) < 0)
+      if (bind(listen_sockets[sk], (struct sockaddr *)&sin,
+               #ifdef HAVE_IPV6
+               ipv6_socket? sizeof(sin.v6) : sizeof(sin.v4)
+               #else
+               sizeof(sin)
+               #endif
+           ) < 0)
         {
         char *msg = strerror(errno);
         char *addr = (ipa->address[0] == 0)? "(any)" : ipa->address;