summaryrefslogtreecommitdiffstats
path: root/test/parser/test-pxe-ipappend.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2014-12-03 15:08:23 +1100
committerJeremy Kerr <jk@ozlabs.org>2014-12-03 12:12:47 +0800
commit9c33c54f7b431074a7d0daddce34140044aaadf6 (patch)
treef726dca93146b8218f4c5711a49b4eb1fe49c12a /test/parser/test-pxe-ipappend.c
parentba1633025d93d7b41bda9bd32fa1d2337c7c4365 (diff)
downloadtalos-petitboot-9c33c54f7b431074a7d0daddce34140044aaadf6.tar.gz
talos-petitboot-9c33c54f7b431074a7d0daddce34140044aaadf6.zip
discover/pxe: Format IPAPPEND mac addresses correctly
The SYSAPPEND/IPAPPEND option 2 in PXE configs requires the MAC address of the booting interface to be appended to the boot options. Previously we formatted this as "BOOTIF=01:02:03:04:05:06", but syslinux/pxelinux implementation use this format: "BOOTIF=01-01-02-03-04-05-06", where the leading '01' represents the hardware type. The relevant part of the pxelinux doc is at: http://www.syslinux.org/wiki/index.php/SYSLINUX#SYSAPPEND_bitmask Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'test/parser/test-pxe-ipappend.c')
-rw-r--r--test/parser/test-pxe-ipappend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parser/test-pxe-ipappend.c b/test/parser/test-pxe-ipappend.c
index 4719b5c..3fec6a7 100644
--- a/test/parser/test-pxe-ipappend.c
+++ b/test/parser/test-pxe-ipappend.c
@@ -1,5 +1,6 @@
#include "parser-test.h"
+#include "network.h"
#if 0 /* PARSER_EMBEDDED_CONFIG */
default linux
@@ -20,8 +21,7 @@ void run_test(struct parser_test *test)
test_set_event_source(test);
test_set_event_param(test->ctx->event, "pxeconffile",
"tftp://host/dir/conf.txt");
- test_set_event_param(test->ctx->event, "mac",
- "01:02:03:04:05:06");
+ test_set_event_device(test->ctx->event, "em1");
test_run_parser(test, "pxe");
@@ -31,5 +31,5 @@ void run_test(struct parser_test *test)
opt = get_boot_option(ctx, 0);
check_name(opt, "linux");
- check_args(opt, "command line BOOTIF=01:02:03:04:05:06");
+ check_args(opt, "command line BOOTIF=01-01-02-03-04-05-06");
}
OpenPOWER on IntegriCloud