Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_subr.c
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | |||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/socketvar.h> | #include <sys/socketvar.h> | ||||
#include <sys/protosw.h> | #include <sys/protosw.h> | ||||
#include <sys/random.h> | #include <sys/random.h> | ||||
#include <vm/uma.h> | #include <vm/uma.h> | ||||
#include <net/route.h> | #include <net/route.h> | ||||
#include <net/route/nhop.h> | |||||
#include <net/if.h> | #include <net/if.h> | ||||
#include <net/if_var.h> | #include <net/if_var.h> | ||||
#include <net/vnet.h> | #include <net/vnet.h> | ||||
#include <netinet/in.h> | #include <netinet/in.h> | ||||
#include <netinet/in_fib.h> | #include <netinet/in_fib.h> | ||||
#include <netinet/in_kdtrace.h> | #include <netinet/in_kdtrace.h> | ||||
#include <netinet/in_pcb.h> | #include <netinet/in_pcb.h> | ||||
▲ Show 20 Lines • Show All 2,107 Lines • ▼ Show 20 Lines | tcp_notify(struct inpcb *inp, int error) | ||||
* If connection hasn't completed, has retransmitted several times, | * If connection hasn't completed, has retransmitted several times, | ||||
* and receives a second error, give up now. This is better | * and receives a second error, give up now. This is better | ||||
* than waiting a long time to establish a connection that | * than waiting a long time to establish a connection that | ||||
* can never complete. | * can never complete. | ||||
*/ | */ | ||||
if (tp->t_state == TCPS_ESTABLISHED && | if (tp->t_state == TCPS_ESTABLISHED && | ||||
(error == EHOSTUNREACH || error == ENETUNREACH || | (error == EHOSTUNREACH || error == ENETUNREACH || | ||||
error == EHOSTDOWN)) { | error == EHOSTDOWN)) { | ||||
if (inp->inp_route.ro_rt) { | if (inp->inp_route.ro_nh) { | ||||
RTFREE(inp->inp_route.ro_rt); | NH_FREE(inp->inp_route.ro_nh); | ||||
inp->inp_route.ro_rt = (struct rtentry *)NULL; | inp->inp_route.ro_nh = (struct nhop_object *)NULL; | ||||
} | } | ||||
return (inp); | return (inp); | ||||
} else if (tp->t_state < TCPS_ESTABLISHED && tp->t_rxtshift > 3 && | } else if (tp->t_state < TCPS_ESTABLISHED && tp->t_rxtshift > 3 && | ||||
tp->t_softerror) { | tp->t_softerror) { | ||||
tp = tcp_drop(tp, error); | tp = tcp_drop(tp, error); | ||||
if (tp != NULL) | if (tp != NULL) | ||||
return (inp); | return (inp); | ||||
else | else | ||||
▲ Show 20 Lines • Show All 1,254 Lines • Show Last 20 Lines |