aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-06-13 11:17:29 +0100
committerMatt Fleming <matt.fleming@intel.com>2012-06-20 16:35:35 +0100
commitf6e0c5e552ccbb17489097829116da03677a9270 (patch)
tree719bff45d30013948dcc93b8e10ce81d1553fcd2 /com32/modules
parentfb543aa635ff117187c73ce0ae3dccf8ffe32161 (diff)
downloadsyslinux-f6e0c5e552ccbb17489097829116da03677a9270.tar.gz
syslinux-f6e0c5e552ccbb17489097829116da03677a9270.tar.xz
syslinux-f6e0c5e552ccbb17489097829116da03677a9270.zip
Revert "pxe: resolve names via DNS from protected-mode code"
This reverts commit 6aba981cd9310bae94587d3e51106261bf0e27b9. dns_resolv() is only implemented for PXELINUX, meaning that if we try to execute any module that references it under SYSLINUX, EXTLINUX or ISOLINUX it fails to run because it cannot resolve the symbol. We need a way to implement DNS resolution so that it works for PXELINUX but returns an error for SYSLINUX/EXTLINUX or ISOLINUX, without introducing undefined symbols. The old COMBOOT API method worked splendidly for this, so revert until someone provides a better solution. Conflicts: com32/lib/Makefile com32/modules/host.c mk/elf.mk Cc: Paulo Alcantara <pcacjr@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/modules')
-rw-r--r--com32/modules/host.c35
-rw-r--r--com32/modules/pxechn.c4
2 files changed, 5 insertions, 34 deletions
diff --git a/com32/modules/host.c b/com32/modules/host.c
index df517256..d70efffd 100644
--- a/com32/modules/host.c
+++ b/com32/modules/host.c
@@ -1,43 +1,14 @@
-/* ----------------------------------------------------------------------- *
- *
- * Copyright 2009 Liu Aleaxander <Aleaxander@gmail.com>
- * Copyright 2012 Paulo Alcantara <pcacjr@zytor.com>
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall
- * be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * ----------------------------------------------------------------------- */
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <console.h>
-#include <com32.h>
-
#include <netinet/in.h>
+#include <com32.h>
#include <syslinux/pxe.h>
static inline uint32_t dns_resolve(const char *hostname)
{
- return pxe_dns_resolv(hostname);
+ return pxe_dns(hostname);
}
static inline void usage(const char *s)
@@ -54,7 +25,7 @@ int main(int argc, char *argv[])
if (argc < 2) {
usage(argv[0]);
- exit(1);
+ return 1;
}
for (i = 1; i < argc; i++) {
diff --git a/com32/modules/pxechn.c b/com32/modules/pxechn.c
index 88a281e4..1902d4ef 100644
--- a/com32/modules/pxechn.c
+++ b/com32/modules/pxechn.c
@@ -402,7 +402,7 @@ int pxechn_parse_fn(char fn[], in_addr_t *fip, char *host, char *fp[])
hsep = strchr(host, '@');
if (!hsep)
hsep = host;
- tip = pxe_dns_resolv(hsep);
+ tip = pxe_dns(hsep);
}
if (tip != 0)
*fip = tip;
@@ -755,7 +755,7 @@ int pxechn_parse_args(int argc, char *argv[], struct pxelinux_opt *pxe,
pxe->force = pxechn_parse_force(optarg);
break;
case 'g': /* gateway/DHCP relay */
- pxe->gip = pxe_dns_resolv(optarg);
+ pxe->gip = pxe_dns(optarg);
break;
case 'n': /* native */
break;