From a3e788a027651797a849e2d1f3ce39acb08ada95 Mon Sep 17 00:00:00 2001 From: provos Date: Sat, 23 Jun 2001 03:10:21 +0000 Subject: fix up mtu for routes and ongoing tcp connection when if mtu changes from FreeBSD; fixes pr/1878 --- sys/netinet/tcp_output.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sys/netinet/tcp_output.c') diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index a694cc0886d..37c2419b1ca 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_output.c,v 1.37 2001/06/08 03:53:46 angelos Exp $ */ +/* $OpenBSD: tcp_output.c,v 1.38 2001/06/23 03:10:21 provos Exp $ */ /* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */ /* @@ -1102,6 +1102,16 @@ out: tcp_quench(tp->t_inpcb, 0); return (0); } + if (error == EMSGSIZE) { + /* + * ip_output() will have already fixed the route + * for us. tcp_mtudisc() will, as its last action, + * initiate retransmission, so it is important to + * not do so here. + */ + tcp_mtudisc(tp->t_inpcb, 0); + return (0); + } if ((error == EHOSTUNREACH || error == ENETDOWN) && TCPS_HAVERCVDSYN(tp->t_state)) { tp->t_softerror = error; -- cgit v1.2.3-59-g8ed1b