summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2018-01-09 10:08:01 +0000
committermpi <mpi@openbsd.org>2018-01-09 10:08:01 +0000
commitfbc727c92cbe021890e2b6dea4d8038b4c73d788 (patch)
tree74e6c8191f3ed12728df5f765f95770841bbc540
parentStop printing <not displayed> for wireless keys we know the kernel no (diff)
downloadwireguard-openbsd-fbc727c92cbe021890e2b6dea4d8038b4c73d788.tar.xz
wireguard-openbsd-fbc727c92cbe021890e2b6dea4d8038b4c73d788.zip
Use ip{,6}_send() instead of ip{,6}_output() to prevent a recursion.
if_start() is a boundary between the network stack and drivers. The states it modifies must be protected by the driver, so we should not require the NET_LOCK() there. ok bluhm@, visa@
-rw-r--r--sys/net/if_gif.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index a9f03716a1f..3ef20bd6b46 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gif.c,v 1.105 2017/11/20 10:35:24 mpi Exp $ */
+/* $OpenBSD: if_gif.c,v 1.106 2018/01/09 10:08:01 mpi Exp $ */
/* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */
/*
@@ -231,17 +231,11 @@ gif_start(struct ifnet *ifp)
switch (sc->gif_psrc->sa_family) {
case AF_INET:
- ip_output(m, NULL, NULL, 0, NULL, NULL, 0);
+ ip_send(m);
break;
#ifdef INET6
case AF_INET6:
- /*
- * force fragmentation to minimum MTU, to avoid path
- * MTU discovery. It is too painful to ask for resend
- * of inner packet, to achieve path MTU discovery for
- * encapsulated packets.
- */
- ip6_output(m, 0, NULL, IPV6_MINMTU, 0, NULL);
+ ip6_send(m);
break;
#endif
default: