]> git.proxmox.com Git - mirror_edk2.git/commit - NetworkPkg/Include/Library/NetLib.h
MdeModulePkg: Update IP4 stack to support point-to-point link with 31-bit mask.
authorFu Siyuan <siyuan.fu@intel.com>
Wed, 18 Oct 2017 02:13:39 +0000 (10:13 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Mon, 13 Nov 2017 05:52:17 +0000 (13:52 +0800)
commit29788f178e48fa5ffe7d3262d73c9548e9285d2d
treef333e83a1769b7ea13dd77b6c66fb0c0e38fa57a
parentdb04b706b7326da7292bfe313cf3cd05ca3d5e11
MdeModulePkg: Update IP4 stack to support point-to-point link with 31-bit mask.

V2 update: Directly use NetIp4IsUnicast() to check station address in IP driver.

This patch is to follow RFC3021 which allows to use 31-bit mask
in point-to-point link.
If a 31-bit subnet mask is assigned to a point-to-point link, it
leaves the <Host-number> with only 1 bit.  Consequently, only two
possible addresses may result:
  {<Network-number>, 0} and {<Network-number>, -1}
These addresses have historically been associated with network and
broadcast addresses (see Section 2.2).  In a point-to-point link with
a 31-bit subnet mask, the two addresses above MUST be interpreted as
host addresses.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
MdeModulePkg/Include/Library/NetLib.h
MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.c