FreeBSD Bugzilla – Attachment 129462 Details for
Bug 173444
socket: IPV6_USE_MIN_MTU and TCP is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
kern173444-rev2
kern173444-rev2 (text/plain), 2.14 KB, created by
marka
on 2013-03-20 03:51:41 UTC
(
hide
)
Description:
kern173444-rev2
Filename:
MIME Type:
Creator:
marka
Created:
2013-03-20 03:51:41 UTC
Size:
2.14 KB
patch
obsolete
>Index: sys/netinet/ip6.h >=================================================================== >--- sys/netinet/ip6.h (revision 248493) >+++ sys/netinet/ip6.h (working copy) >@@ -256,6 +256,7 @@ > #define IPV6_HLIMDEC 1 /* subtracted when forwarding */ > > #define IPV6_MMTU 1280 /* minimal MTU and reassembly. 1024 + 256 */ >+#define IPV6_MMSS 1220 /* maximum MSS when IP6_USE_MIN_MTU is 1 */ > #define IPV6_MAXPACKET 65535 /* ip6 max packet size without Jumbo payload*/ > #define IPV6_MAXOPTHDR 2048 /* max option header size, 256 64-bit words */ > >Index: sys/netinet/tcp_input.c >=================================================================== >--- sys/netinet/tcp_input.c (revision 248493) >+++ sys/netinet/tcp_input.c (working copy) >@@ -1280,6 +1280,18 @@ > (void *)tcp_saveipgen, &tcp_savetcp, 0); > #endif > tcp_dooptions(&to, optp, optlen, TO_SYN); >+#ifdef INET6 >+ if (isipv6 && inp) { >+ struct ip6_pktopts *opt; >+ opt = inp->in6p_outputopts; >+ if (opt && opt->ip6po_minmtu == IP6PO_MINMTU_ALL) { >+ if (to.to_flags & TOF_MSS) >+ to.to_mss = min(to.to_mss, IPV6_MMSS); >+ else >+ to.to_mss = IPV6_MMSS; >+ } >+ } >+#endif > syncache_add(&inc, &to, th, inp, &so, m); > /* > * Entry added to syncache and mbuf consumed. >@@ -3356,7 +3368,11 @@ > /* Initialize. */ > #ifdef INET6 > if (isipv6) { >+ struct ip6_pktopts *opt; > maxmtu = tcp_maxmtu6(&inp->inp_inc, mtuflags); >+ opt = inp->inp_depend6.inp6_outputopts; >+ if (opt && opt->ip6po_minmtu == IP6PO_MINMTU_ALL) >+ maxmtu = min(maxmtu, IPV6_MMTU); > tp->t_maxopd = tp->t_maxseg = V_tcp_v6mssdflt; > } else > #endif >Index: sys/netinet/tcp_output.c >=================================================================== >--- sys/netinet/tcp_output.c (revision 248493) >+++ sys/netinet/tcp_output.c (working copy) >@@ -692,6 +692,15 @@ > if (flags & TH_SYN) { > tp->snd_nxt = tp->iss; > to.to_mss = tcp_mssopt(&tp->t_inpcb->inp_inc); >+#ifdef INET6 >+ if (isipv6) { >+ struct ip6_pktopts *opt; >+ opt = tp->t_inpcb->in6p_outputopts; >+ if (opt && >+ opt->ip6po_minmtu == IP6PO_MINMTU_ALL) >+ to.to_mss = min(to.to_mss, IPV6_MMSS); >+ } >+#endif > to.to_flags |= TOF_MSS; > } > /* Window scaling. */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 173444
:
129461
| 129462