If path mtu discovery is enabled set the DF bit in all cases we
send packets on a tcp connection. PR: kern/60889 Tested by: Richard Wendland <richard@wendland.org.uk> Approved by: re (scottl)
This commit is contained in:
parent
e0f630ea7a
commit
bf87c82ebb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124248
@ -459,6 +459,8 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
|
||||
tlen += sizeof (struct tcpiphdr);
|
||||
ip->ip_len = tlen;
|
||||
ip->ip_ttl = ip_defttl;
|
||||
if (path_mtu_discovery)
|
||||
ip->ip_off |= IP_DF;
|
||||
}
|
||||
m->m_len = tlen;
|
||||
m->m_pkthdr.len = tlen;
|
||||
@ -1733,6 +1735,8 @@ tcp_twrespond(struct tcptw *tw, struct socket *so, struct mbuf *msrc,
|
||||
m->m_pkthdr.csum_flags = CSUM_TCP;
|
||||
m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum);
|
||||
ip->ip_len = m->m_pkthdr.len;
|
||||
if (path_mtu_discovery)
|
||||
ip->ip_off |= IP_DF;
|
||||
error = ip_output(m, inp->inp_options, NULL,
|
||||
(tw->tw_so_options & SO_DONTROUTE), NULL, inp);
|
||||
}
|
||||
|
@ -459,6 +459,8 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
|
||||
tlen += sizeof (struct tcpiphdr);
|
||||
ip->ip_len = tlen;
|
||||
ip->ip_ttl = ip_defttl;
|
||||
if (path_mtu_discovery)
|
||||
ip->ip_off |= IP_DF;
|
||||
}
|
||||
m->m_len = tlen;
|
||||
m->m_pkthdr.len = tlen;
|
||||
@ -1733,6 +1735,8 @@ tcp_twrespond(struct tcptw *tw, struct socket *so, struct mbuf *msrc,
|
||||
m->m_pkthdr.csum_flags = CSUM_TCP;
|
||||
m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum);
|
||||
ip->ip_len = m->m_pkthdr.len;
|
||||
if (path_mtu_discovery)
|
||||
ip->ip_off |= IP_DF;
|
||||
error = ip_output(m, inp->inp_options, NULL,
|
||||
(tw->tw_so_options & SO_DONTROUTE), NULL, inp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user