OSDN Git Service

msm: ipa3: Fix to validate check for IP type
authorPraveen Kurapati <pkurapat@codeaurora.org>
Tue, 21 May 2019 10:38:10 +0000 (16:08 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Mon, 10 Jun 2019 11:34:31 +0000 (04:34 -0700)
Add proper check for validating the IP type while
sending request for ul-filter-rule install.

Change-Id: I170230310884f176cf41d5ae20287f6d74a4bc29
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
drivers/platform/msm/ipa/ipa_v3/ipa_qmi_service.c

index fe3edb5..d8e128e 100644 (file)
@@ -824,10 +824,11 @@ int ipa3_qmi_ul_filter_request_send(
                if (req->firewall_rules_list[i].ip_type !=
                                QMI_IPA_IP_TYPE_V4_V01 &&
                        req->firewall_rules_list[i].ip_type !=
-                               QMI_IPA_IP_TYPE_V6_V01)
+                               QMI_IPA_IP_TYPE_V6_V01) {
                        IPAWANERR("Invalid IP type %d\n",
                                        req->firewall_rules_list[i].ip_type);
-               return -EINVAL;
+                       return -EINVAL;
+               }
        }
 
        req_desc.max_msg_len =