summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-09-12 13:34:12 +0000
committermpi <mpi@openbsd.org>2015-09-12 13:34:12 +0000
commit7f3eeafaec4c5f150ce655d1a585e3df7f91e0f7 (patch)
treea86544ef806f8e09365bd489d08fc0627a4d691f /sys/netinet/ip_output.c
parentWrap <fts.h> and <ftw.h> so that internal calls to fts_*() go direct and (diff)
downloadwireguard-openbsd-7f3eeafaec4c5f150ce655d1a585e3df7f91e0f7.tar.xz
wireguard-openbsd-7f3eeafaec4c5f150ce655d1a585e3df7f91e0f7.zip
Introduce if_input_local() a function to feed local traffic back to
the protocol queues. It basically does what looutput() was doing but having a generic function will allow us to get rid of the loopback hack overwwritting the rt_ifp field of RTF_LOCAL routes. ok mikeb@, dlg@, claudio@
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r--sys/netinet/ip_output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 1fd63d8b22b..d33392c4d8e 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_output.c,v 1.294 2015/09/12 11:40:04 claudio Exp $ */
+/* $OpenBSD: ip_output.c,v 1.295 2015/09/12 13:34:12 mpi Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@@ -1679,7 +1679,7 @@ ip_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in *dst)
ip = mtod(copym, struct ip *);
ip->ip_sum = 0;
ip->ip_sum = in_cksum(copym, ip->ip_hl << 2);
- (void) looutput(ifp, copym, sintosa(dst), NULL);
+ if_input_local(ifp, copym, dst->sin_family);
}
}