Re: diff: Fix send(2) EACCES mistake

2018-11-10 Thread Jan Klemkow
On Sat, Nov 10, 2018 at 11:22:48AM +0100, Claudio Jeker wrote: > On Fri, Nov 09, 2018 at 03:49:32PM -0700, Alexander Bluhm wrote: > > On Fri, Nov 09, 2018 at 09:03:20PM +0100, Jan Klemkow wrote: > > > On Fri, Nov 09, 2018 at 12:36:20PM -0700, Alexander Bluhm wrote: > > > > On Fri, Nov 09, 2018 at

Re: diff: Fix send(2) EACCES mistake

2018-11-10 Thread Claudio Jeker
On Fri, Nov 09, 2018 at 03:49:32PM -0700, Alexander Bluhm wrote: > On Fri, Nov 09, 2018 at 09:03:20PM +0100, Jan Klemkow wrote: > > On Fri, Nov 09, 2018 at 12:36:20PM -0700, Alexander Bluhm wrote: > > > On Fri, Nov 09, 2018 at 08:24:47PM +0100, Jan Klemkow wrote: > > > > Perfect, I also think its

Re: diff: Fix send(2) EACCES mistake

2018-11-09 Thread Jason McIntyre
On Fri, Nov 09, 2018 at 03:49:32PM -0700, Alexander Bluhm wrote: > On Fri, Nov 09, 2018 at 09:03:20PM +0100, Jan Klemkow wrote: > > On Fri, Nov 09, 2018 at 12:36:20PM -0700, Alexander Bluhm wrote: > > > On Fri, Nov 09, 2018 at 08:24:47PM +0100, Jan Klemkow wrote: > > > > Perfect, I also think its

Re: diff: Fix send(2) EACCES mistake

2018-11-09 Thread Alexander Bluhm
On Fri, Nov 09, 2018 at 09:03:20PM +0100, Jan Klemkow wrote: > On Fri, Nov 09, 2018 at 12:36:20PM -0700, Alexander Bluhm wrote: > > On Fri, Nov 09, 2018 at 08:24:47PM +0100, Jan Klemkow wrote: > > > Perfect, I also think its more intuitive to get a "permission denied" > > > in case of a pf(4)

Re: diff: Fix send(2) EACCES mistake

2018-11-09 Thread Jan Klemkow
On Fri, Nov 09, 2018 at 12:36:20PM -0700, Alexander Bluhm wrote: > On Fri, Nov 09, 2018 at 08:24:47PM +0100, Jan Klemkow wrote: > > Perfect, I also think its more intuitive to get a "permission denied" > > in case of a pf(4) block then a "Host is unreachable". The diff below > > corrects kernel

Re: diff: Fix send(2) EACCES mistake

2018-11-09 Thread Alexander Bluhm
On Fri, Nov 09, 2018 at 08:24:47PM +0100, Jan Klemkow wrote: > Perfect, I also think its more intuitive to get a "permission denied" > in case of a pf(4) block then a "Host is unreachable". The diff below > corrects kernel and extents the manpage for pf(4) blocks. Don't forget divert_output()

Re: diff: Fix send(2) EACCES mistake

2018-11-09 Thread Jan Klemkow
On Fri, Nov 09, 2018 at 06:57:16PM +0100, Claudio Jeker wrote: > On Fri, Nov 09, 2018 at 06:09:34PM +0100, Jan Klemkow wrote: > > I printed the code path below to make it easier to review the diff. > > While I was following the code path again, I found an inconsistency > > between udp_output() and

Re: diff: Fix send(2) EACCES mistake

2018-11-09 Thread Alexander Bluhm
On Fri, Nov 09, 2018 at 06:57:16PM +0100, Claudio Jeker wrote: > I would prefer to remove this errno translation magic for pf(4) in the > midlayer of the network code. As shown it is always prone for errors. Yes. I always confuses me when I see "no route to host" if pf blocks the packet. If a

Re: diff: Fix send(2) EACCES mistake

2018-11-09 Thread Claudio Jeker
On Fri, Nov 09, 2018 at 06:09:34PM +0100, Jan Klemkow wrote: > On Tue, Oct 30, 2018 at 07:13:24AM +, Jason McIntyre wrote: > > On Mon, Oct 29, 2018 at 11:55:52PM +0100, Jan Klemkow wrote: > > > On Sun, Oct 28, 2018 at 10:58:34PM +, Jason McIntyre wrote: > > > > On Sun, Oct 28, 2018 at

Re: diff: Fix send(2) EACCES mistake

2018-11-09 Thread Jan Klemkow
On Tue, Oct 30, 2018 at 07:13:24AM +, Jason McIntyre wrote: > On Mon, Oct 29, 2018 at 11:55:52PM +0100, Jan Klemkow wrote: > > On Sun, Oct 28, 2018 at 10:58:34PM +, Jason McIntyre wrote: > > > On Sun, Oct 28, 2018 at 09:40:33PM +0100, Jan Klemkow wrote: > > > > Unlike the manpage saids or

Re: diff: Fix send(2) EACCES mistake

2018-10-30 Thread Jason McIntyre
On Mon, Oct 29, 2018 at 11:55:52PM +0100, Jan Klemkow wrote: > On Sun, Oct 28, 2018 at 10:58:34PM +, Jason McIntyre wrote: > > On Sun, Oct 28, 2018 at 09:40:33PM +0100, Jan Klemkow wrote: > > > Unlike the manpage saids or one might think , sendto(2) sets errno to > > > EHOSTUNREACH instead of

Re: diff: Fix send(2) EACCES mistake

2018-10-29 Thread Jan Klemkow
On Sun, Oct 28, 2018 at 10:58:34PM +, Jason McIntyre wrote: > On Sun, Oct 28, 2018 at 09:40:33PM +0100, Jan Klemkow wrote: > > Unlike the manpage saids or one might think , sendto(2) sets errno to > > EHOSTUNREACH instead of EACCES in cases of blocking by pf(4) or not > > enabled broadcasts.

Re: diff: Fix send(2) EACCES mistake

2018-10-29 Thread Tom Smyth
yeah I agree with Jason, grammar would dictate that if you want to form a sentance with "a" followed by word beginning a vowel or having a silent consonant between the a and the vowel then an n would be inserted after the a would be inserted to make the sentence easier to pronounce ... but

Re: diff: Fix send(2) EACCES mistake

2018-10-28 Thread Jason McIntyre
On Sun, Oct 28, 2018 at 09:40:33PM +0100, Jan Klemkow wrote: > Hi, > > Unlike the manpage saids or one might think , sendto(2) sets errno to > EHOSTUNREACH instead of EACCES in cases of blocking by pf(4) or not > enabled broadcasts. Finally I ran into both cases and think, its time > to fix this

diff: Fix send(2) EACCES mistake

2018-10-28 Thread Jan Klemkow
Hi, Unlike the manpage saids or one might think , sendto(2) sets errno to EHOSTUNREACH instead of EACCES in cases of blocking by pf(4) or not enabled broadcasts. Finally I ran into both cases and think, its time to fix this issue. The diff suggests a new explanation that should cover all error