umbim: inherit "peerdns" option from parent interface

MBIM protocol handler should intherit "peerdns" options from parent
interface on sub-interfaces, otherwise upstream DNS servers are applied
regardless of configuration.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
This commit is contained in:
Lech Perczak 2021-07-19 19:15:53 +02:00 committed by Hauke Mehrtens
parent 9bb4b9a968
commit c84bf89b3a

View File

@ -187,7 +187,7 @@ _proto_mbim_setup() {
json_close_array
json_add_string gateway "$ipv4gateway"
json_add_array dns
json_add_string "" "$ipv4dnsserver"
[ "$peerdns" = 0 ] || json_add_string "" "$ipv4dnsserver"
json_close_array
proto_add_dynamic_defaults
json_close_object
@ -204,7 +204,7 @@ _proto_mbim_setup() {
json_close_array
json_add_string ip6gw "$ipv6gateway"
json_add_array dns
json_add_string "" "$ipv6dnsserver"
[ "$peerdns" = 0 ] || json_add_string "" "$ipv6dnsserver"
json_close_array
proto_add_dynamic_defaults
json_close_object