Skip to content

Commit

Permalink
Merge pull request #42 from ciaran2/fix-vlan-segfault
Browse files Browse the repository at this point in the history
Handle vlan interface names with no dot
  • Loading branch information
feelqah authored Oct 12, 2022
2 parents 8406430 + ece7b4f commit 9a53b90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/interfaces/interfaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,9 @@ int add_existing_links(sr_session_ctx_t *session, link_data_list_t *ld)
char *second = NULL;

first = strchr(name, '.');
second = strchr(first + 1, '.');
if (first != 0) {
second = strchr(first + 1, '.');
}

if (second != 0) {
link = (struct rtnl_link *) nl_cache_get_next((struct nl_object *) link);
Expand Down

0 comments on commit 9a53b90

Please sign in to comment.