Net::Server 2.0.0 released -- Full IPv6 support

Mark Martinec Mark.Martinec+amavis at ijs.si
Thu Jun 7 15:51:54 CEST 2012


> In any case, the fix to your issue is in 2.002, which I'm now upgrading to, so
> everything works fine for me with my patch. ;)

Btw, there is an issue with Net::Server 2 when accepting connection
on a Unix socket. Attached patch to amavisd 2.7.0 fixes the problem.
The Net::Server 2.003 will also avoid the problem.

   Mark
-------------- next part --------------
--- amavisd.orig	2011-07-01 18:21:07.000000000 +0200
+++ amavisd	2012-06-07 15:38:53.907316403 +0200
@@ -11071,5 +11071,6 @@
            $sock->NS_proto eq 'UNIX';
   if ($is_ux) {
-    my($path) = $sock->NS_unix_path;
+    my($path) = Net::Server->VERSION >= 2 ? $sock->NS_port
+                                          : $sock->NS_unix_path;
     if (defined $interface_policy{$path}) {
       $bank_name = $interface_policy{$path};
@@ -11293,5 +11294,7 @@
   # $snmp_db->register_proc(2,0,'b')  if defined $snmp_db;  # begin protocol
     if ($ns_proto eq 'UNIX') {
-      $conn->socket_path($sock->NS_unix_path);
+      my($path) = Net::Server->VERSION >= 2 ? $sock->NS_port
+                                            : $sock->NS_unix_path;
+      $conn->socket_path($path);
       # how to test:  $ socat stdio unix-connect:/var/amavis/amavisd.sock,crnl
     } else {  # TCP, UDP, SSLEAY, SSL  (Net::Server::Proto submodules)


More information about the amavis-users mailing list