windows-vista-20060421

Vista has a bug in the Netbios ADAPTER_STATUS output in which the
first four bytes of the MAC address with 127.0.0.1.  We must check
for that when searching for the Loopback Adapter.
This commit is contained in:
Jeffrey Altman 2006-04-22 04:45:47 +00:00
parent 106d23c3ec
commit d463c0f7c6
2 changed files with 7 additions and 5 deletions

View File

@ -435,6 +435,7 @@ extern "C" BOOL lana_IsLoopback(lana_number_t lana)
NAME_BUFFER names[MAX_LANA+1];
} astat;
unsigned char kWLA_MAC[6] = { 0x02, 0x00, 0x4c, 0x4f, 0x4f, 0x50 };
unsigned char kVista_WLA_MAC[6] = { 0x7F, 0x00, 0x00, 0x01, 0x4f, 0x50 };
int status;
HKEY hkConfig;
LONG rv;
@ -483,7 +484,8 @@ extern "C" BOOL lana_IsLoopback(lana_number_t lana)
#endif
return FALSE;
}
return (memcmp(astat.status.adapter_address, kWLA_MAC, 6) == 0);
return (memcmp(astat.status.adapter_address, kWLA_MAC, 6) == 0 ||
memcmp(astat.status.adapter_address, kVista_WLA_MAC, 6) == 0);
}
// Get the netbios named used/to-be-used by the AFS SMB server.

View File

@ -1481,10 +1481,10 @@ long smb_ReceiveRAPNetShareEnum(smb_vc_t *vcp, smb_tran2Packet_t *p, smb_packet_
int outDataTotal; /* total data bytes */
int code = 0;
DWORD rv;
DWORD allSubmount;
USHORT nShares;
DWORD nRegShares;
DWORD nSharesRet;
DWORD allSubmount = 0;
USHORT nShares = 0;
DWORD nRegShares = 0;
DWORD nSharesRet = 0;
HKEY hkParam;
HKEY hkSubmount = NULL;
smb_rap_share_info_1_t * shares;