cloudstack/utils/src/com/cloud
Rohit Yadav 514c2ef0fb NetUtils: Check for NPE in getDefaultHostIp method when processing nic/mac
On hosts or containers where they don't have valid mac address on nic resulting
in null, NetUtils.getNetworkParam can throw NPE.

This was a case found on TravisCI where OpenVZ containers are used. This method
(getDefaultHostIp) is used at several other places within the ACS codebase to
get the host IP and if null is caught we fallback to localhost or 127.0.0.1, so
we therefore set info to null before trying to process network param and if we
fail we return null and expect other layers to use localhost.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 7ada4ad50b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	utils/src/com/cloud/utils/net/NetUtils.java
2014-09-01 16:09:36 +02:00
..
maint CLOUDSTACK-4793 : Added UpgradeRouterTemplate API. Added filters to listRouters API. listRouters response includes verion and required upgrade flag. Min VR version is checked before sending commands to router 2013-11-07 19:49:05 +05:30
utils NetUtils: Check for NPE in getDefaultHostIp method when processing nic/mac 2014-09-01 16:09:36 +02:00