summaryrefslogtreecommitdiffstats
path: root/app
Commit message (Collapse)AuthorAgeFilesLines
* Don't report serviceable action if the watchdog service is not presentTom Joseph2020-01-141-6/+0
| | | | | | | | | | | | There were a few cases where a service action was reported because the watchdog service was not present. It was because of a race condition where the power down operation is trigerred and the watchdog service is shutdown but if was followed by a watchdog reset. Since the watchdog service is absent it resulted in an error log which calls for serviceable action. The IPMI error response code will report the failure to the host platform software. Change-Id: Iaf0a860b53fbd85dc451fc4d4a337406ba74e0d6 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* app/watchdog: Always use resetTimeRemainingWilliam A. Kennington III2020-01-063-13/+1
| | | | | | | | | | | | | | The SetWatchdog function currently sets the intervals and then the time remaining on the watchdog. It uses the user provided interval for both values. Recently, the watchdog was extended to allow for the interval to be capped above a certain value to prevent the user from setting watchdogs that are known to be too short. In order to keep the timeRemaining in sync with the value in the watchdog, just use the resetTimeRemaining() function which reads the current interval to set the timeRemaining. Change-Id: I3f15030a85c625fcb1ed8040add03496618a5ece Signed-off-by: William A. Kennington III <wak@google.com>
* Expiration flags fix for watchdog get/set commandsYong Li2019-11-012-23/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The expiration flags should be retain their state across system resets and power cycles. Tested: Set “BIOS FRB2” and start ipmitool raw 0x06 0x24 0x01 0x00 0x00 0x00 0x30 0x00 ipmitool mc watchdog reset after stopped: Timer Expiration Flags should be : (0x02) * BIOS FRB2 Then Set “BIOS/POST” and start, ipmitool raw 0x06 0x24 0x02 0x00 0x00 0x00 0x30 0x00 ipmitool mc watchdog reset after stopped: Timer Expiration Flags should be : (0x06) * BIOS FRB2 * BIOS/POST “impitool mc watchdog get” displays the correct Timer Expiration Flags when the timer is running; Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: Ic0c27c6c1e8bed2db8ce30fc0eec2a6538bb1992
* channel:Fix get channel ciphersuite - payloadtypesjayaprakash Mutyala2019-10-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: Get channel CipherSuite command passed with invalid payload type Fix: Added the check now to allow only valid payload types Tested: Command: ipmitool raw 0x06 0x54 0x01 0xff 0x80 Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x54 rsp=0x80): Unknown (0x80) Command: ipmitool raw 0x06 0x54 0x01 0x12 0x80 Response: 01 c0 03 01 41 81 c0 11 03 44 81 Command: ipmitool raw 0x06 0x54 0x01 0x09 0x80 Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x54 rsp=0x80): Unknown (0x80) Command: ipmitool raw 0x06 0x54 0x01 0x02 0x00 Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x54 rsp=0x80): Unknown (0x80) Command: ipmitool raw 0x06 0x54 0x01 0x12 0x00 Response: 01 01 03 41 44 81 Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> Change-Id: I552250736d7e898191ddbb45fd1bff42681b9c63
* Data checking fix for watchdog set/get commandsYong Li2019-10-113-26/+31
| | | | | | | | | | | | | | | | | | data length check for timeout action and byte 1 reserved field check are missing, causing not to throw the error; Log flags is on bit 7, also needs to right-shift this flag; This commit fixes these issues; Tested: Set different timer use/actions: ipmitool raw 0x06 0x24 0x85 0x0 0x0 0x0 0x64 0x00 ipmitool raw 0x06 0x24 0x84 0x1 0x0 0x0 0x64 0x00 Check the settings are correct: ipmitool raw 0x06 0x25 Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: Ia4226bb4597d2c670f93522aa763e43d15eb6cf1
* transporthandler: Rewrite + New HandlerWilliam A. Kennington III2019-09-271-1/+0
| | | | | | | | | | | | | | | | | | This rewrites the old transport handler to use the new ipmi handler registration functions. It attempts to clean up the old code, by refactoring any business logic out of the code that parses the IPMI messages. This makes the code paths easier to understand and allows for better code re-use. This also gets rid of the concept of the settings change timer. Clients expect to see their settings take effect as soon as they are set, regardless of the "Set In Progress" flag. This means we no longer need a cache for our network settings that are about to be set by the daemon, and a client can hold the BMC in "Set In Progress" while it verifies settings like other BMC implementations. Change-Id: I5406a674f087600afdfc2c0b3adeacde10986abc Signed-off-by: William A. Kennington III <wak@google.com>
* Fix: execute get channel cipher suite in lan chanAyushi Smriti2019-09-251-0/+9
| | | | | | | | | | | | | | | | | | Get channel cipher suites command was executed for non lan channels. Fixing the same by adding active lan channel support check. Tested: ipmitool raw 0x06 0x54 0x01 0x00 0x80 01 c0 03 01 41 81 c0 11 03 44 81 //cmd executed for lan chan 1 ipmitool raw 0x06 0x54 0x00 0x00 0x80 Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x54 rsp=0xcc): Invalid data field in request //cc resulted for non lan chan 0 Signed-off-by: Ayushi Smriti <smriti.ayushi@linux.intel.com> Change-Id: Ic3c2dfa3f4537be789e2afc912fa8f4c2a49bda4
* Fix: refactor get channel cipher suite commandAyushi Smriti2019-09-252-75/+54
| | | | | | | | | | | | | | | Get channel cipher suites command updated as per new ipmi structure. Tested: ipmitool raw 0x06 0x54 0x01 0x00 0x80 01 c0 03 01 41 81 c0 11 03 44 81 //response Also verified by issuing cmd: ipmitool channel getciphers ipmi 0x01 which listed supported CIA algorithms as response Signed-off-by: Ayushi Smriti <smriti.ayushi@linux.intel.com> Change-Id: Ibc942f5b197c72071cd35a138fbe244db7519824
* Static code analysis scan issue fixChen,Yugang2019-09-231-1/+2
| | | | | | | | | | | | | Fix the issues found during code static scan Tested: test in board, function works fine. 1. busctl set-property for watchdog, it works fine. 2. It works by running "ipmitool chassis power soft". 3. run "ipmitool raw 0x6 0x46 1", get expected user information. Change-Id: I7a2cc3c934db6a7531f8a8ea05956cb6d6337633 Signed-off-by: Chen,Yugang <yugang.chen@linux.intel.com>
* Watchdog: move get and set watchdog to new api.Deepak Kumar Sahu2019-09-104-102/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite "get and set watchdog" command to use the newly introduced ipmi api. Tested: Verified using ipmitool "get and set watchdog", timer behavior is same before and after the changes. Testing Procedure: default watchdog timer is 11.2 seconds. ipmitool raw 0x06 0x25 ---> Get Output: 00 00 00 00 70 17 70 17 Note: Here 70 count(hex value)->112 count(decimal value)->112*100=11200ms [100ms per count]->11.2sec (watchdog timer) watchdog timer set to 20 seconds. ipmitool raw 0x06 0x24 0x44 0x01 0x00 0x10 0xc8 0x00 ----> Set output: ipmitool raw 0x06 0x25 ---> Get output: 04 01 00 00 c8 00 c8 00 Note: Here 20sec->20000ms->200count->c8 (hex value) Signed-off-by: Deepak Kumar Sahu <deepakx.sahu@intel.com> Change-Id: Id8c096bc1635d1900ee842a9726c49fb690fa8bc
* Return error if the input data is larger than expectedYu Ren2019-05-201-1/+1
| | | | | | | | | | | | If the input data length exceeds the expected, return len_invalid too Tested: ipmitool raw 0x06 0x24 0x01 0x13 0x0 0x2 0xa 0x00 0xff Will return error Signed-off-by: Yu Ren <yux.ren@intel.com> Change-Id: I12168f4aed51c499fd06067ca4475917b68e819e
* move variant to std namespaceVernon Mauery2019-04-181-12/+12
| | | | | | | | | | | sdbusplus::message::variant_ns has been std for a while now. This moves ipmid away from sdbusplus::message::variant_ns to directly use std::variant. Tested-by: built, compiles, and runs the same as before. Change-Id: I8caa945f31c926c2721319f001b9d7f83fd3f1b7 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* rewrite Reset Watchdog Timer command to use new provider APIVernon Mauery2019-04-112-27/+9
| | | | | | | | | | | | Modify to use the new provider API. One by one, change calls to remove any legacy API constructs. Tested-by: ipmitool mc watchdog get ipmitool mc watchdog off ipmitool mc watchdog reset Change-Id: If6cd1d921908dc7f5462e99b0098b4897e743ebb Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Only include ipmid/api.hpp for the new APIVernon Mauery2019-04-083-4/+3
| | | | | | | | | | | | | | After some feedback from users of the new IPMI API, they wanted to see two things: 1) don't require ipmid/api.hpp and ipmid/registration.hpp to be able to write new handlers 2) only require including ipmid/api.hpp (instead of ipmid/api.h) So now, by simply including ipmid/api.hpp instead of ipmid/api.h (deprecated), handlers incorporating the new IPMI API can be written. Change-Id: I446dcce70cff03d4ecc28c658292d052485f77fc Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Remove old channel commandsVernon Mauery2019-04-011-171/+0
| | | | | | | | | New channel commands have been implemented in user_channel/channelcommands.cpp This removes the old, unused command implementation Change-Id: I054ea053d25865e0d4203f2ae294778d31817637 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* remove legacy ipmid.cpp and ipmid.hppVernon Mauery2019-04-012-2/+2
| | | | | | | These two files have now been replaced with newer APIs and can be removed. Change-Id: If60227b24188c6796211ca43379169f9a95c9cb3 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* move types.hpp to ipmid/types.hpp for exportVernon Mauery2019-03-251-1/+1
| | | | | | | | | | types.hpp is required by utility.hpp, which is exported, so it needs to be exported as well. This moves it to the include/libipmid directory, changes the Makefile to export it, and changes all the files that include it so it can be found in the right place. Change-Id: I30ec365446e4de466c266ec4faa327478460ec05 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Move util.cpp/util.hpp to libipmidVernon Mauery2019-03-252-3/+2
| | | | | | | | | | | | | | | | These are functions that are used widely by ipmid providers, so it makes sense to put them in libipmi.so (the library that all providers must link against). Tested-by: use nm to inspect the binaries to see that the symbols are in the expected library. arm-openbmc-linux-gnueabi-nm libipmid.so.0.0.0 \ | grep getDbusObject 0001063c T _ZN4ipmi13getDbusObjectERN9sdbusplus.... Change-Id: I1221f807f2711c5301c5574623564ea1ae48a437 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Get the correct present countdown value when watchdog is stoppedYong Li2019-02-121-4/+8
| | | | | | | | | | | | The timeRemaining property in watchdog service will return 0 if the watchdog is not started. Tested By: ipmitool raw 0x6 0x24 0x0 0x0 0x0 0x0 0xa 0xb ipmitool mc watchdog get Change-Id: I27992f25a0e2c75df398ec5e2702b467365e9a32 Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
* Add timer use field support in watchdog commandYong Li2019-02-123-0/+108
| | | | | | | | | Tested: ipmitool raw 0x06 0x24 1 0 0 0 0 0 ipmitool mc watchdog get Change-Id: Iaffd6622821d33183a52f54a4e2e52a36aa17dde Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
* Create libipmid and libipmid-hostWilliam A. Kennington III2019-02-073-3/+3
| | | | | | | | | | | | | | | | | | | This starts a transition to common ipmid libraries that providers can link against. It will allow for a cleaner separation between common ipmid functionality and daemon type specific code. This is needed so we can resolve all of the symbols in the providers at link time instead of discovering bad linkage by building and running a full ipmi daemon. In future commits libraries will be packaged for libipmid and libipmid-host which provide all of the symbols used by the current set of ipmid providers. This is the first step, it just separates and renames the headers. Legacy symlinks are still kept around for compatability. It also adds stub libraries so that external users can start linking as intended. Change-Id: I6bbd7a146362012d26812a7b039d1c4075862cbd Signed-off-by: William A. Kennington III <wak@google.com>
* IPMI channel to NIC device mapping modified within JSON config fileJohnathan Mantey2019-02-041-4/+4
| | | | | | | | | | | The IPMI to NIC channel mapping was done using a hard coded scheme. The scheme used generic channel names which were then mapped to specific device names. The hard coded generic to specific naming convention is removed, and the JSON file contains the device name directly. Change-Id: Ibc6821cae5a26f2666467aba5346d364053f2582 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
* Fix: Get Channel Cipher suite to list algoRichard Marian Thomaiyar2019-01-291-28/+43
| | | | | | | | | | | | | | | Implemented Get channel cipher suite command to list the supported algorithms. Previously this command supported only list by cipher suite. Unit test: Verified that algorithms are listed for both byte3 bit7 set / un-set ipmitool raw 0x6 0x54 0x1 0x0 0x80 ipmitool raw 0x6 0x54 0x1 0x0 0x00 both listed alogrithms as expected Change-Id: I7b0ac74293cce869f5bcaa3c5ec226e1d237ccdf Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* app/channel: fixup c-style castingPatrick Venture2018-10-311-1/+1
| | | | | | | Fix up c-style casting in app/channel.cpp:102 Change-Id: Ie6da0ff238856e01305127395d48ec161a30c4a1 Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: scope reductionPatrick Venture2018-10-311-9/+10
| | | | | | | | | | | | | | [app/channel.cpp:102]: (style) The scope of the variable 'resp' can be reduced. [ipmisensor.cpp:310]: (style) The scope of the variable 'i' can be reduced. [ipmid.cpp:506]: (style) The scope of the variable 'num_handlers' can be reduced. [read_fru_data.cpp:82]: (style) The scope of the variable 'fruId' can be reduced. [sensorhandler.cpp:256]: (style) The scope of the variable 'p' can be reduced. [storageaddsel.cpp:68]: (style) The scope of the variable 'p' can be reduced. Also delete two extra vertical lines. Change-Id: I8e72f8e1d94381f456674abf523d2f2fbdd8046d Signed-off-by: Patrick Venture <venture@google.com>
* rename headers to match stylePatrick Venture2018-09-253-5/+4
| | | | | | | | | | | | | | | | | | Moving headers from ".h" to ".hpp" Reworked the header inclusion a bit so that host-ipmid is treated as a library, and local headers aren't. renamed apphandler.h => apphandler.hpp renamed chassishandler.h => chassishandler.hpp renamed globalhandler.h => globalhandler.hpp renamed sensorhandler.h => sensorhandler.hpp renamed storageaddsel.h => storageaddsel.hpp renamed storagehandler.h => storagehandler.hpp renamed systemintfcmds.h => systemintfcmds.hpp Change-Id: I9d4ce3dd57e2e996800f9020a10cc10cdf2c3914 Signed-off-by: Patrick Venture <venture@google.com>
* Implement Set Channel access commandTom Joseph2018-09-251-0/+124
| | | | | | | | The only option supported is the access mode for disabling or enabling the network IPMI. Change-Id: I2e6b20c317fec19e1e71b3adfc211e6fb847f737 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* app/watchdog: Only log internal failures onceWilliam A. Kennington III2018-09-211-10/+35
| | | | | | | | | | | | | | | | | Logging internal failures to the phosphor-logger is a slow process that can take up to 5 seconds. If we do this for each watchdog reset for a relatively fast watchdog we will clog up the channel and fill the ESEL log with errors. We probably don't want that kind of information to build up. Instead, only report errors to the ESEL when the state of the internal watchdog transitions from HEALTHY -> UNHEALTHY. Tested: Works on zaius when booting and terminating the watchdog daemon while it is ticking. Produces the expected single error in the log and only delays the IPMI channel once. Change-Id: I8110ba66c4a85e188666a34cb6d055bdbec30622 Signed-off-by: William A. Kennington III <wak@google.com>
* add .clang-formatPatrick Venture2018-09-076-232/+221
| | | | | Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5 Signed-off-by: Patrick Venture <venture@google.com>
* app/watchdog_service: More useful error outputWilliam A. Kennington III2018-07-181-13/+45
| | | | | | | | This patch adds error handling around the decoding of requests to the watchdog service, to give more useful context in the case of errors. Change-Id: If668b17e88dc65a938b69d8c2cdd760456170962 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Get only the initialized property during resetWilliam A. Kennington III2018-05-223-3/+46
| | | | | | | | | | Since we switched to resetting the watchdog with a built-in method, we are only using a single property from the watchdog. Instead of fetching all the properties and reading just the initialized one, only request the initialized property from the watchdog. Change-Id: I5e29b5100629e1ce23f352b0b749a434cd1ab793 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Use ResetTimeRemaining for wd_resetWilliam A. Kennington III2018-05-223-6/+32
| | | | | | | | Using this helper method reduces the number of dbus calls made during each watchdog reset. Change-Id: I373db3babe03e05fca33eb4dbbbc7c07f95a39ea Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog_service: Convert runtime errors to internal failuresWilliam A. Kennington III2018-05-221-2/+14
| | | | | | | | We want to better adhere to the openbmc convention of logging our errors and reporting and internal exception upstack. Change-Id: I78a277ed564b1ac269d84c024b75d2b0f534e911 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Handle and report internal failuresWilliam A. Kennington III2018-05-221-0/+26
| | | | | | | | | An upcoming change will introduce InternalFailures instead of using runtime exceptions for error handling in the watchdog service. We need to handle these exceptions appropriately. Change-Id: Icfc02d98821f307a37a4cf59911913c820e88744 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Retry dbus requests if the service was cachedWilliam A. Kennington III2018-05-111-0/+12
| | | | | | | | | | | | Right now if the phosphor-watchdog gets restarted, the first ipmi request querying it will fail and return all the way back up to the ipmi client. In this case, it would be nicer for the client if we retried the request once before reporting a failure. Resolves openbmc/phosphor-host-ipmid#111 Change-Id: I73fce5431911279f9c2e4389d32b671ed60c2305 Signed-off-by: William A. Kennington III <wak@google.com>
* Reducing IPMI logging footprintAditya Saripalli2018-04-181-2/+0
| | | | | | | | | | | | -host-ipmid is very noisy in terms of journal logging. A small step towards cleaning that up. -Also converted printfs to phosphor-logging. Partially Resolves openbmc/openbmc#2507 Change-Id: I749c19c18d1cabf6f0216830c8cb0a08ee43d6de Signed-off-by: Aditya Saripalli <aditya0124@gmail.com> Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Implement Get Channel Cipher Suites commandTom Joseph2018-04-162-0/+203
| | | | | Change-Id: I8c808ce7e2bbd3ae5e225573138d7e04871f1643 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* watchdog: Cache service nameWilliam A. Kennington III2018-04-022-8/+10
| | | | | | | | | | | | | | | | | | | | | We have occasionally noticed that the watchdog will be enabled and then immediately trip upon booting of the BMC. This happens if the host is still running when the BMC is coming up. Digging into the issue we notice that the phosphor-mapper can be under very heavy load responding to all of the initial mapping requests from BMC daemons starting. This causes a delay in the phosphor-watchdog service name lookup during an attempt to reset the watchdog countdown. The lookup delay is so long that the watchdog ends up tripping before the reset is actually issued, causing the BMC to reset the host. Since we know that the watchdog will not be armed until the service resolves for the first time, we can reduce the dependence and pressure on the service mapper by caching the service name. Since it is the case that we want to keep issuing resets to the same daemon that was initially configured, we should have no worries about invalidating the cached service name. The name will be invalidated any time we encounter a dbus level error issuing a watchdog commmand. Change-Id: I303a39be997c2e57050b71efc8ef2e2cb27f8cf7 Signed-off-by: William A. Kennington III <wak@google.com>
* SetLan: Move the setChannel access functionRatan Gupta2018-03-201-324/+0
| | | | | | | | | | | | | | | Move the function from app/channel.cpp to the transporthandler.cpp setChannel access is disabled now as the functionality to apply the network changes would be done through timer based approach. In later commit we would create this function as callback when the network timer expires. Change-Id: Ic128a47237b2ecdbc56267227105909f8886a862 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* watchdog: Implements the Watchdog Get CommandWilliam A. Kennington III2018-02-212-0/+116
| | | | | Change-Id: I2ba9fd0eeba4e828cafd1bcf6fe30e2322eaf99e Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Implement watchdog action settingWilliam A. Kennington III2018-02-213-7/+52
| | | | | | | | We now respect the action set during the SetTimeout command. This maps to one of the actions defined by the dbus Watchdog interface Change-Id: I4d13d2539a2d955a4340bf5f915ca6f3b694550a Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Implement initialized using the new dbus interfaceWilliam A. Kennington III2018-02-213-0/+24
| | | | | | | | | This makes it possible for the phosphor-host-ipmi or any other watchdog managing daemon to report to the caller that the watchdog was not configured if the phosphor-watchdog daemon restarts for any reason. Change-Id: Iae3a8554c2f5d1cb89368f3ce14b3d44922599c0 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Rewrite using sdbusplusWilliam A. Kennington III2018-02-213-180/+220
| | | | | Change-Id: I730317954819859d23fdaca7336f19f5c5b0c107 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Reorganize header and function namesWilliam A. Kennington III2018-02-152-106/+107
| | | | | | | | This is a refactoring of names + header cleanup and has no functional change. Change-Id: Ie90fded80b6a26927f56bb342993193530b8b8ef Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Consistently return errors for dbus failuresWilliam A. Kennington III2018-02-061-4/+18
| | | | | | | | | This adds return codes for all of the dbus failures which inform the host that it should retry the IPMI command as dbus related errors should be ephemeral. Change-Id: I090f488535625a996347677a0c8addbdff0996c0 Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Fix enabled value typeWilliam A. Kennington III2018-01-291-1/+1
| | | | | | | | | | | | | | When deserializing a bool with sd_bus_message_read, it expects the storage of the passed in container to be 4 bytes. A bool is not guaranteed to be this large and will cause sd_bus_message_read to scribble on the stack. Change enabled to int to guarantee enough space to deserialize the result. For reference libsystemd is doing: *(int*) p = !!*(uint8_t*) q; Change-Id: Ic299e303fcb70941757c453a7b4f643337220afb Signed-off-by: William A. Kennington III <wak@google.com>
* watchdog: Implement error on reset of disabled watchdogWilliam A. Kennington III2018-01-241-1/+30
| | | | | | | | | This enables the host to recover when the BMC resets or the daemon loses state for some reason. A well formed host will resend the SetTimeout command if it encounters this error code. Change-Id: Ib5fd50ac3ad83ef820f0209354aa8f084a563995 Signed-off-by: William A. Kennington III <wak@google.com>
* LANConf: Minor FixesRatan Gupta2018-01-171-12/+9
| | | | | | | | | | | 1) Get the interface mode of the system if it is not given so that we can set the same interface mode as it was before. 2) Removed the unnecessary condition of getting the VLAN. Resolves openbmc/openbmc#2738 Change-Id: I1658fbf78627e7cc1c7e1e5875964ed30c58d6dc Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* multiple channel configuration supportPatrick Venture2017-12-121-54/+75
| | | | | | | | | | | | | | Previously, the ipmi daemon only supported eth0 and hard-coded it to channel 1. This allows one to map via a configuration. The channel number provided is checked against a configuration to retrieve the ethernet device identifier, e.g. eth0. Tested: Ran on a quanta-q71l and was able to properly set MAC, IP, Netmask, Gateway IP, and then verified the data was set for the eth1 via `ip addr show eth1`. Change-Id: I92f63188297304e9454fd0d6fe32bc6cf84bb181 Signed-off-by: Patrick Venture <venture@google.com>
* Fix the getLan configRatan Gupta2017-11-281-9/+7
| | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud