Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse-nm: account for veth and dummy when checking for virtual types #513

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ typedef enum {
* requires links to another netdef (such as vlan_link)
* but it's not strictly mandatory
* It's intended to be used only when renderer is NetworkManager
* Keep the PLACEHOLDER_ and MAX_ elements at the end of the enum
*/
NETPLAN_DEF_TYPE_NM_PLACEHOLDER_,
NETPLAN_DEF_TYPE_MAX_
Expand Down
4 changes: 3 additions & 1 deletion src/parse-nm.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,9 @@ netplan_parser_load_keyfile(NetplanParser* npp, const char* filename, GError** e
nd_id = g_strdup(netdef_id);
if (g_strcmp0(netdef_id, tmp_str) == 0)
_kf_clear_key(kf, "connection", "interface-name");
} else if (tmp_str && nd_type >= NETPLAN_DEF_TYPE_VIRTUAL && nd_type < NETPLAN_DEF_TYPE_NM) {
} else if (tmp_str && nd_type != NETPLAN_DEF_TYPE_NM
&& nd_type >= NETPLAN_DEF_TYPE_VIRTUAL
&& nd_type < NETPLAN_DEF_TYPE_NM_PLACEHOLDER_) {
/* netdef ID equals "interface-name" for virtual devices (bridge/bond/...) */
nd_id = g_strdup(tmp_str);
_kf_clear_key(kf, "connection", "interface-name");
Expand Down
Loading