John Hay's patches to prevent missing gateway from dumping core.

Submitted by:	jhay
This commit is contained in:
Jordan K. Hubbard 1994-11-01 22:12:35 +00:00
parent ad26d58d52
commit 2ee03071cb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4059

View File

@ -132,9 +132,13 @@ load()
nfsdiskless.myif.ifra_broadaddr.sa_family = AF_INET; nfsdiskless.myif.ifra_broadaddr.sa_family = AF_INET;
bcopy(&broadcast, &nfsdiskless.myif.ifra_broadaddr.sa_data[2], 4); bcopy(&broadcast, &nfsdiskless.myif.ifra_broadaddr.sa_data[2], 4);
addr = htonl(arptable[ARP_GATEWAY].ipaddr); addr = htonl(arptable[ARP_GATEWAY].ipaddr);
if (addr) {
nfsdiskless.mygateway.sin_len = sizeof(struct sockaddr); nfsdiskless.mygateway.sin_len = sizeof(struct sockaddr);
nfsdiskless.mygateway.sin_family = AF_INET; nfsdiskless.mygateway.sin_family = AF_INET;
bcopy(&addr, &nfsdiskless.mygateway.sin_addr, 4); bcopy(&addr, &nfsdiskless.mygateway.sin_addr, 4);
} else {
nfsdiskless.mygateway.sin_len = 0;
}
nfsdiskless.myif.ifra_mask.sa_len = sizeof(struct sockaddr); nfsdiskless.myif.ifra_mask.sa_len = sizeof(struct sockaddr);
nfsdiskless.myif.ifra_mask.sa_family = AF_UNSPEC; nfsdiskless.myif.ifra_mask.sa_family = AF_UNSPEC;
bcopy(&netmask, &nfsdiskless.myif.ifra_mask.sa_data[2], 4); bcopy(&netmask, &nfsdiskless.myif.ifra_mask.sa_data[2], 4);