diff options
| author | Michael Brown | 2006-11-28 03:14:20 +0100 |
|---|---|---|
| committer | Michael Brown | 2006-11-28 03:14:20 +0100 |
| commit | 74c41fac068f3c2680b77973ef21b6ee52d1b4cd (patch) | |
| tree | d601ef3656f5e08385011b66ee324a4f6e483914 /src/tests | |
| parent | Updated to use asynchronous operation model for iSCSI requests (diff) | |
| download | ipxe-74c41fac068f3c2680b77973ef21b6ee52d1b4cd.tar.gz ipxe-74c41fac068f3c2680b77973ef21b6ee52d1b4cd.tar.xz ipxe-74c41fac068f3c2680b77973ef21b6ee52d1b4cd.zip | |
Create "username" and "password" DHCP options, ready for placing this
information in NVS.
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/dhcptest.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tests/dhcptest.c b/src/tests/dhcptest.c index be219b205..a6e3ff802 100644 --- a/src/tests/dhcptest.c +++ b/src/tests/dhcptest.c @@ -16,8 +16,8 @@ static int test_dhcp_aoe_boot ( struct net_device *netdev, static int test_dhcp_iscsi_boot ( struct net_device *netdev, char *iscsiname ) { char *initiator_iqn = "iqn.1900-01.localdomain.localhost:initiator"; - char *username = "joe"; - char *password = "secret"; + char username[32]; + char password[32]; char *target_iqn; union { struct sockaddr_in sin; @@ -35,6 +35,11 @@ static int test_dhcp_iscsi_boot ( struct net_device *netdev, char *iscsiname ) { } inet_aton ( iscsiname, &target.sin.sin_addr ); + dhcp_snprintf ( username, sizeof ( username ), + find_global_dhcp_option ( DHCP_EB_USERNAME ) ); + dhcp_snprintf ( password, sizeof ( password ), + find_global_dhcp_option ( DHCP_EB_PASSWORD ) ); + return test_iscsiboot ( initiator_iqn, &target.st, target_iqn, username, password, netdev ); } |
