aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorMike Silbersack <silby@FreeBSD.org>2002-08-05 22:34:15 +0000
committerMike Silbersack <silby@FreeBSD.org>2002-08-05 22:34:15 +0000
commita9ce5e05b554acb09929b53fe3e39dc8516d5396 (patch)
tree0554d2a23f234af1d288afa86cab353654b42400 /sys/netinet
parentf7a91b49b74369631939a98f081dcbbb80141229 (diff)
Notes
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_syncache.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 07b390f69ee54..d5cc9ad8afca3 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -1141,16 +1141,14 @@ syncache_respond(sc, m)
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)
+ * See if we should do MTU discovery. Route lookups are expensive,
+ * so we will only unset the DF bit if:
+ *
+ * 1) path_mtu_discovery is disabled
+ * 2) the SCF_UNREACH flag has been set
*/
if (path_mtu_discovery
- && (rt != NULL)
- && rt->rt_flags & RTF_UP
- && !(rt->rt_rmx.rmx_locks & RTV_MTU)) {
+ && ((sc->sc_flags & SCF_UNREACH) == 0)) {
ip->ip_off |= IP_DF;
}