diff options
author | silby <silby@FreeBSD.org> | 2002-08-05 22:34:15 +0000 |
---|---|---|
committer | silby <silby@FreeBSD.org> | 2002-08-05 22:34:15 +0000 |
commit | 23c761aa82dda219a2a21841ce5634e04427c861 (patch) | |
tree | 0554d2a23f234af1d288afa86cab353654b42400 /sys/netinet/tcp_syncache.c | |
parent | bfe148fa25918f51967c6b11a42381ca657608ee (diff) | |
download | FreeBSD-src-23c761aa82dda219a2a21841ce5634e04427c861.zip FreeBSD-src-23c761aa82dda219a2a21841ce5634e04427c861.tar.gz |
Handle PMTU discovery in syn-ack packets slightly differently;
rely on syncache flags instead of directly accessing the route
entry.
MFC after: 3 days
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r-- | sys/netinet/tcp_syncache.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 07b390f..d5cc9ad 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; } |