Erik E. Fair
2013-03-25 18:46:02 UTC
I just filed PR kern/47693 which deals with an immediate deficiency
in our ICMP handling - we don't handle unreachable code 13 valid
code as valid. That needs to be fixed ASAP, and the patch pulled
up to both netbsd-6 and netbsd-5.
However, there's an additional semantic issue for programmers: I
believe Unix needs an additional errno code to indicate "remote
permission denied" as distinct from "connection refused" (daemon's
not listening on that port). There are multiple ICMP unreachable
codes which make this semantic error distinction.
I don't think we can use EPERM itself because using EPERM would
likely confuse the programmer/user as to where permission is being
refused: locally or remotely, and that's a key piece of information
needed to diagnose and remedy application failure.
This is something that all the BSDs (and Linux) should do, too.
I suggest:
EPEERPERM (number TBD) "peer refused permission"
or
ERMTPERM (number TBD) "remote host refused permission"
Erik <***@netbsd.org>
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
in our ICMP handling - we don't handle unreachable code 13 valid
code as valid. That needs to be fixed ASAP, and the patch pulled
up to both netbsd-6 and netbsd-5.
However, there's an additional semantic issue for programmers: I
believe Unix needs an additional errno code to indicate "remote
permission denied" as distinct from "connection refused" (daemon's
not listening on that port). There are multiple ICMP unreachable
codes which make this semantic error distinction.
I don't think we can use EPERM itself because using EPERM would
likely confuse the programmer/user as to where permission is being
refused: locally or remotely, and that's a key piece of information
needed to diagnose and remedy application failure.
This is something that all the BSDs (and Linux) should do, too.
I suggest:
EPEERPERM (number TBD) "peer refused permission"
or
ERMTPERM (number TBD) "remote host refused permission"
Erik <***@netbsd.org>
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de