John Hay's patches to prevent missing gateway from dumping core.
Submitted by: jhay
This commit is contained in:
parent
ad26d58d52
commit
2ee03071cb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4059
@ -132,11 +132,15 @@ 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);
|
||||||
nfsdiskless.mygateway.sin_len = sizeof(struct sockaddr);
|
if (addr) {
|
||||||
nfsdiskless.mygateway.sin_family = AF_INET;
|
nfsdiskless.mygateway.sin_len = sizeof(struct sockaddr);
|
||||||
bcopy(&addr, &nfsdiskless.mygateway.sin_addr, 4);
|
nfsdiskless.mygateway.sin_family = AF_INET;
|
||||||
nfsdiskless.myif.ifra_mask.sa_len = sizeof(struct sockaddr);
|
bcopy(&addr, &nfsdiskless.mygateway.sin_addr, 4);
|
||||||
nfsdiskless.myif.ifra_mask.sa_family = AF_UNSPEC;
|
} else {
|
||||||
|
nfsdiskless.mygateway.sin_len = 0;
|
||||||
|
}
|
||||||
|
nfsdiskless.myif.ifra_mask.sa_len = sizeof(struct sockaddr);
|
||||||
|
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);
|
||||||
|
|
||||||
rpc_id = currticks();
|
rpc_id = currticks();
|
||||||
|
Loading…
Reference in New Issue
Block a user