From ce12ce87d291522f11dbdffa40853d35e0846adc Mon Sep 17 00:00:00 2001 From: mcbride Date: Fri, 27 May 2005 04:55:27 +0000 Subject: 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@ --- sys/net/rtsock.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sys/net/rtsock.c') 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) -- cgit v1.2.3-59-g8ed1b