linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: mtk.manpages@gmail.com
Cc: linux-man@vger.kernel.org, netdev@vger.kernel.org
Subject: connect(2) man page EACCES error (IPv6 usage)
Date: Tue, 28 Apr 2020 12:31:19 +0100	[thread overview]
Message-ID: <20200428113118.GR25745@shell.armlinux.org.uk> (raw)

Hi,

While trying to work out a problem being reported in exim's logs,
it has been found that an update to the connect(2) man page is
needed to clear up the Linux kernel behaviour, which has been this
way since at least the dawn of git history.

The current connect(2) page, as per kernel.org, says:

        EACCES For UNIX domain sockets, which are identified by pathname:
               Write permission is denied on the socket file, or search
               permission is denied for one of the directories in the path
               prefix.  (See also path_resolution(7).)

        EACCES, EPERM
               The user tried to connect to a broadcast address without
               having the socket broadcast flag enabled or the connection
               request failed because of a local firewall rule.

EACCES can also be returned from connect(2) due to a remote firewall
rule as well, or due to one of several "destination unreachable" codes
via the IPv6 protocol - please see: the tab_unreach array in
net/ipv6/icmp6.h.  These codes are ADM_PROHIBITED, POLICY_FAIL, and
REJECT_ROUTE.  Whether all these are appropriate for connect(2), I'm
unsure.  However, ADM_PROHIBITED certainly is, and has been the cause
of the issue I've been seeing with exim.

Besides exim, it also appears if you use telnet to an IPv6 address
which elicits an ADM_PROHIBITED destination unreachable response
from some remote router/firewall.

So, it is not true that it's only restricted to local firewall rules.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up

                 reply	other threads:[~2020-04-28 11:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200428113118.GR25745@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).