modemmanager: add proto dynamic defaults on dhcp setup

Also, explicitly close the JSON object.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
This commit is contained in:
Aleksander Morgado
2019-11-06 15:44:29 +01:00
parent fa3f9542de
commit fc47c47b39
2 changed files with 3 additions and 1 deletions
@@ -175,7 +175,9 @@ modemmanager_connected_method_dhcp() {
json_add_string name "${interface}_4"
json_add_string ifname "@${interface}"
json_add_string proto "dhcp"
proto_add_dynamic_defaults
[ -n "$metric" ] && json_add_int metric "${metric}"
json_close_object
ubus call network add_dynamic "$(json_dump)"
}