mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-02-08 10:30:45 +00:00
slirp: more changes to prevent a crash in the soread without so_tcpcb case
This commit is contained in:
parent
68353ca6b1
commit
bab9820231
@ -219,7 +219,7 @@ int slirp_select_fill(int *pnfds,
|
|||||||
/*
|
/*
|
||||||
* See if we need a tcp_fasttimo
|
* See if we need a tcp_fasttimo
|
||||||
*/
|
*/
|
||||||
if (time_fasttimo == 0 && so->so_tcpcb->t_flags & TF_DELACK)
|
if (time_fasttimo == 0 && so->so_tcpcb && so->so_tcpcb->t_flags & TF_DELACK)
|
||||||
time_fasttimo = curtime; /* Flag when we want a fasttimo */
|
time_fasttimo = curtime; /* Flag when we want a fasttimo */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -110,7 +110,10 @@ soread(so)
|
|||||||
struct iovec iov[2];
|
struct iovec iov[2];
|
||||||
|
|
||||||
if (!so->so_tcpcb) {
|
if (!so->so_tcpcb) {
|
||||||
so->so_tcpcb = tcp_newtcpcb(so); // but how did we get in this state? should we just default mss for it?
|
// how did we get in this state?
|
||||||
|
tcp_newtcpcb(so);
|
||||||
|
// from what I've seen while debugging, the socket struct is about to get freed, so consider it closed.
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
u_int mss = so->so_tcpcb->t_maxseg;
|
u_int mss = so->so_tcpcb->t_maxseg;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user