mesh: Fix adding virtual subscription to a vendor model 19/234219/1
authorInga Stotland <inga.stotland@intel.com>
Wed, 29 Apr 2020 18:05:41 +0000 (11:05 -0700)
committerAbhay Agarwal <ay.agarwal@samsung.com>
Fri, 22 May 2020 04:23:43 +0000 (09:53 +0530)
This fixes a case when a configuration server receives a virtual
subscription add/overwrite command targeting a vendor model.
Correctly set "vendor" argument before trying to save the updated
subscrition to configuration file.

Change-Id: I7ff5ca02e20819b316ef2f3b62e7ff01092d3070
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
mesh/cfgmod-server.c

index c5c756a..d708dfd 100644 (file)
@@ -358,6 +358,7 @@ static void config_sub_set(struct mesh_node *node, uint16_t net_idx,
        case 22:
                if (!virt)
                        return;
+               vendor = true;
                mod_id = l_get_le16(pkt + 18) << 16;
                mod_id |= l_get_le16(pkt + 20);
                break;