summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-01-27 10:20:31 +0000
committermpi <mpi@openbsd.org>2015-01-27 10:20:31 +0000
commitef980ed66cafe544c740bf3411db2a71c0663b81 (patch)
tree75cea4dfadbd4de657145bb4d7fd8469ab33deb4
parentremove workq code. its been replaced with tasks. (diff)
downloadwireguard-openbsd-ef980ed66cafe544c740bf3411db2a71c0663b81.tar.xz
wireguard-openbsd-ef980ed66cafe544c740bf3411db2a71c0663b81.zip
Do not overwrite user-specified MTU.
Allow to use different size than the default of 32K. ok henning@, stsp@, florian@, benno@ as part of a larger diff.
-rw-r--r--sys/net/if_loop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index b1477bea6e7..de83df52460 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_loop.c,v 1.62 2014/12/19 17:14:39 tedu Exp $ */
+/* $OpenBSD: if_loop.c,v 1.63 2015/01/27 10:20:31 mpi Exp $ */
/* $NetBSD: if_loop.c,v 1.15 1996/05/07 02:40:33 thorpej Exp $ */
/*
@@ -271,7 +271,7 @@ looutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
void
lortrequest(int cmd, struct rtentry *rt)
{
- if (rt)
+ if (rt && rt->rt_rmx.rmx_mtu == 0)
rt->rt_rmx.rmx_mtu = LOMTU;
}