ncm: add sourcefilter option support
[openwrt/staging/linusw.git] / package / network / utils / comgt / files / ncm.sh
index dec058712d0735738c32e86936b3bdc40651e0fd..4c829fa930d584e2a7e5622ce8db54d7504552df 100644 (file)
@@ -19,6 +19,7 @@ proto_ncm_init_config() {
        proto_config_add_string delay
        proto_config_add_string mode
        proto_config_add_string pdptype
+       proto_config_add_boolean sourcefilter
        proto_config_add_int profile
        proto_config_add_defaults
 }
@@ -29,7 +30,7 @@ proto_ncm_setup() {
        local manufacturer initialize setmode connect finalize devname devpath ifpath
 
        local device ifname  apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS
-       json_get_vars device ifname apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS
+       json_get_vars device ifname apn auth username password pincode delay mode pdptype sourcefilter profile $PROTO_DEFAULT_OPTIONS
 
        local context_type
 
@@ -202,6 +203,7 @@ proto_ncm_setup() {
                json_add_string ifname "@$interface"
                json_add_string proto "dhcpv6"
                json_add_string extendprefix 1
+               [ "$sourcefilter" = "0" ] && json_add_boolean sourcefilter "0"
                proto_add_dynamic_defaults
                [ -n "$zone" ] && {
                        json_add_string zone "$zone"