mirror of
https://github.com/reactos/reactos.git
synced 2024-11-29 06:23:41 +08:00
[IPCONFIG] Fix crash on 'ipconfig /all'
Ipconfig should not display invalid 'Lease Obtained' and 'Lease Expires' times because it did not yet receive any DHCP configuration. Fixes CORE-11837
This commit is contained in:
parent
6866c0aede
commit
6734d4ca09
@ -543,7 +543,7 @@ VOID ShowInfo(BOOL bAll)
|
||||
_tprintf(_T("\tSecondary WINS Server . . . . . . : %s\n"), pAdapter->SecondaryWinsServer.IpAddress.String);
|
||||
}
|
||||
|
||||
if (pAdapter->DhcpEnabled)
|
||||
if (pAdapter->DhcpEnabled && _tcscmp(pAdapter->DhcpServer.IpAddress.String, _T("255.255.255.255")))
|
||||
{
|
||||
_tprintf(_T("\tLease Obtained. . . . . . . . . . : %s"), _tasctime(localtime(&pAdapter->LeaseObtained)));
|
||||
_tprintf(_T("\tLease Expires . . . . . . . . . . : %s"), _tasctime(localtime(&pAdapter->LeaseExpires)));
|
||||
|
Loading…
Reference in New Issue
Block a user