http://git.etherboot.org
/
people
/
dverkamp
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f87bc83
)
DNS code now records a whole struct sockaddr for the name server.
author
Michael Brown
<mcb30@etherboot.org>
Mon, 11 Jun 2007 22:36:50 +0000
(23:36 +0100)
committer
Michael Brown
<mcb30@etherboot.org>
Mon, 11 Jun 2007 22:36:50 +0000
(23:36 +0100)
src/usr/dhcpmgmt.c
patch
|
blob
|
history
diff --git
a/src/usr/dhcpmgmt.c
b/src/usr/dhcpmgmt.c
index
7c15b5f
..
926cd74
100644
(file)
--- a/
src/usr/dhcpmgmt.c
+++ b/
src/usr/dhcpmgmt.c
@@
-35,7
+35,7
@@
*/
/* Avoid dragging in dns.o */
*/
/* Avoid dragging in dns.o */
-struct
in_addr
nameserver;
+struct
sockaddr_tcpip
nameserver;
/* Avoid dragging in syslog.o */
struct in_addr syslogserver;
/* 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 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;
struct async async;
int rc;
@@
-98,8
+99,10
@@
int dhcp ( struct net_device *netdev ) {
}
/* Retrieve other DHCP options that we care about */
}
/* 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,
find_dhcp_ipv4_option ( dhcp_options, DHCP_DNS_SERVERS,
- &
nameserve
r );
+ &
sin_nameserver->sin_add
r );
find_dhcp_ipv4_option ( dhcp_options, DHCP_LOG_SERVERS,
&syslogserver );
find_dhcp_ipv4_option ( dhcp_options, DHCP_LOG_SERVERS,
&syslogserver );