On Sat, Mar 1, 2025 at 7:35 AM Frank Wagner <[email protected]> wrote:
>
> 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 <[email protected]>
>
> ---
> datapath-windows/ovsext/User.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/datapath-windows/ovsext/User.c b/datapath-windows/ovsext/User.c
> index c4563b28b..b52124abf 100644
> --- a/datapath-windows/ovsext/User.c
> +++ b/datapath-windows/ovsext/User.c
> @@ -407,7 +407,9 @@ _MapNlAttrToOvsPktExec(PNL_MSG_HDR nlMsgHdr, PNL_ATTR
> *nlAttrs,
> execute->actionsLen = NlAttrGetSize(nlAttrs[OVS_PACKET_ATTR_ACTIONS]);
>
> ASSERT(keyAttrs[OVS_KEY_ATTR_IN_PORT]);
> - execute->inPort = NlAttrGetU32(keyAttrs[OVS_KEY_ATTR_IN_PORT]);
> + if (keyAttrs[OVS_KEY_ATTR_IN_PORT]) {
> + execute->inPort = NlAttrGetU32(keyAttrs[OVS_KEY_ATTR_IN_PORT]);
> + }
After reading through the code a bit more, I believe this is nearly
correct, but the ASSERT should be removed.
However, I don't have a Windows kernel dev environment set up, so I
can't test this out.
Cheers,
M
> execute->keyAttrs = keyAttrs;
>
> if (nlAttrs[OVS_PACKET_ATTR_MRU]) {
> --
> 2.48.1
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev