mirror of https://github.com/xemu-project/xemu.git
slirp: Drop link_up checks from if_output and slirp_socket_can_recv
link_up is true once slirp is initialized, so these check are really not required. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
f1d99bbdcd
commit
b5302e1a9d
|
@ -138,10 +138,7 @@ diddit:
|
||||||
/*
|
/*
|
||||||
* This prevents us from malloc()ing too many mbufs
|
* This prevents us from malloc()ing too many mbufs
|
||||||
*/
|
*/
|
||||||
if (link_up) {
|
|
||||||
/* if_start will check towrite */
|
|
||||||
if_start();
|
if_start();
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -824,9 +824,6 @@ size_t slirp_socket_can_recv(struct in_addr guest_addr, int guest_port)
|
||||||
struct iovec iov[2];
|
struct iovec iov[2];
|
||||||
struct socket *so;
|
struct socket *so;
|
||||||
|
|
||||||
if (!link_up)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
so = slirp_find_ctl_socket(guest_addr, guest_port);
|
so = slirp_find_ctl_socket(guest_addr, guest_port);
|
||||||
|
|
||||||
if (!so || so->so_state & SS_NOFDREF)
|
if (!so || so->so_state & SS_NOFDREF)
|
||||||
|
|
Loading…
Reference in New Issue