Skip to content

Commit

Permalink
Actualized advmss names for nm
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg authored and Oleg committed Jul 21, 2024
1 parent 8e8c5b7 commit 229d8f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/nm.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ write_routes_nm(const NetplanNetDefinition* def, GKeyFile *kf, gint family, GErr
if (cur_route->from)
g_string_append_printf(tmp_val, "src=%s,", cur_route->from);
if (cur_route->advmss != NETPLAN_ADVMSS_UNSPEC)
g_string_append_printf(tmp_val, "mss=%u,", cur_route->advmss);
g_string_append_printf(tmp_val, "advmss=%u,", cur_route->advmss);
tmp_val->str[tmp_val->len - 1] = '\0'; //remove trailing comma
g_key_file_set_string(kf, group, tmp_key, tmp_val->str);
g_free(tmp_key);
Expand Down
2 changes: 1 addition & 1 deletion src/parse-nm.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ parse_routes(GKeyFile* kf, const gchar* group, GArray** routes_arr)
route->table = strtoul(kv[1], NULL, 10);
else if (g_strcmp0(kv[0], "src") == 0)
route->from = g_strdup(kv[1]); //no need to free, will stay in netdef
else if (g_strcmp0(kv[0], "mss") == 0)
else if (g_strcmp0(kv[0], "advmss") == 0)
route->advmss = strtoul(kv[1], NULL, 10);
else
unhandled_data = TRUE;
Expand Down

0 comments on commit 229d8f3

Please sign in to comment.