summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2018-11-10 18:40:35 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2018-11-10 18:40:35 +0000
commit730783be7b83b6cab87f8078148abb8996016173 (patch)
tree1b65b212a9a9d31cc7b97879f5cc10d5bef698d0 /sys
parentf025d0311096a2c1b0415575d48e624a6ee70522 (diff)
Do not translate the EACCES error from pf(4) to EHOSTUNREACH anymore.
It also translated a documented send(2) EACCES case erroneously. This was too much magic and always prone to errors. from Jan Klemkow; man page jmc@; OK claudio@
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_divert.c4
-rw-r--r--sys/netinet/raw_ip.c4
-rw-r--r--sys/netinet/tcp_output.c4
-rw-r--r--sys/netinet/udp_usrreq.c4
4 files changed, 4 insertions, 12 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index ec6b0dea5b0..3b7cb84a511 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_divert.c,v 1.59 2018/10/04 17:33:41 bluhm Exp $ */
+/* $OpenBSD: ip_divert.c,v 1.60 2018/11/10 18:40:34 bluhm Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -157,8 +157,6 @@ divert_output(struct inpcb *inp, struct mbuf *m, struct mbuf *nam,
error = ip_output(m, NULL, &inp->inp_route,
IP_ALLOWBROADCAST | IP_RAWOUTPUT, NULL, NULL, 0);
- if (error == EACCES) /* translate pf(4) error for userland */
- error = EHOSTUNREACH;
}
divstat_inc(divs_opackets);
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index d3d79872ed3..cfa54f2b5fc 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip.c,v 1.114 2018/10/04 17:33:41 bluhm Exp $ */
+/* $OpenBSD: raw_ip.c,v 1.115 2018/11/10 18:40:34 bluhm Exp $ */
/* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */
/*
@@ -292,8 +292,6 @@ rip_output(struct mbuf *m, struct socket *so, struct sockaddr *dstaddr,
error = ip_output(m, inp->inp_options, &inp->inp_route, flags,
inp->inp_moptions, inp, 0);
- if (error == EACCES) /* translate pf(4) error for userland */
- error = EHOSTUNREACH;
return (error);
}
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index ea25d06c7e9..27a8739081c 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_output.c,v 1.127 2018/11/09 14:14:31 claudio Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.128 2018/11/10 18:40:34 bluhm Exp $ */
/* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */
/*
@@ -1084,8 +1084,6 @@ out:
tcp_mtudisc(tp->t_inpcb, -1);
return (0);
}
- if (error == EACCES) /* translate pf(4) error for userland */
- error = EHOSTUNREACH;
if ((error == EHOSTUNREACH || error == ENETDOWN) &&
TCPS_HAVERCVDSYN(tp->t_state)) {
tp->t_softerror = error;
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index b2f5a6732d7..f224f35787f 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.253 2018/10/04 17:33:41 bluhm Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.254 2018/11/10 18:40:34 bluhm Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -1004,8 +1004,6 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct mbuf *addr,
error = ip_output(m, inp->inp_options, &inp->inp_route,
(inp->inp_socket->so_options & SO_BROADCAST), inp->inp_moptions,
inp, ipsecflowinfo);
- if (error == EACCES) /* translate pf(4) error for userland */
- error = EHOSTUNREACH;
bail:
m_freem(control);