NetworkPkg: Fix potential bug if the iSCSI use dns protocol.
NetworkPkg: Fix potential bug if the iSCSI use dns protocol.

Since we use the Attempt and index as the attempt variable name instead of
the MAC address plus index, we need to update this to check the whether
the Controller handle is configured to use DNS protocol

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <1ed5a37ea7f59966ee72cee136ab89437ba8fc11@intel.com>
Cc: Ye Ting <fe1f30c12225d8cd094a72a37b5acbb01ee15159@intel.com>
Cc: Fu Siyuan <eef549df2036636f79f66102b4e2dc444721df8f@intel.com>
Cc: Wu Jiaxin <91f509c31e98a6df13950454fe51aea543223eaa@intel.com>
Reviewed-by: Wu Jiaxin <91f509c31e98a6df13950454fe51aea543223eaa@intel.com>

MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2