All pastes #3379018 Raw Edit

Someone

public unlisted text v1 · immutable
#3379018 ·published 2016-02-22 12:21 UTC
rendered paste body
diff --git a/sys/boot/efi/libefi/efinet.c b/sys/boot/efi/libefi/efinet.c
index 6ff8bdc..7dbcaa6 100644
--- a/sys/boot/efi/libefi/efinet.c
+++ b/sys/boot/efi/libefi/efinet.c
@@ -101,7 +101,11 @@ efinet_match(struct netif *nif, void *machdep_hint)
 {
        struct devdesc *dev = machdep_hint;
 
+       /* If this is a match use it */
        if (dev->d_unit == nif->nif_unit)
+               return (2);
+       /* Fallback to the first unit opened for exclusive access */
+       if (nif->nif_driver->netif_ifs[nif->nif_unit].dif_unit >= 0)
                return (1);
        return(0);
 }