summaryrefslogtreecommitdiffstats
path: root/src/usr/dhcpmgmt.c
diff options
context:
space:
mode:
authorMichael Brown2007-06-12 00:36:50 +0200
committerMichael Brown2007-06-12 00:36:50 +0200
commite7081370290797bb728b98cf2531aeedfd0d80d6 (patch)
treea4f7da24937dded45817326ae7bbb12823de678c /src/usr/dhcpmgmt.c
parentUpdated DNS to use not-yet-implemented UDP data-xfer API. (diff)
downloadipxe-e7081370290797bb728b98cf2531aeedfd0d80d6.tar.gz
ipxe-e7081370290797bb728b98cf2531aeedfd0d80d6.tar.xz
ipxe-e7081370290797bb728b98cf2531aeedfd0d80d6.zip
DNS code now records a whole struct sockaddr for the name server.
Diffstat (limited to 'src/usr/dhcpmgmt.c')
-rw-r--r--src/usr/dhcpmgmt.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/usr/dhcpmgmt.c b/src/usr/dhcpmgmt.c
index 7c15b5f9..926cd749 100644
--- a/src/usr/dhcpmgmt.c
+++ b/src/usr/dhcpmgmt.c
@@ -35,7 +35,7 @@
*/
/* Avoid dragging in dns.o */
-struct in_addr nameserver;
+struct sockaddr_tcpip nameserver;
/* Avoid dragging in syslog.o */
struct in_addr syslogserver;
@@ -52,6 +52,7 @@ int dhcp ( struct net_device *netdev ) {
struct in_addr address = { 0 };
struct in_addr netmask = { 0 };
struct in_addr gateway = { INADDR_NONE };
+ struct sockaddr_in *sin_nameserver;
struct async async;
int rc;
@@ -98,8 +99,10 @@ int dhcp ( struct net_device *netdev ) {
}
/* Retrieve other DHCP options that we care about */
+ sin_nameserver = ( struct sockaddr_in * ) &nameserver;
+ sin_nameserver->sin_family = AF_INET;
find_dhcp_ipv4_option ( dhcp_options, DHCP_DNS_SERVERS,
- &nameserver );
+ &sin_nameserver->sin_addr );
find_dhcp_ipv4_option ( dhcp_options, DHCP_LOG_SERVERS,
&syslogserver );