summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/cmd/ip/dhcpd/dat.h1
-rw-r--r--sys/src/cmd/ip/dhcpd/ndb.c6
2 files changed, 6 insertions, 1 deletions
diff --git a/sys/src/cmd/ip/dhcpd/dat.h b/sys/src/cmd/ip/dhcpd/dat.h
index d8c96a886..f2e64c729 100644
--- a/sys/src/cmd/ip/dhcpd/dat.h
+++ b/sys/src/cmd/ip/dhcpd/dat.h
@@ -42,6 +42,7 @@ struct Info
uchar gwip[NDB_IPlen]; /* gateway ip address */
uchar fsip[NDB_IPlen]; /* file system ip address */
uchar auip[NDB_IPlen]; /* authentication server ip address */
+ uchar rootserverip[NDB_IPlen]; /* ip addr of root nfs server */
char rootpath[Maxstr]; /* rootfs for diskless nfs clients */
char dhcpgroup[Maxstr];
char vendor[Maxstr]; /* vendor info */
diff --git a/sys/src/cmd/ip/dhcpd/ndb.c b/sys/src/cmd/ip/dhcpd/ndb.c
index d750248c2..0aea361cf 100644
--- a/sys/src/cmd/ip/dhcpd/ndb.c
+++ b/sys/src/cmd/ip/dhcpd/ndb.c
@@ -116,10 +116,11 @@ lookupip(uchar *ipaddr, char *hwattr, char *hwval, Info *iip, int gate)
*p++ = "@tftp2";
*p++ = "rootpath";
*p++ = "dhcp";
- *p++ = "vendorclass";
+ *p++ = "vendor";
*p++ = "dom";
*p++ = "@fs";
*p++ = "@auth";
+ *p++ = "@rootserver";
}
if(hwattr != nil)
*p++ = hwattr;
@@ -153,6 +154,9 @@ lookupip(uchar *ipaddr, char *hwattr, char *hwval, Info *iip, int gate)
if(strcmp(nt->attr, "ipgw") == 0)
setipaddr(iip->gwip, nt->val);
else
+ if(strcmp(nt->attr, "rootserver") == 0)
+ setipaddr(iip->rootserverip, nt->val);
+ else
if(strcmp(nt->attr, "dhcp") == 0){
if(iip->dhcpgroup[0] == 0)
strncpy(iip->dhcpgroup, nt->val, sizeof(iip->dhcpgroup)-1);