\r
ASSERT if NetMask is zero.\r
\r
- If all bits of the host address of IP are 0 or 1, IP is also not a valid unicast address.\r
+ If all bits of the host address of IP are 0 or 1, IP is also not a valid unicast address,\r
+ except when the originator is one of the endpoints of a point-to-point link with a 31-bit\r
+ mask (RFC3021).\r
\r
@param[in] Ip The IP to check against.\r
@param[in] NetMask The mask of the IP.\r
if (Ip == 0 || IP4_IS_LOCAL_BROADCAST (Ip)) {\r
return FALSE;\r
}\r
- \r
- if (((Ip &~NetMask) == ~NetMask) || ((Ip &~NetMask) == 0)) {\r
- return FALSE;\r
+\r
+ if (NetGetMaskLength (NetMask) != 31) {\r
+ if (((Ip &~NetMask) == ~NetMask) || ((Ip &~NetMask) == 0)) {\r
+ return FALSE;\r
+ }\r
+ } else {\r
+ return TRUE;\r
}\r
\r
return TRUE;\r