summaryrefslogtreecommitdiffstats
path: root/sys/net/rtsock.c
diff options
context:
space:
mode:
authormcbride <mcbride@openbsd.org>2005-05-27 04:55:27 +0000
committermcbride <mcbride@openbsd.org>2005-05-27 04:55:27 +0000
commitce12ce87d291522f11dbdffa40853d35e0846adc (patch)
tree8fb5cc20fd7e3be798cbcea2a5613c3935641cbf /sys/net/rtsock.c
parenthandle SIOCSIFMTU ioctl (diff)
downloadwireguard-openbsd-ce12ce87d291522f11dbdffa40853d35e0846adc.tar.xz
wireguard-openbsd-ce12ce87d291522f11dbdffa40853d35e0846adc.zip
Experimental support for opportunitic use of jumbograms where only some hosts
on the local network support them. This adds a new socket option, SO_JUMBO, and a new route flag, RTF_JUMBO. If _both_ the socket option is set and the route for the host has RTF_JUMBO set, ip_output will fragment the packet to the largest possible size for the link, ignoring the card's MTU. The semantics of this feature will be evolving rapidly; talk to us if you intend to use it. ok deraadt@ marius@
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r--sys/net/rtsock.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index f19aabbf2cd..2085dd99568 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsock.c,v 1.43 2004/09/16 22:31:29 henning Exp $ */
+/* $OpenBSD: rtsock.c,v 1.44 2005/05/27 04:55:27 mcbride Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
@@ -396,6 +396,12 @@ report:
rt->rt_ifp = ifp;
}
}
+
+ /* XXX Hack to allow the jumbo flag to be toggled */
+ if (rtm->rtm_flags & RTF_JUMBO)
+ rt->rt_flags = (rt->rt_flags & ~rtm->rtm_use) |
+ (rtm->rtm_flags & rtm->rtm_use);
+
rt_setmetrics(rtm->rtm_inits, &rtm->rtm_rmx,
&rt->rt_rmx);
if (rt->rt_ifa && rt->rt_ifa->ifa_rtrequest)