X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FNetwork%2FIp4Dxe%2FIp4If.c;h=dd2674d22400e11f05daef17db7aebde7ff872e9;hp=9cb71473128e835d16ba63f4206b72b03b1dc66e;hb=894d038a8d0e99d456042e2b6d1554c4a406ea70;hpb=f2a064736dcea55b602e0e74607cb9b5b9f4a730 diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c index 9cb7147312..dd2674d224 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c @@ -1,7 +1,7 @@ /** @file Implement IP4 pesudo interface. -Copyright (c) 2005 - 2007, Intel Corporation.
+Copyright (c) 2005 - 2009, Intel Corporation.
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -582,7 +582,7 @@ Ip4SetAddress ( Type = NetGetIpClass (IpAddr); Len = NetGetMaskLength (SubnetMask); - Netmask = gIp4AllMasks[MIN (Len, Type << 3)]; + Netmask = gIp4AllMasks[MIN ((Len - 1), Type << 3)]; Interface->NetBrdcast = (IpAddr | ~Netmask); //