MFC r302497:
authorkp <kp@FreeBSD.org>
Wed, 17 Aug 2016 09:24:46 +0000 (09:24 +0000)
committerkp <kp@FreeBSD.org>
Wed, 17 Aug 2016 09:24:46 +0000 (09:24 +0000)
commit26d31e281678303d3071eb6fbac74b22036f44c5
treecf23129933cf5ccb5d91ca4646030c027a4e7cb9
parenta4a505a3644b1e237d64ebdb723521122359ee90
MFC r302497:

pf: Map hook returns onto the correct error values

pf returns PF_PASS, PF_DROP, ... in the netpfil hooks, but the hook callers
expect to get E<foo> error codes.
Map the returns values. A pass is 0 (everything is OK), anything else means
pf ate the packet, so return EACCES, which tells the stack not to emit an ICMP
error message.

PR:     207598
sys/netpfil/pf/pf_ioctl.c