Skip to content

Conversation

@antoninbas
Copy link
Contributor

Cherry pick of #7515 on release-2.3.

#7515: Fix type assertion panic in GetFlowTableID (#7515)

For details on the cherry pick process, see the cherry pick requests page.

The GetFlowTableID function was incorrectly attempting to cast tableCache
objects directly to binding.Table, but the cache stores *Table wrapper
objects. The wrapper's ofTable field contains the actual binding.Table
implementation. This caused a panic in the `/ovsflows` HTTP handler.

Fix the type assertion to match the pattern used in getTableByID:
```
objs[0].(*Table).ofTable.GetID()
```

Also add unit tests for GetFlowTableID, GetFlowTableName, and
GetTableList to prevent regressions.

Signed-off-by: Antonin Bas <[email protected]>
@antoninbas antoninbas added the kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release label Oct 27, 2025
@antoninbas antoninbas merged commit f5c57a2 into antrea-io:release-2.3 Oct 28, 2025
52 of 57 checks passed
@antoninbas antoninbas deleted the automated-cherry-pick-of-#7515-upstream-release-2.3 branch October 28, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants