Skip to content

wireguard: ignore empty endpoints (LP: #2038811)#414

Merged
daniloegea merged 1 commit intocanonical:mainfrom
daniloegea:wg_empty_endpoint
Oct 11, 2023
Merged

wireguard: ignore empty endpoints (LP: #2038811)#414
daniloegea merged 1 commit intocanonical:mainfrom
daniloegea:wg_empty_endpoint

Conversation

@daniloegea
Copy link
Contributor

The Network Manager GUI will emit 'Endpoint=' if it's not specified when creating the tunnel. libnetplan is generating 'endpoint: ""' in this case and the parser is returning an error.

In nm-parse, if Endpoint is either empty or NULL we'll just not read it. In the parser, if we find 'endpoint: ""', we'll just ignore it as if it were not defined.

See LP: #2038811

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.

@daniloegea daniloegea requested a review from slyon October 10, 2023 11:23
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, except for a little inline comment, which should probably be fixed.

The Network Manager GUI will emit 'Endpoint=' if it's not specified when
creating the tunnel. libnetplan is generating 'endpoint: ""' in this case
and the parser is returning an error.

In nm-parse, if Endpoint is either empty or NULL we'll just not read it. In
the parser, if we find 'endpoint: ""', we'll just ignore it as if it
were not defined.

See LP: #2038811
@slyon
Copy link
Contributor

slyon commented Oct 10, 2023

Thanks for fixing!

@daniloegea daniloegea merged commit 1758948 into canonical:main Oct 11, 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