diff options
author | Ratan Gupta <ratagupt@in.ibm.com> | 2017-11-21 17:46:59 +0530 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-11-28 01:24:43 +0000 |
commit | dd64620da4f560466936752522c1878189cf6c87 (patch) | |
tree | 8deb4fecb344bf2a06a404717057335521878503 /app | |
parent | 585a1e97b0060e15ebc83973f48ec1679576e3ab (diff) | |
download | phosphor-host-ipmid-dd64620da4f560466936752522c1878189cf6c87.tar.gz phosphor-host-ipmid-dd64620da4f560466936752522c1878189cf6c87.zip |
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>
Diffstat (limited to 'app')
-rw-r--r-- | app/channel.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/app/channel.cpp b/app/channel.cpp index 72f1571..91d9987 100644 --- a/app/channel.cpp +++ b/app/channel.cpp @@ -97,10 +97,11 @@ ipmi_ret_t ipmi_set_channel_access(ipmi_netfn_t netfn, // if the system is having ip object,then // get the IP object. - ipObject = ipmi::getDbusObject(bus, - ipmi::network::IP_INTERFACE, - ipmi::network::ROOT, - ipmi::network::IP_TYPE); + ipObject = ipmi::getIPObject( + bus, + ipmi::network::IP_INTERFACE, + ipmi::network::ROOT, + ipmi::network::IP_TYPE); // Get the parent interface of the IP object. try @@ -196,11 +197,8 @@ ipmi_ret_t ipmi_set_channel_access(ipmi_netfn_t netfn, ipmi::network::IP_INTERFACE); ipaddress = channelConfig.ipaddr.empty() ? - ipmi::getIPAddress(bus, - ipmi::network::IP_INTERFACE, - ipmi::network::ROOT, - ipmi::network::IP_TYPE) : - channelConfig.ipaddr; + properties["Address"].get<std::string>() : + channelConfig.ipaddr; prefix = channelConfig.netmask.empty() ? properties["PrefixLength"].get<uint8_t>() : |