summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-07-16 21:14:22 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-07-16 21:14:22 +0000
commitad552c9859c9eaf2501ba4067d78c1ae67c6778e (patch)
treecc968e376cffa0d107430a82a790947e2f458f0c /sys/netinet/ip_output.c
parentb1284223fc01a39cd85683dbfe83dc9f22c0f35a (diff)
Kill IP_ROUTETOETHER.
This pseudo-option is a hack to support return-rst on bridge(4). It passes Ethernet information via a "struct route" through ip_output(). "struct route" is slowly dying... ok claudio@, benno@
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r--sys/netinet/ip_output.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 60a8e432c70..ad99e2f039d 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_output.c,v 1.285 2015/07/15 22:16:42 deraadt Exp $ */
+/* $OpenBSD: ip_output.c,v 1.286 2015/07/16 21:14:21 mpi Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@@ -158,10 +158,6 @@ ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro, int flags,
* though (e.g., traceroute) have a source address of zeroes.
*/
if (ip->ip_src.s_addr == INADDR_ANY) {
- if (flags & IP_ROUTETOETHER) {
- error = EINVAL;
- goto bad;
- }
donerouting = 1;
if (ro == NULL) {
@@ -291,12 +287,7 @@ reroute:
done_spd:
#endif /* IPSEC */
- if (flags & IP_ROUTETOETHER) {
- dst = satosin(&ro->ro_dst);
- ifp = ro->ro_rt->rt_ifp;
- mtu = ifp->if_mtu;
- ro->ro_rt = NULL;
- } else if (donerouting == 0) {
+ if (donerouting == 0) {
if (ro == NULL) {
ro = &iproute;
memset(ro, 0, sizeof(*ro));
@@ -515,7 +506,7 @@ sendit:
#if NPF > 0
if ((encif = enc_getif(tdb->tdb_rdomain,
tdb->tdb_tap)) == NULL ||
- pf_test(AF_INET, PF_OUT, encif, &m, NULL) != PF_PASS) {
+ pf_test(AF_INET, PF_OUT, encif, &m) != PF_PASS) {
error = EACCES;
m_freem(m);
goto done;
@@ -592,7 +583,7 @@ sendit:
* Packet filter
*/
#if NPF > 0
- if (pf_test(AF_INET, PF_OUT, ifp, &m, NULL) != PF_PASS) {
+ if (pf_test(AF_INET, PF_OUT, ifp, &m) != PF_PASS) {
error = EHOSTUNREACH;
m_freem(m);
goto done;