]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
net: translate pxe prefix to tftp when checking for self-load
authorAndrei Borzenkov <arvidjaar@gmail.com>
Tue, 3 May 2016 16:23:31 +0000 (19:23 +0300)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Tue, 3 May 2016 16:23:31 +0000 (19:23 +0300)
Commit ba218c1 missed legacy pxe and pxe: prefixes which are
translated to tftp, so comparison failed.

grub-core/net/net.c

index 26a1fc3fca2b0dce4a1c9b3c6d3f6bc71ff4e97d..10773fc3435fc7a1baf19e9b7cffe3cdcbf7998c 100644 (file)
@@ -1346,6 +1346,15 @@ grub_net_open_real (const char *name)
                continue;
            }
 
+         if (grub_strncmp (prefdev, "pxe", sizeof ("pxe") - 1) == 0 &&
+             (!prefdev[sizeof ("pxe") - 1] || (prefdev[sizeof("pxe") - 1] == ':')))
+           {
+             grub_free (prefdev);
+             prefdev = grub_strdup ("tftp");
+             if (!prefdev)
+               continue;
+           }
+
          comma = grub_strchr (prefdev, ',');
          if (comma)
            *comma = '\0';