* Re: [9fans] [PATCH 1/3] Add swapip read in lookupip()
@ 2019-01-22 21:34 cinap_lenrek
0 siblings, 0 replies; 3+ messages in thread
From: cinap_lenrek @ 2019-01-22 21:34 UTC (permalink / raw)
To: 9fans
yeah, rootserver makes much more sense.
--
cinap
^ permalink raw reply [flat|nested] 3+ messages in thread
* [9fans] [PATCH 1/3] Add swapip read in lookupip()
@ 2019-01-22 18:57 k0ga
0 siblings, 0 replies; 3+ messages in thread
From: k0ga @ 2019-01-22 18:57 UTC (permalink / raw)
To: 9fans
Lookupip() was already reading rootpath, but it didn't read
the address of the swap server (called rootserver in some
systems). As they are very related it makes sense to read them
at the same time.
This patch also fixes a typo, where vendorclass was used instead of
vendor, resulting that vendor ndb attribute was never used.
diff -r b1cb12e81f18 sys/src/cmd/ip/dhcpd/ndb.c
--- a/sys/src/cmd/ip/dhcpd/ndb.c Sun Jan 20 12:55:31 2019 +0100
+++ b/sys/src/cmd/ip/dhcpd/ndb.c Tue Jan 22 18:50:26 2019 +0000
@@ -116,10 +116,11 @@
*p++ = "@tftp2";
*p++ = "rootpath";
*p++ = "dhcp";
- *p++ = "vendorclass";
+ *p++ = "vendor";
*p++ = "dom";
*p++ = "@fs";
*p++ = "@auth";
+ *p++ = "@swap";
}
if(hwattr != nil)
*p++ = hwattr;
@@ -153,6 +154,9 @@
if(strcmp(nt->attr, "ipgw") == 0)
setipaddr(iip->gwip, nt->val);
else
+ if(strcmp(nt->attr, "swap") == 0)
+ setipaddr(iip->swapip, nt->val);
+ else
if(strcmp(nt->attr, "dhcp") == 0){
if(iip->dhcpgroup[0] == 0)
strncpy(iip->dhcpgroup, nt->val, sizeof(iip->dhcpgroup)-1);
^ permalink raw reply [flat|nested] 3+ messages in thread
* [9fans] [PATCH 1/3] Add swapip read in lookupip()
@ 2019-01-22 18:57 k0ga
0 siblings, 0 replies; 3+ messages in thread
From: k0ga @ 2019-01-22 18:57 UTC (permalink / raw)
To: k0ga, 9fans
Lookupip() was already reading rootpath, but it didn't read
the address of the swap server (called rootserver in some
systems). As they are very related it makes sense to read them
at the same time.
This patch also fixes a typo, where vendorclass was used instead of
vendor, resulting that vendor ndb attribute was never used.
diff -r b1cb12e81f18 sys/src/cmd/ip/dhcpd/ndb.c
--- a/sys/src/cmd/ip/dhcpd/ndb.c Sun Jan 20 12:55:31 2019 +0100
+++ b/sys/src/cmd/ip/dhcpd/ndb.c Tue Jan 22 18:50:26 2019 +0000
@@ -116,10 +116,11 @@
*p++ = "@tftp2";
*p++ = "rootpath";
*p++ = "dhcp";
- *p++ = "vendorclass";
+ *p++ = "vendor";
*p++ = "dom";
*p++ = "@fs";
*p++ = "@auth";
+ *p++ = "@swap";
}
if(hwattr != nil)
*p++ = hwattr;
@@ -153,6 +154,9 @@
if(strcmp(nt->attr, "ipgw") == 0)
setipaddr(iip->gwip, nt->val);
else
+ if(strcmp(nt->attr, "swap") == 0)
+ setipaddr(iip->swapip, nt->val);
+ else
if(strcmp(nt->attr, "dhcp") == 0){
if(iip->dhcpgroup[0] == 0)
strncpy(iip->dhcpgroup, nt->val, sizeof(iip->dhcpgroup)-1);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-22 21:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22 21:34 [9fans] [PATCH 1/3] Add swapip read in lookupip() cinap_lenrek
-- strict thread matches above, loose matches on Subject: below --
2019-01-22 18:57 k0ga
2019-01-22 18:57 k0ga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).