PERFORCE change 18211 for review
Robert Watson
rwatson at freebsd.org
Fri Sep 27 17:01:30 GMT 2002
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18211
Change 18211 by rwatson at rwatson_tislabs on 2002/09/27 10:01:02
Manually merge the NFS diskless patch I committed to the main
tree: PXE will set the mygateway field, but set the IP to 0 if
DHCP doesn't return the value. Take that into account and try
to add the default route if it's 0, avoiding the panic that
results.
Affected files ...
.. //depot/projects/trustedbsd/mac/sys/nfsclient/nfs_vfsops.c#16 edit
Differences ...
==== //depot/projects/trustedbsd/mac/sys/nfsclient/nfs_vfsops.c#16 (text+ko) ====
@@ -438,8 +438,12 @@
/*
* If the gateway field is filled in, set it as the default route.
+ * Note that pxeboot will set a default route of 0 if the route
+ * is not set by the DHCP server. Check also for a value of 0
+ * to avoid panicking inappropriately in that situation.
*/
- if (nd->mygateway.sin_len != 0) {
+ if (nd->mygateway.sin_len != 0 &&
+ nd->mygateway.sin_addr.s_addr != 0) {
struct sockaddr_in mask, sin;
bzero((caddr_t)&mask, sizeof(mask));
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list