diff options
author | Ed Tanous <ed.tanous@intel.com> | 2019-08-19 21:16:19 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2019-08-20 18:56:17 +0300 |
commit | 35e295e2a161fcf146ea031de53431b2888521fa (patch) | |
tree | a0c78943fef5c085f371aaa840d46edecc1f2e95 /meta-openbmc-mods/meta-common/recipes-phosphor/ipmi | |
parent | 9856ac69064742544fafad307d3ee4544385ffa2 (diff) | |
download | openbmc-35e295e2a161fcf146ea031de53431b2888521fa.tar.xz |
Sync to internal 8-19-2019
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/ipmi')
3 files changed, 47 insertions, 2 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0066-Valid-VLANID-should-be-1-4095-as-in-802.1VLAN-spec.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0066-Valid-VLANID-should-be-1-4095-as-in-802.1VLAN-spec.patch new file mode 100644 index 000000000..f8f71338a --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host/0066-Valid-VLANID-should-be-1-4095-as-in-802.1VLAN-spec.patch @@ -0,0 +1,44 @@ +From 07caf4cc516601c93d12bbe89b4afb0284201dff Mon Sep 17 00:00:00 2001 +From: Suryakanth Sekar <suryakanth.sekar@linux.intel.com> +Date: Fri, 2 Aug 2019 14:18:31 +0530 +Subject: [PATCH] Valid VLANID should be 1-4095 as in 802.1VLAN spec + +Added the VLAN ID checking condition in Set LAN configuration + +Unit test: +Verified VLAN ID 1-4095 is allowed and CC returns for 0 & > 4095 + +Change-Id: I1737986ed7adb727758dedb84b851ba2c208cea3 +Signed-off-by: Suryakanth Sekar <suryakanth.sekar@linux.intel.com> +--- + transporthandler.cpp | 4 ++++ + transporthandler.hpp | 1 + + 2 files changed, 5 insertions(+) + +diff --git a/transporthandler.cpp b/transporthandler.cpp +index 44ddcef..ede6472 100644 +--- a/transporthandler.cpp ++++ b/transporthandler.cpp +@@ -536,6 +536,10 @@ ipmi_ret_t ipmi_transport_set_lan(ipmi_netfn_t netfn, ipmi_cmd_t cmd, + // We assume that ipmitool always send enable + // bit as 1. + vlan = le16toh(vlan); ++ if (vlan == 0 || vlan > maxValidVLANIDValue) ++ { ++ return IPMI_CC_INVALID_FIELD_REQUEST; ++ } + channelConf->vlanID = vlan; + } + break; +diff --git a/transporthandler.hpp b/transporthandler.hpp +index 1237658..d8805e1 100644 +--- a/transporthandler.hpp ++++ b/transporthandler.hpp +@@ -219,3 +219,4 @@ enum class Privilege : uint8_t + + constexpr uint8_t progressMask = 0x03; + constexpr uint8_t enableMask = 0x01; ++constexpr uint16_t maxValidVLANIDValue = 4095; +-- +2.7.4 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend index d8f9203c9..16bd9f757 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend @@ -3,7 +3,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" # TODO: This should be removed, once up-stream bump up # issue is resolved #SRC_URI = "git://github.com/openbmc/phosphor-host-ipmid" -SRCREV = "894d022017215acceafc9e3f21379534f5396d21" +SRCREV = "9da3a75091e0bf0849e2555447e64a70f1dc3bfb" SRC_URI += "file://phosphor-ipmi-host.service \ file://host-ipmid-whitelist.conf \ @@ -21,6 +21,7 @@ SRC_URI += "file://phosphor-ipmi-host.service \ file://0063-Save-the-pre-timeout-interrupt-in-dbus-property.patch \ file://0064-Enable-watchdog-to-save-useflag-after-host-power-off.patch \ file://0064-Update-provisioning-mode-filter-logic.patch \ + file://0066-Valid-VLANID-should-be-1-4095-as-in-802.1VLAN-spec.patch \ " # remove the softpoweroff service since we do not need it diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend index 05f10d980..24037a4cb 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-net_%.bbappend @@ -3,7 +3,7 @@ inherit useradd # TODO: This should be removed, once up-stream bump up # issue is resolved SRC_URI += "git://github.com/openbmc/phosphor-net-ipmid" -SRCREV = "0a269046d0d9fcd690ccbb129ae58a3c1450b04e" +SRCREV = "35ca150beb7d5faf2fe0ca44c87bc7b0ade0aee7" USERADD_PACKAGES = "${PN}" # add a group called ipmi |