On Sat, Mar 1, 2025 at 7:35 AM Frank Wagner <frank.wag...@dbosoft.eu> 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 <frank.wag...@dbosoft.eu>
>
> ---
>  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]);
> +    }

Hello Frank,

Is this expected behaviour? If so then the assert above should
probably be removed. What is the InPort expected to be set to when
this attribute is missing?

What would cause InPort to be NULL in this case?

Cheers,
M

>      execute->keyAttrs = keyAttrs;
>
>      if (nlAttrs[OVS_PACKET_ATTR_MRU]) {
> --
> 2.48.1
>
> _______________________________________________
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to