Fix the getLan config

We did the filtering during IPAddress parameter
to avoid link local address but left it for subnetMask
and vlan parameter.
With the introduction of zeroconfig IP we have
multiIPaddress can exist on the interface.
This commit introduces the filtering for subnetmask and
vlan parameter also.

Resolves openbmc/openbmc#2664

Change-Id: I244bfe8b9d7efbf55fc1b7051489a8a204182906
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/transporthandler.cpp b/transporthandler.cpp
index a90891a..50bc473 100644
--- a/transporthandler.cpp
+++ b/transporthandler.cpp
@@ -49,10 +49,19 @@
                 {
                     try
                     {
-                        ipaddress = ipmi::getIPAddress(bus,
-                                                       ipmi::network::IP_INTERFACE,
-                                                       ipmi::network::ROOT,
-                                                       ipmi::network::IP_TYPE);
+                        auto ipObjectInfo = ipmi::getIPObject(
+                                bus,
+                                ipmi::network::IP_INTERFACE,
+                                ipmi::network::ROOT,
+                                ipmi::network::IP_TYPE);
+
+                        auto properties = ipmi::getAllDbusProperties(
+                                bus,
+                                ipObjectInfo.second,
+                                ipObjectInfo.first,
+                                ipmi::network::IP_INTERFACE);
+
+                        ipaddress = properties["Address"].get<std::string>();
 
                     }
                     // ignore the exception, as it is a valid condtion that
@@ -158,7 +167,7 @@
                 {
                     try
                     {
-                        auto ipObjectInfo = ipmi::getDbusObject(
+                        auto ipObjectInfo = ipmi::getIPObject(
                                 bus,
                                 ipmi::network::IP_INTERFACE,
                                 ipmi::network::ROOT,
@@ -273,7 +282,7 @@
                 {
                     try
                     {
-                        auto ipObjectInfo = ipmi::getDbusObject(
+                        auto ipObjectInfo = ipmi::getIPObject(
                                 bus,
                                 ipmi::network::IP_INTERFACE,
                                 ipmi::network::ROOT,