summaryrefslogtreecommitdiff
path: root/redfish-core/lib/ethernet.hpp
diff options
context:
space:
mode:
authorJohnathan Mantey <johnathanx.mantey@intel.com>2019-06-07 20:26:29 +0300
committerEd Tanous <ed.tanous@intel.com>2019-06-13 19:14:09 +0300
commit18659d104075975913fdbc38841d2aac13e05e61 (patch)
tree5457ab9aa4fc6e112526cea89cc5192d9a1622d3 /redfish-core/lib/ethernet.hpp
parentec8abe601e7e89d67f49ab4edd881fc9923c2d67 (diff)
downloadbmcweb-18659d104075975913fdbc38841d2aac13e05e61.tar.xz
Redfish: Correctly identify IPv4 LinkLocal vs. LinkGlobal
Self assigned IPv4 addresses must be flagged as LinkLocal, not LinkGlobal. Likewise global IPv4 addresses must be flagged as LinkGlobal. Change-Id: I9f6f0ceb3d312dd0198cb54c59c579ed96fbc38a Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
Diffstat (limited to 'redfish-core/lib/ethernet.hpp')
-rw-r--r--redfish-core/lib/ethernet.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 3c509af3e8..6ce8065d11 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -470,8 +470,8 @@ inline void
// Check if given address is local, or global
ipv4_address.linktype =
boost::starts_with(ipv4_address.address, "169.254.")
- ? LinkType::Global
- : LinkType::Local;
+ ? LinkType::Local
+ : LinkType::Global;
}
}
}