diff options
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/in.h | 7 | ||||
-rw-r--r-- | sys/netinet/ip_output.c | 6 | ||||
-rw-r--r-- | sys/netinet/ip_var.h | 7 | ||||
-rw-r--r-- | sys/netinet/raw_ip.c | 4 | ||||
-rw-r--r-- | sys/netinet/udp_usrreq.c | 5 |
5 files changed, 20 insertions, 9 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h index a0d14d5878f..84985ed987a 100644 --- a/sys/netinet/in.h +++ b/sys/netinet/in.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in.h,v 1.65 2005/05/24 04:20:25 markus Exp $ */ +/* $OpenBSD: in.h,v 1.66 2005/05/27 04:55:28 mcbride Exp $ */ /* $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ */ /* @@ -320,6 +320,11 @@ struct ip_mreq { #define INET_ADDRSTRLEN 16 /* + * JUMBO MTU + */ +#define IP_JUMBO_MTU 9000 + +/* * Definitions for inet sysctl operations. * * Third level is protocol number. 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. */ diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h index 4697fe53824..33b34eb54f8 100644 --- a/sys/netinet/ip_var.h +++ b/sys/netinet/ip_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_var.h,v 1.32 2004/06/22 07:35:20 cedric Exp $ */ +/* $OpenBSD: ip_var.h,v 1.33 2005/05/27 04:55:28 mcbride Exp $ */ /* $NetBSD: ip_var.h,v 1.16 1996/02/13 23:43:20 christos Exp $ */ /* @@ -152,8 +152,9 @@ struct ipstat { #define IP_RAWOUTPUT 0x2 /* raw ip header exists */ #define IP_ROUTETOIF SO_DONTROUTE /* bypass routing tables */ #define IP_ALLOWBROADCAST SO_BROADCAST /* can send broadcast packets */ -#define IP_MTUDISC 0x0400 /* pmtu discovery, set DF */ -#define IP_ROUTETOETHER 0x0800 /* ether addresses given */ +#define IP_JUMBO SO_JUMBO /* try to use the jumbo mtu */ +#define IP_MTUDISC 0x0800 /* pmtu discovery, set DF */ +#define IP_ROUTETOETHER 0x1000 /* ether addresses given */ extern struct ipstat ipstat; extern LIST_HEAD(ipqhead, ipq) ipq; /* ip reass. queue */ diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index 1aa90898f3b..5791bc7f7ec 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip.c,v 1.36 2005/01/14 14:51:28 mcbride Exp $ */ +/* $OpenBSD: raw_ip.c,v 1.37 2005/05/27 04:55:28 mcbride Exp $ */ /* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */ /* @@ -187,7 +187,7 @@ rip_output(struct mbuf *m, ...) va_end(ap); inp = sotoinpcb(so); - flags = (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST; + flags = (so->so_options & (SO_DONTROUTE|SO_JUMBO)) | IP_ALLOWBROADCAST; /* * If the user handed us a complete IP packet, use it. diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 3c449120b65..587ae62f5c3 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp_usrreq.c,v 1.103 2005/04/25 17:55:52 brad Exp $ */ +/* $OpenBSD: udp_usrreq.c,v 1.104 2005/05/27 04:55:28 mcbride Exp $ */ /* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */ /* @@ -1002,7 +1002,8 @@ udp_output(struct mbuf *m, ...) udpstat.udps_opackets++; error = ip_output(m, inp->inp_options, &inp->inp_route, - inp->inp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST), + inp->inp_socket->so_options & + (SO_DONTROUTE | SO_BROADCAST | SO_JUMBO), inp->inp_moptions, inp, (void *)NULL); bail: |