summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
authorMike Silbersack <silby@FreeBSD.org>2002-06-14 02:36:34 +0000
committerMike Silbersack <silby@FreeBSD.org>2002-06-14 02:36:34 +0000
commit21c3b2fc699cb97482ed7dd4939b792053a0fa89 (patch)
tree81478ca710ba7576d2156faab17630cfd30302b1 /sys/netinet/tcp_syncache.c
parent6689fb2bbcad1741763661e7b21973c359980274 (diff)
Notes
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r--sys/netinet/tcp_syncache.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 40defbe8b4e2..e4c467e68b99 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -1128,6 +1128,24 @@ syncache_respond(sc, m)
th = (struct tcphdr *)(ip + 1);
}
+
+ ip->ip_ttl = sc->sc_tp->t_inpcb->inp_ip_ttl; /* XXX */
+ ip->ip_tos = sc->sc_tp->t_inpcb->inp_ip_tos; /* XXX */
+
+ /*
+ * See if we should do MTU discovery. We do it only if the following
+ * are true:
+ * 1) we have a valid route to the destination
+ * 2) the MTU is not locked (if it is, then discovery has been
+ * disabled)
+ */
+ if (path_mtu_discovery
+ && (rt != NULL)
+ && rt->rt_flags & RTF_UP
+ && !(rt->rt_rmx.rmx_locks & RTV_MTU)) {
+ ip->ip_off |= IP_DF;
+ }
+
th->th_sport = sc->sc_inc.inc_lport;
th->th_dport = sc->sc_inc.inc_fport;