X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FNetwork%2FIp4Dxe%2FIp4Impl.c;h=91f1a67370e79279abfe99e895eec2daa6b2b708;hb=d948cf838edd02ad2c3c39c870ea751d4c33f337;hp=58adba7c8c158518dcaa5ff55d8378a46fc4dc28;hpb=7648748e99eeeadec38fda7568adb260c4acc861;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c index 58adba7c8c..91f1a67370 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c @@ -676,8 +676,11 @@ Ip4ConfigProtocol ( // Use the default address. Check the state. // if (IpSb->State == IP4_SERVICE_UNSTARTED) { - Status = EFI_NO_MAPPING; - goto ON_ERROR; + Status = Ip4StartAutoConfig (&IpSb->Ip4Config2Instance); + + if (EFI_ERROR (Status)) { + goto ON_ERROR; + } } IpIf = IpSb->DefaultInterface; @@ -838,7 +841,7 @@ Ip4StationAddressValid ( // // Only support the continuous net masks // - if ((Len = NetGetMaskLength (Netmask)) == IP4_MASK_NUM) { + if ((Len = NetGetMaskLength (Netmask)) == (IP4_MASK_MAX + 1)) { return FALSE; }