summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/channel.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/app/channel.cpp b/app/channel.cpp
index 64cc6e9..283188c 100644
--- a/app/channel.cpp
+++ b/app/channel.cpp
@@ -176,6 +176,15 @@ ipmi_ret_t ipmi_set_channel_access(ipmi_netfn_t netfn,
ipmi::network::ETHERNET_INTERFACE,
"DHCPEnabled").get<bool>();
+ // if ip address source is not given then get the ip source mode
+ // from the system so that it can be applied later.
+ if (channelConf->ipsrc == ipmi::network::IPOrigin::UNSPECIFIED)
+ {
+ channelConf->ipsrc = (enableDHCP) ?
+ ipmi::network::IPOrigin::DHCP :
+ ipmi::network::IPOrigin::STATIC;
+ }
+
// check whether user has given all the data
// or the configured system interface is dhcp enabled,
// in both of the cases get the values from the cache.
@@ -188,18 +197,6 @@ ipmi_ret_t ipmi_set_channel_access(ipmi_netfn_t netfn,
ipaddress = channelConf->ipaddr;
prefix = ipmi::network::toPrefix(AF_INET, channelConf->netmask);
gateway = channelConf->gateway;
- if (channelConf->vlanID != ipmi::network::VLAN_ID_MASK)
- {
- //get the first twelve bits which is vlan id
- //not interested in rest of the bits.
- channelConf->vlanID = le32toh(channelConf->vlanID);
- vlanID = channelConf->vlanID & ipmi::network::VLAN_ID_MASK;
- }
- else
- {
- vlanID = ipmi::network::getVLAN(networkInterfacePath);
- }
-
}
else // asked ip src = static and configured system src = static
// or partially given data.
OpenPOWER on IntegriCloud