mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 01:51:26 +00:00
datapath-windows: Fix possible null reference in _MapNlAttrToOvsPktExec
It can happen that ovs key attributes are not in keyAttrs of port. In this case the call of NlAttrGetU32 will cause a BSOD in Release builds. Signed-off-by: Frank Wagner <frank.wagner@dbosoft.eu> Reviewed-by: Mike Pattrick <mkp@redhat.com> Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
This commit is contained in:
parent
69f0acc9af
commit
defb8f33ff
@ -406,8 +406,10 @@ _MapNlAttrToOvsPktExec(PNL_MSG_HDR nlMsgHdr, PNL_ATTR *nlAttrs,
|
||||
execute->actions = NlAttrGet(nlAttrs[OVS_PACKET_ATTR_ACTIONS]);
|
||||
execute->actionsLen = NlAttrGetSize(nlAttrs[OVS_PACKET_ATTR_ACTIONS]);
|
||||
|
||||
ASSERT(keyAttrs[OVS_KEY_ATTR_IN_PORT]);
|
||||
//TODO revisit and understand if this check is needed
|
||||
if (keyAttrs[OVS_KEY_ATTR_IN_PORT]) {
|
||||
execute->inPort = NlAttrGetU32(keyAttrs[OVS_KEY_ATTR_IN_PORT]);
|
||||
}
|
||||
execute->keyAttrs = keyAttrs;
|
||||
|
||||
if (nlAttrs[OVS_PACKET_ATTR_MRU]) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user