Skip to content

ovs: don't allow peers with the same name#353

Merged
slyon merged 2 commits intocanonical:mainfrom
daniloegea:fix_ovs_ports_same_name
May 2, 2023
Merged

ovs: don't allow peers with the same name#353
slyon merged 2 commits intocanonical:mainfrom
daniloegea:fix_ovs_ports_same_name

Conversation

@daniloegea
Copy link
Contributor

@daniloegea daniloegea commented Apr 27, 2023

I found it thanks to a memory leak. If both peers have the same name, the netdef will end up with a netdef->peer_link pointing to itself and netdef->link strdup'ed twice.

Description

Checklist

  • Runs make check successfully.
  • Retains 100% code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad.

Copy link
Contributor

@slyon slyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

But we might want to improve this error message and the other OVS messages a bit.

@daniloegea daniloegea force-pushed the fix_ovs_ports_same_name branch from 70ac977 to 57a711f Compare May 1, 2023 14:21
@daniloegea daniloegea force-pushed the fix_ovs_ports_same_name branch from 57a711f to 0872b17 Compare May 1, 2023 16:43
Copy link
Contributor

@slyon slyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@slyon slyon merged commit bb2d088 into canonical:main May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants