diff options
author | 2005-05-27 04:55:27 +0000 | |
---|---|---|
committer | 2005-05-27 04:55:27 +0000 | |
commit | ce12ce87d291522f11dbdffa40853d35e0846adc (patch) | |
tree | 8fb5cc20fd7e3be798cbcea2a5613c3935641cbf /sys/netinet/ip_output.c | |
parent | handle SIOCSIFMTU ioctl (diff) | |
download | wireguard-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/netinet/ip_output.c')
-rw-r--r-- | sys/netinet/ip_output.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index cdb0fa48949..724d481f022 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.170 2005/04/25 17:55:52 brad Exp $ */ +/* $OpenBSD: ip_output.c,v 1.171 2005/05/27 04:55:28 mcbride Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -693,6 +693,10 @@ sendit: } #endif + /* Try to use jumbograms? */ + if (flags & IP_JUMBO && ro->ro_rt && ro->ro_rt->rt_flags & RTF_JUMBO) + mtu = IP_JUMBO_MTU; + /* * If small enough for interface, can just send directly. */ |