From 78779d572be8622c51d30907265a4fed610e9383 Mon Sep 17 00:00:00 2001 From: Andre Oppermann Date: Fri, 9 Jan 2004 12:23:58 +0000 Subject: MFC rev 1.173: If path mtu discovery is enabled set the DF bit in all cases we send packets on a tcp connection. PR: kern/60889 Approved by: re (scottl) --- sys/netinet/tcp_subr.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys') diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 926d547703eb..e8923dbf21d3 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -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; @@ -1736,6 +1738,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); } -- cgit v1.3