Subject: No IPv6 in the kernel vs socket(2) errno vs postfix
To: None <>
From: Valeriy E. Ushakov <>
List: tech-net
Date: 06/09/2006 17:16:59
I've tried to enable postfix on a machine w/out IPv6 support in the
kernel and it died with "socket: Protocol not supported".

I think there are two issues here

1) we return wrong errno.  To quote

    work around freebsd 5.4 brokenness (if you don't have IPv6 in the
    kernel, socket(PF_INET6,SOCK_STREAM,0) returns EPROTONOSUPPORT
    instead of EPFNOSUPPORT, which basically says "yeah, I know IPv6,
    but TCP?  never heard of it")

2) postfix checks for *another* wrong errno: EAFNOSUPPORT instead of
   EPFNOSUPPORT (search for the former in src/util/inet_proto.c)

PS: Please, keep me Cc'ed, I'm not subscribed to tech-net@

SY, Uwe
--                         |       Zu Grunde kommen          |       Ist zu Grunde gehen