Explorar el Código

[netdevice] Allow network device to update link state before checking

If the network interface has only just been opened (e.g. by the "dhcp"
command) then we should allow at least one opportunity for the card to
update the link state before testing it, to avoid false positives.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown hace 12 años
padre
commit
44d5ef9d7d
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3
    0
      src/usr/ifmgmt.c

+ 3
- 0
src/usr/ifmgmt.c Ver fichero

@@ -113,6 +113,9 @@ int iflinkwait ( struct net_device *netdev, unsigned int max_wait_ms ) {
113 113
 	int key;
114 114
 	int rc;
115 115
 
116
+	/* Allow link state to be updated */
117
+	netdev_poll ( netdev );
118
+
116 119
 	if ( netdev_link_ok ( netdev ) )
117 120
 		return 0;
118 121
 

Loading…
Cancelar
Guardar