Commit b5302e1a9d8a47bd29a3e1876fba34be111728a2

Authored by Jan Kiszka
Committed by Anthony Liguori
1 parent f1d99bbd

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>
Showing 2 changed files with 1 additions and 7 deletions
slirp/if.c
... ... @@ -138,10 +138,7 @@ diddit:
138 138 /*
139 139 * This prevents us from malloc()ing too many mbufs
140 140 */
141   - if (link_up) {
142   - /* if_start will check towrite */
143   - if_start();
144   - }
  141 + if_start();
145 142 #endif
146 143 }
147 144  
... ...
slirp/slirp.c
... ... @@ -824,9 +824,6 @@ size_t slirp_socket_can_recv(struct in_addr guest_addr, int guest_port)
824 824 struct iovec iov[2];
825 825 struct socket *so;
826 826  
827   - if (!link_up)
828   - return 0;
829   -
830 827 so = slirp_find_ctl_socket(guest_addr, guest_port);
831 828  
832 829 if (!so || so->so_state & SS_NOFDREF)
... ...