Closed Kitsok closed 1 year ago
After resent changes to OpenBMC, SOL, KVM and VirtualMedia stopped working.
I've compiled bmcweb with debug and found following report upon websocket connect:
In the sources rules[ruleIndex]->getMethods() is compared to 1U << static_cast(req.method())) https://github.com/openbmc/bmcweb/blob/master/http/routing.hpp#L1270
Meanwhile the report in the same code block and below are printing rules[ruleIndex]->getMethods() and static_cast(req.method())) https://github.com/openbmc/bmcweb/blob/master/http/routing.hpp#L1274 https://github.com/openbmc/bmcweb/blob/master/http/routing.hpp#L1282
After removing "1U <<" the problem disappeared. Looks like the fix is:
index ed1b7e48..00283524 100644 --- a/http/routing.hpp +++ b/http/routing.hpp @@ -1267,7 +1267,7 @@ class Router } if ((rules[ruleIndex]->getMethods() & - (1U << static_cast<size_t>(req.method()))) == 0) + static_cast<size_t>(req.method())) == 0) { BMCWEB_LOG_DEBUG << "Rule found but method mismatch: " << req.url << " with " << req.methodString() << "("
This issue seems to be resolved by 1c99da037b2242c6fbad3441038081c5703dc1e9
Closing.
After resent changes to OpenBMC, SOL, KVM and VirtualMedia stopped working.
I've compiled bmcweb with debug and found following report upon websocket connect:
In the sources rules[ruleIndex]->getMethods() is compared to 1U << static_cast(req.method()))
https://github.com/openbmc/bmcweb/blob/master/http/routing.hpp#L1270
Meanwhile the report in the same code block and below are printing rules[ruleIndex]->getMethods() and static_cast(req.method()))
https://github.com/openbmc/bmcweb/blob/master/http/routing.hpp#L1274
https://github.com/openbmc/bmcweb/blob/master/http/routing.hpp#L1282
After removing "1U <<" the problem disappeared. Looks like the fix is: