summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* netipmid: apply clang-format rulesVernon Mauery2018-11-0256-2940/+2991
| | | | | | | | Lots of whitespace change. Let clang-format do its job and keep the code looking nice. Change-Id: Idfcad1a99cab8170d55a06163de8ad3f420b68b7 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* build: set language to C++Patrick Venture2018-10-311-0/+1
| | | | | | | Set the language in the build to C++. Change-Id: Id8c2bc7a4f8d71205b0adee2f11848fb2f049957 Signed-off-by: Patrick Venture <venture@google.com>
* MAINTAINERS: Update Emily's IRC nickEmily Shaffer2018-10-291-1/+1
| | | | | Change-Id: I3a9a34e5c65dc24aeee431644592ca9a581f51cb Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
* Fix IPMI SEL reservations and cancellationsJason M. Bills2018-10-081-3/+26
| | | | | | | | | | | | | | | | | | | | | | | Per the IPMI Spec, the SEL must be reserved to Delete an entry Clear the SEL Get a partial entry Add a partial entry The current SEL reservation must be cancelled when A SEL entry is added A SEL entry is deleted The SEL is cleared The device is reset A new reservation is requested This change adds a reservation status to track when a reservation is active and a method to cancel the current reservation, and it uses that to cancel the reservation in the Delete, Clear, and Add SEL methods. Change-Id: I13c88f80ec83c090ca83c1b0a8a5e1499303536b Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
* phosphor-net-ipmid: use c++17Vernon Mauery2018-10-041-1/+1
| | | | | | | Update configure.ac to choose the c++17 standard Change-Id: I7af16e26d36d2a5dd5341a6a7058c984ac60a78a Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Add support for OpenSSL 1.1.0Adriana Kobylak2018-09-062-26/+21
| | | | | | | | | | | | | | | | With OpenSSL 1.1.0, some of the functions were deprecated, such as EVP_CIPHER_CTX_cleanup. Replace EVP_CIPHER_CTX_cleanup with EVP_CIPHER_CTX_free and replace EVP_CIPHER_CTX_init with EVP_CIPHER_CTX_new as these are the new recommended interfaces. These exist in OpenSSL 1.0.2 already so this change is backward compatible. Resolves openbmc/openbmc#3135 Change-Id: I937d19708b10c33d9544f27af47963634c2bd36b Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Remove the support for insecure protocols in RMCP+Tom Joseph2018-07-303-17/+17
| | | | | | | | | | | | | | | The two supported Cipher suites for RMCP+ will be cipher Suite 3 and 17 after this change. The cipher suite 3 is the default choice for the ipmitool if the cipher suite is not explicitly mentioned. The supported algorithms are the following: Authentication: a) RAKP-HMAC-SHA1, b) RAKP-HMAC-SHA256 Integrity: a) HMAC-SHA1-9, b) HMAC-SHA256-128 Confidentiality: a) AES-CBC-128 Change-Id: Ia2fbaae29235e4bd43c42b59a2295a2db28efce3 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Fix to return sane error codeRichard Marian Thomaiyar2018-07-081-6/+16
| | | | | | | | | | | | | | Any unhandled exception in the IPMI command handler crashes the ipmi stack. IPMI command handler also becomes bulky to catch all exceptions which must return unspecified errors. This fix adds a catch in the ipmi router command handler functions, and returns IPMI_CC_UNSPECIFIED_ERROR for all the unhandled exceptions. With this fix, exceptions which has to throw IPMI_CC_UNSPECIFIED_ERROR, doesn't needs to be handled in the command handlers. Change-Id: Icf8741925d857170b2f748906edbaf6cf1e55cdc Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
* Add MAINTAINERS fileAndrew Jeffery2018-05-191-0/+47
| | | | | Change-Id: Ia113a0f1d2027610690bc3a175431dc16c2127ef Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* Fix Table:: Command Not found: 0xb03eNagaraju Goruganti2018-05-071-3/+0
| | | | | | | | | | | | | The error msg:"E> Table:: Command Not found: 0xb03e" is getting dumped into journal for every IPMI request to BMC. Here the command:b03e - is a group extensions command to query about HPM compatibility. This is not a standard command ,issued by ipmitool to gather information, can be ignored. Resolves openbmc/openbmc#3100 Change-Id: I5d89ad61144f11e80afa3bba39835119f5d96eb6 Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Support username for IPMI default user accountTom Joseph2018-04-236-7/+45
| | | | | | | | | | | | | The current support in IPMI is for the nameless account, which has no username and only password associated with the account. In ipmitool for the nameless account -U option is not needed. There are management scripts which take a parameter for -U option and fails if -U option is not supported by ipmitool option. This patch is to support "admin" username for the default account. Once full fledged user account management is in place, this change can be removed. Change-Id: Idad73c0d04f189af66f2365424a68a637fe0e476 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Spelling fixesGunnar Mills2018-04-112-2/+2
| | | | | | | | | Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2. Change-Id: I30765c0f799dabdb44b705a9720014db9a1b21df Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Implement get payload instance info commandTom Joseph2018-04-113-0/+77
| | | | | | | Resolves openbmc/openbmc#2892 Change-Id: Id5f95df64bcdc97646f11d6d3630eead062c4193 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* README: Reword cleaning the repoGunnar Mills2018-04-061-1/+1
| | | | | | | Reworded cleaning the repo. The old wording did not make sense. Change-Id: Ieb58e0b57d3527a93e62d06670854b1800da18ca Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Support SOL parameter channel numberTom Joseph2018-04-042-1/+16
| | | | | | | | | | | | Even though channel number is an optional parameter, the ipmitool shows in the output the channel as 14(0x0e). 0x0e is reserved to indicate in the command, the channel on which the command is received. So the default channel number 1 is returned. Resolves openbmc/openbmc#2959 Change-Id: Ifd069886d4ea8e9ba5c90ca015be39ebdece413d Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Patch #2 Reducing IPMI logging footprintNagaraju Goruganti2018-04-027-27/+7
| | | | | | | | | | net-ipmid is noisy in terms of journal logging. A small step towards cleaning that up. Partially Resolves openbmc/openbmc#2507 Change-Id: I78e0286fb37086373c86dca276c0948f4595cb0a Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Create sd_event outside from EventLoopRatan Gupta2018-03-273-11/+16
| | | | | | | | | | | | | | | Presently timer in the provider library needs the sd_event and sd_event gets created in the startEventLoop. RegisterCallbackHandlers gets called before the startEventLoop hence not getting the event. This commit creates the sd_event outside from the sd_event_loop and pass the sd_event reference to the startEventLoop function. Tested: run the fru print in net-ipmid context. Change-Id: I2b227154ba60e56d7faa6c8000c20a5231c4417c Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Define the ipmid_get_sd_bus_event_connectionRatan Gupta2018-03-212-2/+11
| | | | | | | | | | | | | | Due to the phosphor-host-ipmid commit (7a7f01) transporthandler.cpp start referring to the ipmid_get_sd_bus_event_connection function and transporthandler.cpp is a provider library for phosphor-net-ipmid. This commit defines the ipmid_get_sd_bus_event_connection function in the context of phosphor-net-ipmid process. Change-Id: I7fbc39f526138615966a90f78884a80b4cf063f4 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* SetLan: Define the global network timerRatan Gupta2018-03-124-1/+217
| | | | | | | | | | | | As timer is being referred in the provider library so it should be defined in per process(host-ipmid, net-ipmid) context. Defining the timer requires to pull the code of timer in this repository so adding the timer class. Change-Id: I4ea5f51fed03dd87d70868b0bc76ff1fb683931c Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Add support for cipher suite 17Vernon Mauery2017-12-087-2/+411
| | | | | | | | | cipher suite 17 uses RAKP_HMAC_SHA256 for authentication and RAKP_HMAC_SHA256_128 for integrity. This adds those in and fixes up the lookups so the stack knows about the new algorithms. Change-Id: Icdc66563d08060fc0e541ceaf3bee9dd5f89fdb2 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Prepare for adding RMCP+ cipher suite 17Vernon Mauery2017-12-0712-143/+193
| | | | | | | | | | In many places, there are baked-in assumptions about algorithms that tie the session initiation to cipher suite 3. This commit teases out those assumptions and prepares for the next patch that actually adds in the new authentication and integrity algorithms to support cipher suite 17. Change-Id: I2ee3672a7c503b89c5ff0aba30cf7a4601e24d04 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* explicit use of std::vector instead of buffer/BufferVernon Mauery2017-12-0517-67/+79
| | | | | | | | | | There were several scoped 'using buffer = std::vector<uint8_t>;' in header files. This consolidates the code base to use std::vector<uint8_t> instead of buffer or Buffer. This makes the code easier to read and debug. Change-Id: I918a0f6ca9b8e4b9d331175dccff45cbf4c8379d Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Truncate Integrity Check Value to the correct lengthVernon Mauery2017-12-042-0/+3
| | | | | | | | | | | | | According to the RMCP+ spec: RAKP-HMAC-SHA1 specifies the use of RAKP messages for the key exchange portion of establishing the session, and that HMAC-SHA1 (per [RFC2104]) is used to create 20-byte Key Exchange Authentication Code fields in RAKP Message 2 and RAKP Message 3. HMAC-SHA1-96 (per [RFC2404]) is used for generating a 12-byte Integrity Check Value field for RAKP Message 4. Change-Id: Ic85b79a748ceb4083b613a0df1c253d8099a6c22 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Adding the capability to run netipmid outside of systemdDave Cobbley2017-11-161-3/+31
| | | | | | | | | | | Currently, this application relies upon systemd handing it a socket from the phosphor-ipmi-net.socket file. If for whatever reason, you want to run this application manually (perhaps debugging), it needs to create its own socket. This should have no affect on the normal operation of netipmid. Change-Id: I4e46b586b09cb57d5ef1d2fd0e216552da388381 Signed-off-by: David Cobbley <david.j.cobbley@linux.intel.com>
* Small fixes for net ipmi handlerFeist, James2017-11-062-4/+13
| | | | | | | | | | Host ipmid handler will not re-register commands, so make the net handler follow this by skipping later registrations. Also pass size of command to handlers for length checks to work. Host ipmi handler passes this parameter correctly. Change-Id: I8eb1d645eff405b91e471433085025b6835f0bd2 Signed-off-by: Feist, James <james.feist@linux.intel.com>
* Spelling fixesGunnar Mills2017-10-253-4/+4
| | | | | | | | | Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2. Change-Id: I951ec38ae08ba0b20733dce1300546f4a7541eff Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Update Journal Variable NamesGunnar Mills2017-10-251-7/+7
| | | | | | | | Journal entry variable names should be uppercase. https://www.freedesktop.org/software/systemd/man/sd_journal_print.html Change-Id: Id7a3f72b5079302759e0855665d241f1f28d9544 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* boot settings: use the new 'one time' settingTom Joseph2017-09-132-0/+73
| | | | | | | Resolves openbmc/openbmc#2301 Change-Id: I7682de2eb1f1dc224e136735af978921bf76a12f Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Cache system GUID in netipmidTom Joseph2017-09-116-20/+65
| | | | | | | | | | | | | | | | GUID is used in the IPMI session setup steps RAKP12 and RAKP34. The GUID is read from the DBUS property. It is observed that when the host is booting, reading the GUID takes a significant delay and the session setup fails with ipmitool. Since GUID doesn't change for a machine, it is safe to cache GUID in the netipmid and speed up the session setup. Resolves openbmc/openbmc#1812 Resolves openbmc/openbmc#2245 Resolves openbmc/openbmc#2246 Change-Id: I78c993b3e5ef8b6764457c8fdb3ecb985b965c0c Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* settings: handle multiple objects/interfacesTom Joseph2017-09-112-7/+14
| | | | | | | | | Handle the fact that a settings object can now implement multiple interfaces, and also the fact that multiple settings objects can implement the same interface. Change-Id: If8a3e20fb2e1d53515d96ceabce6326d91e8eb3e Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* netipmid: Support usesolkeepalive optionTom Joseph2017-08-211-0/+8
| | | | | | | | | | | | | | ipmitool keeps SOL session active by sending Get Device ID command or using SOL packet to keep the session active. We are adding support for keeping the SOL session active by using SOL packet in which case ipmitool would send a SOL payload with no character data and a valid SOL sequence number, the BMC would respond with acknowledgement for that sequence number. Resolves openbmc/openbmc#2101 Change-Id: Ia10e622e761e0de3530e3cc8bc2148a477ffd4ba Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Implement RAII for openssl crypto functionTom Joseph2017-08-141-12/+24
| | | | | | | Resolves openbmc/openbmc#1199 Change-Id: Icc19b66a2b027a74233187788d8aafcf3a2a964a Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sol: Handle deactivate payload correctly when session is closedTom Joseph2017-08-142-2/+19
| | | | | | | | Resolves openbmc/openbmc#1781 Resolves openbmc/openbmc#2053 Change-Id: Iabb61fc510d33a4132e7ad07184eb8847301b686 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* netipmid: Provide support to fetch paths of settings dbus objectsTom Joseph2017-08-084-3/+159
| | | | | | | Resolves openbmc/openbmc#2065 Change-Id: I71038cb13807cb4dd87fc6661d27e95f08cdc29e Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Cleanup the console buffer on stopping the SOL payload.Tom Joseph2017-08-011-0/+2
| | | | | | | Resolves openbmc/openbmc#1811 Change-Id: I45c7f9379e4df28733f55fbe4830573d0fe09c14 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* attach the sd bus to sd_event to receive signalsMarri Devender Rao2017-07-192-0/+9
| | | | | | | | Registering for property change signals for FRU inventory data so notification is required. Change-Id: I2dfee62d32b5b0726faa4643ee1efe9718424a61 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
* Correct doxygen syntax in phosphor-net-ipmidTom Joseph2017-05-2316-122/+130
| | | | | | | Resolves openbmc/openbmc#1147 Change-Id: I57ab1b09ec1bf308cc3d97cd30b2d18564beb38b Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add Get/Set SOL configuration commands to registerCommands.Tom Joseph2017-05-081-0/+16
| | | | | | | Resolves openbmc/openbmc#858 Change-Id: I5ddca8a5166ae41764c74ae2a8da858de82a1f47 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add support for Get SOL configuration parameters command.Tom Joseph2017-05-082-0/+129
| | | | | Change-Id: I711cbcd66caea7939d7604551ea4d80a1576244e Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add support for Set SOL Configuration parameters command.Tom Joseph2017-05-082-0/+210
| | | | | Change-Id: I82618bc21c426e37f0110b11aeba9855e588bb6c Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Allow SOL activation only if SOL is enabled.Tom Joseph2017-05-081-0/+6
| | | | | Change-Id: Id5de2417b2cddd7711179c2516d5557983ace78e Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add SOL configuration parameters to SOL Managers.Tom Joseph2017-05-081-0/+50
| | | | | | | | | Add Set In Progress, SOL Enable, Force SOL Payload Encryption, Force SOL Payload Authentication and SOL Privilege Level SOL Configuration parameters as SOL Manager properties. Change-Id: Ic8c2f172df8ce92e2ef5675493e2843824746b47 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Change accumulateInterval and retryInterval to std::chrono units.Tom Joseph2017-05-082-24/+16
| | | | | Change-Id: I5e1234ee141323a1feb6460a9424226f96bc7522 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Correct the parameters for SOLContext constructor.Tom Joseph2017-05-081-1/+1
| | | | | Change-Id: I3643e6b55d195f255815fa47adf02a5db0da6838 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Remove hostConsole fd from the event loop.Tom Joseph2017-05-083-11/+11
| | | | | | | | The fd is registered in the sd_event_loop, so as part of cleanup of the customFD the fd is removed from the event loop. Change-Id: Idfc07375ae330c82755fb1d08c8f181410cf917f Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Change the signature of the command handler functions.Tom Joseph2017-04-2515-36/+39
| | | | | | | Resolves openbmc/openbmc#857 Change-Id: I0b7ca6665dd89629838a238d77aff67fec1818c7 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add test-driver to .gitignoreTom Joseph2017-04-251-0/+1
| | | | | Change-Id: Ibc818ebbe6616b0c9391900f3aaf87bde666c842 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Remove the code related to obsolete event loop.Tom Joseph2017-04-251-134/+0
| | | | | Change-Id: I2398c827f3744bd3949948b2e36248b6c4ee6f25 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Start the event loop for net-ipmidTom Joseph2017-04-251-1/+1
| | | | | Change-Id: I0015dc491bc06f3071e5a896c4c6e5fe1d539421 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Register SOL commands to the command table.Tom Joseph2017-04-251-1/+4
| | | | | Change-Id: If254dd033aa317d6a891789111e56183c2bf3707 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
OpenPOWER on IntegriCloud